From 6de0ff339ff613cc22d6884844c670c0e3b8e04f Mon Sep 17 00:00:00 2001 From: Darren Cooney Date: Tue, 12 Nov 2024 09:41:20 -0500 Subject: [PATCH 01/14] Update packages --- .prettierignore | 11 + .prettierrc.js | 4 + README.txt | 4 +- admin/src/js/admin.js | 76 +- admin/src/js/licenses.js | 30 +- admin/views/settings.php | 5 + build/admin/index.asset.php | 2 +- build/admin/index.js | 5038 ++- build/block/index.asset.php | 2 +- build/block/index.js | 1 - build/images/ajax-loader-lg.808ea7f8.gif | Bin 3208 -> 0 bytes build/images/ajax-loader.7c5ec6b9.gif | Bin 1849 -> 0 bytes build/instant-images.asset.php | 2 +- build/instant-images.js | 1 - build/media-modal/index.asset.php | 2 +- build/media-modal/index.js | 1 - build/plugin-sidebar/index.asset.php | 2 +- build/plugin-sidebar/index.js | 1 - build/style-instant-images-rtl.css | 2997 ++ build/style-instant-images.css | 488 - instant-images.php | 4 + package-lock.json | 35287 ++++++++++------ package.json | 41 +- src/js/common/pluginProvider.js | 6 +- src/js/components/APILightbox.js | 107 +- src/js/components/ErrorLightbox.js | 34 +- src/js/components/Filter.js | 67 +- src/js/components/Icon.js | 41 +- src/js/components/InstantImages.js | 198 +- src/js/components/LoadMore.js | 17 +- src/js/components/Photo.js | 238 +- src/js/components/ProviderIcons.js | 64 +- src/js/components/ProviderNav.js | 20 +- src/js/components/RestAPIError.js | 10 +- src/js/components/Results.js | 18 +- src/js/components/ResultsWPBlock.js | 28 +- src/js/components/Sponsor.js | 25 +- src/js/components/cta/Extended.js | 81 +- src/js/components/search/SearchForm.js | 42 +- src/js/components/search/SearchHeader.js | 25 +- src/js/components/search/SearchHistory.js | 33 +- src/js/components/search/SearchToolTip.js | 23 +- src/js/constants/API.js | 39 +- src/js/constants/filters.js | 158 +- src/js/constants/filters/openverse.js | 62 +- src/js/constants/filters/pexels.js | 32 +- src/js/constants/filters/pixabay.js | 86 +- src/js/constants/filters/unsplash.js | 30 +- src/js/editor/block/components/Header.js | 21 +- src/js/editor/block/components/Help.js | 27 +- .../editor/block/components/Instructions.js | 4 +- src/js/editor/block/components/LoadMore.js | 14 +- src/js/editor/block/index.js | 49 +- src/js/editor/plugin/components/Menu.js | 10 +- src/js/editor/plugin/components/Plugin.js | 12 +- src/js/editor/plugin/components/Sidebar.js | 22 +- src/js/editor/plugin/index.js | 2 +- src/js/editor/utils/insertImage.js | 13 +- src/js/editor/utils/setFeaturedImage.js | 6 +- src/js/functions/buildURL.js | 20 +- src/js/functions/consoleStatus.js | 16 +- src/js/functions/deprecated/createQS.js | 14 - src/js/functions/deprecated/getHeaders.js | 28 - src/js/functions/deprecated/getProp.js | 136 - src/js/functions/deprecated/pexels.js | 67 - src/js/functions/deprecated/polyfills.js | 90 - src/js/functions/deprecated/searchByID.js | 34 - src/js/functions/generateAttribution.js | 12 +- src/js/functions/getProvider.js | 6 +- src/js/functions/getQueryParams.js | 12 +- src/js/functions/getResults.js | 8 +- src/js/functions/helpers.js | 30 +- src/js/functions/localStorage.js | 4 +- src/js/functions/providers/openverse.js | 8 +- src/js/functions/providers/unsplash.js | 10 +- src/js/functions/session.js | 6 +- src/js/functions/updatePluginSetting.js | 8 +- src/js/hooks/useArrowControls.js | 14 +- src/js/hooks/useClickOutside.js | 16 +- src/js/index.js | 66 +- src/js/media-modal.js | 91 +- src/js/plugin-sidebar.js | 10 +- src/scss/partials/_forms.scss | 1 + src/scss/partials/_header.scss | 9 +- webpack.config.js | 20 +- webpack/prod.config.js | 8 +- webpack/proxy.config.js | 8 +- 87 files changed, 31470 insertions(+), 14945 deletions(-) create mode 100644 .prettierignore create mode 100644 .prettierrc.js delete mode 100644 build/block/index.js delete mode 100644 build/images/ajax-loader-lg.808ea7f8.gif delete mode 100644 build/images/ajax-loader.7c5ec6b9.gif delete mode 100644 build/instant-images.js delete mode 100644 build/media-modal/index.js delete mode 100644 build/plugin-sidebar/index.js create mode 100644 build/style-instant-images-rtl.css delete mode 100644 build/style-instant-images.css delete mode 100644 src/js/functions/deprecated/createQS.js delete mode 100644 src/js/functions/deprecated/getHeaders.js delete mode 100644 src/js/functions/deprecated/getProp.js delete mode 100644 src/js/functions/deprecated/pexels.js delete mode 100755 src/js/functions/deprecated/polyfills.js delete mode 100644 src/js/functions/deprecated/searchByID.js diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..178fe66 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,11 @@ +*.min.{js,jsx,ts,tsx,md,html,json,yml} +!/.*.{js,jsx,ts,tsx,md,html,json,yml} +.*.{js,jsx,ts,tsx,md,html,json,yml} + +build/ +node_modules/ +vendor/ +dist/ + +README.md +style.css diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..54a78f9 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,4 @@ +module.exports = { + singleQuote: true, + printWidth: 160, +}; diff --git a/README.txt b/README.txt index 7ceac0f..32c1df2 100755 --- a/README.txt +++ b/README.txt @@ -51,9 +51,11 @@ Enhance the Instant Images experience with a suite of premium features and added **What's Included:** - Search History & Autocomplete. -- Instant Images Gutenberg Block. +- Instant Images as a WordPress Block. - WordPress CLI Imports. - Batch Image Imports. +- I'm Feeling Lucky WordPress Block. +- Instant Featured Images - Images Filters (Instagram). - Maintain current search term while switching image providers. - And more... diff --git a/admin/src/js/admin.js b/admin/src/js/admin.js index 8d85523..e045324 100755 --- a/admin/src/js/admin.js +++ b/admin/src/js/admin.js @@ -1,8 +1,8 @@ -import "./licenses"; +import './licenses'; const instant_images = instant_images || {}; jQuery(document).ready(function ($) { - "use strict"; + 'use strict'; // Media Uploader Modal instant_images.setEditor = function (frame) { @@ -10,17 +10,13 @@ jQuery(document).ready(function ($) { wp.media.view.Router = Parent.extend({ addNav() { // Button - const $a = $( - ' ' + - instant_img_localize.instant_images + - "" - ); + const $a = $(' ' + instant_img_localize.instant_images + ''); // Click event - $a.on("click", function (e) { + $a.on('click', function (e) { e.preventDefault(); // Set active state of #instant_images_modal - frame.addClass("active"); + frame.addClass('active'); }); this.$el.append($a); // append @@ -34,79 +30,75 @@ jQuery(document).ready(function ($) { }); if (frame.length) { - $(".close-ii-modal").on("click", function (e) { + $('.close-ii-modal').on('click', function (e) { e.preventDefault(); - frame.removeClass("active"); + frame.removeClass('active'); }); } }; if (wp.media) { - const frame = $("#instant_images_modal"); + const frame = $('#instant_images_modal'); if (frame.length) { instant_images.setEditor(frame); } } // Close Modal. - $(document).on("click", ".media-modal-backdrop", function (e) { + $(document).on('click', '.media-modal-backdrop', function (e) { e.preventDefault(); - frame.removeClass("active"); + frame.removeClass('active'); }); // Save Settings Form. - $(".instant-images-settings form.settings").on("submit", function () { + $('.instant-images-settings form.settings').on('submit', function () { const form = $(this); - form.addClass("saving"); - $(".save-settings .loading", form).addClass("active"); - $(".save-settings #submit", form).prop("disabled", true); + form.addClass('saving'); + $('.save-settings .loading', form).addClass('active'); + $('.save-settings #submit', form).prop('disabled', true); $(this).ajaxSubmit({ success() { - $(".save-settings .loading", form).removeClass("active"); + $('.save-settings .loading', form).removeClass('active'); setTimeout(function () { - $(".save-settings .saved", form).addClass("active"); + $('.save-settings .saved', form).addClass('active'); setTimeout(function () { - $(".save-settings .saved", form).removeClass("active"); - form.removeClass("saving"); - $(".save-settings #submit", form).prop("disabled", false); + $('.save-settings .saved', form).removeClass('active'); + form.removeClass('saving'); + $('.save-settings #submit', form).prop('disabled', false); }, 2000); }, 250); }, error() { - form.removeClass("saving"); - $(".save-settings .loading", form).removeClass("active"); - $(".save-settings #submit", form).prop("disabled", false); - alert("An error occured and the settings could not be saved"); // eslint-disable-line no-alert + form.removeClass('saving'); + $('.save-settings .loading', form).removeClass('active'); + $('.save-settings #submit', form).prop('disabled', false); + alert('An error occured and the settings could not be saved'); // eslint-disable-line no-alert }, }); return false; }); // Settings anchor links. - const settings = document.querySelectorAll( - ".settings_page_instant-images-settings .settings-entry" - ); + const settings = document.querySelectorAll('.settings_page_instant-images-settings .settings-entry'); if (settings) { const hash = window.location.hash; if (hash) { scrollToSection(hash); } - const nav = document.querySelector( - ".settings_page_instant-images-settings nav.jump-nav" - ); + const nav = document.querySelector('.settings_page_instant-images-settings nav.jump-nav'); settings.forEach(function (setting) { - const anchor = setting.getAttribute("id"); - const icon = setting.querySelector(".settings-entry--title .fa"); - const text = setting.querySelector(".settings-entry--title h2").innerText; + const anchor = setting.getAttribute('id'); + const icon = setting.querySelector('.settings-entry--title .fa'); + const text = setting.querySelector('.settings-entry--title h2').innerText; - const button = document.createElement("button"); - button.setAttribute("data-anchor", anchor); + const button = document.createElement('button'); + button.setAttribute('data-anchor', anchor); button.innerHTML = icon.outerHTML + text; nav.appendChild(button); // Scroll to section. - button.addEventListener("click", function () { - scrollToSection("#" + anchor); + button.addEventListener('click', function () { + scrollToSection('#' + anchor); }); }); } @@ -120,10 +112,10 @@ jQuery(document).ready(function ($) { function scrollToSection(hash) { const target = document.querySelector(hash); if (target) { - history.replaceState({}, "", hash); + history.replaceState({}, '', hash); window.scrollTo({ top: target.offsetTop - 20, - behavior: "smooth", + behavior: 'smooth', }); } } diff --git a/admin/src/js/licenses.js b/admin/src/js/licenses.js index 5faede4..3dfad9e 100644 --- a/admin/src/js/licenses.js +++ b/admin/src/js/licenses.js @@ -1,33 +1,31 @@ -import axios from "axios"; -import { __ } from "@wordpress/i18n"; +import axios from 'axios'; +import { __ } from '@wordpress/i18n'; // Get all license forms. -const licenseForms = document.querySelectorAll( - ".license-settings form.license-settings--item" -); +const licenseForms = document.querySelectorAll('.license-settings form.license-settings--item'); if (licenseForms) { // Loop each formt o add event listener. licenseForms.forEach((form) => { - form.addEventListener("submit", function (e) { + form.addEventListener('submit', function (e) { e.preventDefault(); - const input = this.querySelector("input"); + const input = this.querySelector('input'); const license = input.value; const key = input.dataset.key; const status = input.dataset.status; const id = input.dataset.id; - const type = form.classList.contains("valid") ? "deactivate" : "activate"; + const type = form.classList.contains('valid') ? 'deactivate' : 'activate'; if (!license) { input.focus(); return; } - const button = form.querySelector("input[type=submit]"); - button.setAttribute("disabled", "disabled"); + const button = form.querySelector('input[type=submit]'); + button.setAttribute('disabled', 'disabled'); - const loading = form.querySelector(".loading"); - loading.classList.add("active"); + const loading = form.querySelector('.loading'); + loading.classList.add('active'); updateLicense({ key, @@ -47,11 +45,11 @@ if (licenseForms) { */ function updateLicense(params) { const { root, nonce } = instant_img_admin_localize; // eslint-disable-line no-undef - const api = root + "instant-images/license/"; + const api = root + 'instant-images/license/'; const config = { headers: { - "X-WP-Nonce": nonce, - "Content-Type": "application/json", + 'X-WP-Nonce': nonce, + 'Content-Type': 'application/json', }, }; axios @@ -62,7 +60,7 @@ function updateLicense(params) { } else { console.warn( // Error handling. - __("Are you sure you should be doing this?", "instant-images") + __('Are you sure you should be doing this?', 'instant-images'), ); doReload(); } diff --git a/admin/views/settings.php b/admin/views/settings.php index 2c810ab..fef93fd 100755 --- a/admin/views/settings.php +++ b/admin/views/settings.php @@ -16,6 +16,11 @@ // API Settings. require_once INSTANT_IMAGES_PATH . 'admin/includes/settings/api-settings.php'; + // Extended: Image Sizes. + if ( InstantImages::instant_images_addon_valid_license( 'extended' ) ) { + require_once INSTANT_IMAGES_EXTENDED_PATH . 'views/image-sizes.php'; + } + // Extended: Image Import. if ( InstantImages::instant_images_addon_valid_license( 'extended' ) ) { require_once INSTANT_IMAGES_EXTENDED_PATH . 'views/import.php'; diff --git a/build/admin/index.asset.php b/build/admin/index.asset.php index 434869a..ffb39bd 100644 --- a/build/admin/index.asset.php +++ b/build/admin/index.asset.php @@ -1 +1 @@ - array('wp-i18n'), 'version' => '726a54354c57e75edbba'); + array('wp-i18n'), 'version' => '26e24080015ff6988a26'); diff --git a/build/admin/index.js b/build/admin/index.js index f098b5b..834011b 100644 --- a/build/admin/index.js +++ b/build/admin/index.js @@ -1 +1,5037 @@ -(()=>{"use strict";function e(e,t){return function(){return e.apply(t,arguments)}}const{toString:t}=Object.prototype,{getPrototypeOf:n}=Object,r=(o=Object.create(null),e=>{const n=t.call(e);return o[n]||(o[n]=n.slice(8,-1).toLowerCase())});var o;const i=e=>(e=e.toLowerCase(),t=>r(t)===e),s=e=>t=>typeof t===e,{isArray:a}=Array,c=s("undefined"),u=i("ArrayBuffer"),l=s("string"),f=s("function"),d=s("number"),p=e=>null!==e&&"object"==typeof e,h=e=>{if("object"!==r(e))return!1;const t=n(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},m=i("Date"),g=i("File"),y=i("Blob"),b=i("FileList"),w=i("URLSearchParams");function E(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),a(e))for(r=0,o=e.length;r0;)if(r=n[o],t===r.toLowerCase())return r;return null}const v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,S=e=>!c(e)&&e!==v,R=(A="undefined"!=typeof Uint8Array&&n(Uint8Array),e=>A&&e instanceof A);var A;const T=i("HTMLFormElement"),C=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),N=i("RegExp"),j=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};E(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},x="abcdefghijklmnopqrstuvwxyz",P="0123456789",_={DIGIT:P,ALPHA:x,ALPHA_DIGIT:x+x.toUpperCase()+P},L={isArray:a,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&f(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{const n="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||t.call(e)===n||f(e.toString)&&e.toString()===n)},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer),t},isString:l,isNumber:d,isBoolean:e=>!0===e||!1===e,isObject:p,isPlainObject:h,isUndefined:c,isDate:m,isFile:g,isBlob:y,isRegExp:N,isFunction:f,isStream:e=>p(e)&&f(e.pipe),isURLSearchParams:w,isTypedArray:R,isFileList:b,forEach:E,merge:function e(){const{caseless:t}=S(this)&&this||{},n={},r=(r,o)=>{const i=t&&O(n,o)||o;h(n[i])&&h(r)?n[i]=e(n[i],r):h(r)?n[i]=e({},r):a(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e(E(n,((n,o)=>{r&&f(n)?t[o]=e(n,r):t[o]=n}),{allOwnKeys:o}),t),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,r,o)=>{let i,s,a;const c={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)a=i[s],o&&!o(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==r&&n(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:r,kindOfTest:i,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(a(e))return e;let t=e.length;if(!d(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:T,hasOwnProperty:C,hasOwnProp:C,reduceDescriptors:j,freezeMethods:e=>{j(e,((t,n)=>{if(f(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];f(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return a(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:O,global:v,isContextDefined:S,ALPHABET:_,generateString:(e=16,t=_.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&f(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(p(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=a(e)?[]:{};return E(e,((e,t)=>{const i=n(e,r+1);!c(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)}};function U(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}L.inherits(U,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:L.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const D=U.prototype,B={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{B[e]={value:e}})),Object.defineProperties(U,B),Object.defineProperty(D,"isAxiosError",{value:!0}),U.from=(e,t,n,r,o,i)=>{const s=Object.create(D);return L.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),U.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const F=U;function k(e){return L.isPlainObject(e)||L.isArray(e)}function q(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function I(e,t,n){return e?e.concat(t).map((function(e,t){return e=q(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const z=L.toFlatObject(L,{},null,(function(e){return/^is[A-Z]/.test(e)})),M=function(e,t,n){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=L.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!L.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(L.isDate(e))return e.toISOString();if(!a&&L.isBlob(e))throw new F("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(e)||L.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(L.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(L.isArray(e)&&function(e){return L.isArray(e)&&!e.some(k)}(e)||(L.isFileList(e)||L.endsWith(n,"[]"))&&(a=L.toArray(e)))return n=q(n),a.forEach((function(e,r){!L.isUndefined(e)&&null!==e&&t.append(!0===s?I([n],r,i):null===s?n:n+"[]",c(e))})),!1;return!!k(e)||(t.append(I(o,n,i),c(e)),!1)}const l=[],f=Object.assign(z,{defaultVisitor:u,convertValue:c,isVisitable:k});if(!L.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!L.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),L.forEach(n,(function(n,i){!0===(!(L.isUndefined(n)||null===n)&&o.call(t,n,L.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t};function H(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function J(e,t){this._pairs=[],e&&M(e,this,t)}const W=J.prototype;W.append=function(e,t){this._pairs.push([e,t])},W.toString=function(e){const t=e?function(t){return e.call(this,t,H)}:H;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const K=J;function V(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function G(e,t,n){if(!t)return e;const r=n&&n.encode||V,o=n&&n.serialize;let i;if(i=o?o(t,n):L.isURLSearchParams(t)?t.toString():new K(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const $=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){L.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},X={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Q={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:K,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]},Z=function(e){function t(e,n,r,o){let i=e[o++];const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&L.isArray(r)?r.length:i,a?(L.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&L.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&L.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r{t(function(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},Y={"Content-Type":void 0},ee={transitional:X,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=L.isObject(e);if(o&&L.isHTMLForm(e)&&(e=new FormData(e)),L.isFormData(e))return r&&r?JSON.stringify(Z(e)):e;if(L.isArrayBuffer(e)||L.isBuffer(e)||L.isStream(e)||L.isFile(e)||L.isBlob(e))return e;if(L.isArrayBufferView(e))return e.buffer;if(L.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return M(e,new Q.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Q.isNode&&L.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=L.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return M(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(L.isString(e))try{return(0,JSON.parse)(e),L.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ee.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&L.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw F.from(e,F.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Q.classes.FormData,Blob:Q.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};L.forEach(["delete","get","head"],(function(e){ee.headers[e]={}})),L.forEach(["post","put","patch"],(function(e){ee.headers[e]=L.merge(Y)}));const te=ee,ne=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),re=Symbol("internals");function oe(e){return e&&String(e).trim().toLowerCase()}function ie(e){return!1===e||null==e?e:L.isArray(e)?e.map(ie):String(e)}function se(e,t,n,r,o){return L.isFunction(r)?r.call(this,t,n):(o&&(t=n),L.isString(t)?L.isString(r)?-1!==t.indexOf(r):L.isRegExp(r)?r.test(t):void 0:void 0)}class ae{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=oe(t);if(!o)throw new Error("header name must be a non-empty string");const i=L.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=ie(e))}const i=(e,t)=>L.forEach(e,((e,n)=>o(e,n,t)));return L.isPlainObject(e)||e instanceof this.constructor?i(e,t):L.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&ne[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=oe(e)){const n=L.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(L.isFunction(t))return t.call(this,e,n);if(L.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=oe(e)){const n=L.findKey(this,e);return!(!n||void 0===this[n]||t&&!se(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=oe(e)){const o=L.findKey(n,e);!o||t&&!se(0,n[o],o,t)||(delete n[o],r=!0)}}return L.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!se(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return L.forEach(this,((r,o)=>{const i=L.findKey(n,o);if(i)return t[i]=ie(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=ie(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return L.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&L.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[re]=this[re]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=oe(e);t[r]||(function(e,t){const n=L.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return L.isArray(e)?e.forEach(r):r(e),this}}ae.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),L.freezeMethods(ae.prototype),L.freezeMethods(ae);const ce=ae;function ue(e,t){const n=this||te,r=t||n,o=ce.from(r.headers);let i=r.data;return L.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function le(e){return!(!e||!e.__CANCEL__)}function fe(e,t,n){F.call(this,null==e?"canceled":e,F.ERR_CANCELED,t,n),this.name="CanceledError"}L.inherits(fe,F,{__CANCEL__:!0});const de=fe,pe=Q.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){const s=[];s.push(e+"="+encodeURIComponent(t)),L.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),L.isString(r)&&s.push("path="+r),L.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function he(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const me=Q.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=L.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},ge=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,c=r(a);n=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const be={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=ce.from(e.headers).normalize(),i=e.responseType;let s;function a(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}L.isFormData(r)&&(Q.isStandardBrowserEnv||Q.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const u=he(e.baseURL,e.url);function l(){if(!c)return;const r=ce.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new F("Request failed with status code "+n.status,[F.ERR_BAD_REQUEST,F.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),a()}),(function(e){n(e),a()}),{data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),G(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(n(new F("Request aborted",F.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new F("Network Error",F.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||X;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new F(t,r.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,e,c)),c=null},Q.isStandardBrowserEnv){const t=(e.withCredentials||me(u))&&e.xsrfCookieName&&pe.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in c&&L.forEach(o.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),L.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),i&&"json"!==i&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",ye(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",ye(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{c&&(n(!t||t.type?new de(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const f=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);f&&-1===Q.protocols.indexOf(f)?n(new F("Unsupported protocol "+f+":",F.ERR_BAD_REQUEST,e)):c.send(r||null)}))}};L.forEach(be,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const we={getAdapter:e=>{e=L.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;oe instanceof ce?e.toJSON():e;function Se(e,t){t=t||{};const n={};function r(e,t,n){return L.isPlainObject(e)&&L.isPlainObject(t)?L.merge.call({caseless:n},e,t):L.isPlainObject(t)?L.merge({},t):L.isArray(t)?t.slice():t}function o(e,t,n){return L.isUndefined(t)?L.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!L.isUndefined(t))return r(void 0,t)}function s(e,t){return L.isUndefined(t)?L.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(ve(e),ve(t),!0)};return L.forEach(Object.keys(e).concat(Object.keys(t)),(function(r){const i=c[r]||o,s=i(e[r],t[r],r);L.isUndefined(s)&&i!==a||(n[r]=s)})),n}const Re={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Re[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Ae={};Re.transitional=function(e,t,n){function r(e,t){return"[Axios v1.3.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new F(r(o," has been removed"+(t?" in "+t:"")),F.ERR_DEPRECATED);return t&&!Ae[o]&&(Ae[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};const Te={assertOptions:function(e,t,n){if("object"!=typeof e)throw new F("options must be an object",F.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new F("option "+i+" must be "+n,F.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new F("Unknown option "+i,F.ERR_BAD_OPTION)}},validators:Re},Ce=Te.validators;class Ne{constructor(e){this.defaults=e,this.interceptors={request:new $,response:new $}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Se(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;let i;void 0!==n&&Te.assertOptions(n,{silentJSONParsing:Ce.transitional(Ce.boolean),forcedJSONParsing:Ce.transitional(Ce.boolean),clarifyTimeoutError:Ce.transitional(Ce.boolean)},!1),void 0!==r&&Te.assertOptions(r,{encode:Ce.function,serialize:Ce.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase(),i=o&&L.merge(o.common,o[t.method]),i&&L.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=ce.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[Oe.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);f{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new de(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new xe((function(t){e=t})),cancel:e}}}const Pe=xe,_e={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(_e).forEach((([e,t])=>{_e[t]=e}));const Le=_e,Ue=function t(n){const r=new je(n),o=e(je.prototype.request,r);return L.extend(o,je.prototype,r,{allOwnKeys:!0}),L.extend(o,r,null,{allOwnKeys:!0}),o.create=function(e){return t(Se(n,e))},o}(te);Ue.Axios=je,Ue.CanceledError=de,Ue.CancelToken=Pe,Ue.isCancel=le,Ue.VERSION="1.3.4",Ue.toFormData=M,Ue.AxiosError=F,Ue.Cancel=Ue.CanceledError,Ue.all=function(e){return Promise.all(e)},Ue.spread=function(e){return function(t){return e.apply(null,t)}},Ue.isAxiosError=function(e){return L.isObject(e)&&!0===e.isAxiosError},Ue.mergeConfig=Se,Ue.AxiosHeaders=ce,Ue.formToJSON=e=>Z(L.isHTMLForm(e)?new FormData(e):e),Ue.HttpStatusCode=Le,Ue.default=Ue;const De=Ue,Be=window.wp.i18n;var Fe=document.querySelectorAll(".license-settings form.license-settings--item");function ke(){setTimeout((function(){location.reload()}),2e3)}Fe&&Fe.forEach((function(e){e.addEventListener("submit",(function(t){t.preventDefault();var n,r,o,i,s=this.querySelector("input"),a=s.value,c=s.dataset.key,u=s.dataset.status,l=s.dataset.id,f=e.classList.contains("valid")?"deactivate":"activate";a?(e.querySelector("input[type=submit]").setAttribute("disabled","disabled"),e.querySelector(".loading").classList.add("active"),n={key:c,status:u,id:l,license:a,type:f},o=(r=instant_img_admin_localize).root+"instant-images/license/",i={headers:{"X-WP-Nonce":r.nonce,"Content-Type":"application/json"}},De.post(o,JSON.stringify(n),i).then((function(e){null!=e&&e.data?location.reload():(console.warn((0,Be.__)("Are you sure you should be doing this?","instant-images")),ke())})).catch((function(e){console.warn(e),ke()}))):s.focus()}))}));var qe=qe||{};function Ie(e){var t=document.querySelector(e);t&&(history.replaceState({},"",e),window.scrollTo({top:t.offsetTop-20,behavior:"smooth"}))}jQuery(document).ready((function(e){if(qe.setEditor=function(t){var n=wp.media.view.Router;wp.media.view.Router=n.extend({addNav:function(){var n=e(' '+instant_img_localize.instant_images+"");n.on("click",(function(e){e.preventDefault(),t.addClass("active")})),this.$el.append(n)},initialize:function(){return n.prototype.initialize.apply(this,arguments),this.addNav(),this}}),t.length&&e(".close-ii-modal").on("click",(function(e){e.preventDefault(),t.removeClass("active")}))},wp.media){var t=e("#instant_images_modal");t.length&&qe.setEditor(t)}e(document).on("click",".media-modal-backdrop",(function(e){e.preventDefault(),frame.removeClass("active")})),e(".instant-images-settings form.settings").on("submit",(function(){var t=e(this);return t.addClass("saving"),e(".save-settings .loading",t).addClass("active"),e(".save-settings #submit",t).prop("disabled",!0),e(this).ajaxSubmit({success:function(){e(".save-settings .loading",t).removeClass("active"),setTimeout((function(){e(".save-settings .saved",t).addClass("active"),setTimeout((function(){e(".save-settings .saved",t).removeClass("active"),t.removeClass("saving"),e(".save-settings #submit",t).prop("disabled",!1)}),2e3)}),250)},error:function(){t.removeClass("saving"),e(".save-settings .loading",t).removeClass("active"),e(".save-settings #submit",t).prop("disabled",!1),alert("An error occured and the settings could not be saved")}}),!1}));var n=document.querySelectorAll(".settings_page_instant-images-settings .settings-entry");if(n){var r=window.location.hash;r&&Ie(r);var o=document.querySelector(".settings_page_instant-images-settings nav.jump-nav");n.forEach((function(e){var t=e.getAttribute("id"),n=e.querySelector(".settings-entry--title .fa"),r=e.querySelector(".settings-entry--title h2").innerText,i=document.createElement("button");i.setAttribute("data-anchor",t),i.innerHTML=n.outerHTML+r,o.appendChild(i),i.addEventListener("click",(function(){Ie("#"+t)}))}))}}))})(); \ No newline at end of file +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "./admin/src/js/licenses.js": +/*!**********************************!*\ + !*** ./admin/src/js/licenses.js ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); + + + +// Get all license forms. +var licenseForms = document.querySelectorAll('.license-settings form.license-settings--item'); +if (licenseForms) { + // Loop each formt o add event listener. + licenseForms.forEach(function (form) { + form.addEventListener('submit', function (e) { + e.preventDefault(); + var input = this.querySelector('input'); + var license = input.value; + var key = input.dataset.key; + var status = input.dataset.status; + var id = input.dataset.id; + var type = form.classList.contains('valid') ? 'deactivate' : 'activate'; + if (!license) { + input.focus(); + return; + } + var button = form.querySelector('input[type=submit]'); + button.setAttribute('disabled', 'disabled'); + var loading = form.querySelector('.loading'); + loading.classList.add('active'); + updateLicense({ + key: key, + status: status, + id: id, + license: license, + type: type + }); + }); + }); +} + +/** + * Update add-on license via REST API. + * + * @param {Object} params The data params for license activation/deactivation. + */ +function updateLicense(params) { + var _instant_img_admin_lo = instant_img_admin_localize, + root = _instant_img_admin_lo.root, + nonce = _instant_img_admin_lo.nonce; // eslint-disable-line no-undef + var api = root + 'instant-images/license/'; + var config = { + headers: { + 'X-WP-Nonce': nonce, + 'Content-Type': 'application/json' + } + }; + axios__WEBPACK_IMPORTED_MODULE_1__["default"].post(api, JSON.stringify(params), config).then(function (data) { + if (data !== null && data !== void 0 && data.data) { + location.reload(); // Success: reload window. + } else { + console.warn( + // Error handling. + (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Are you sure you should be doing this?', 'instant-images')); + doReload(); + } + })["catch"](function (error) { + console.warn(error); + doReload(); + }); +} + +/** + * Reload window after 2 seconds. + */ +function doReload() { + setTimeout(function () { + location.reload(); // reload window. + }, 2000); +} + +/***/ }), + +/***/ "@wordpress/i18n": +/*!******************************!*\ + !*** external ["wp","i18n"] ***! + \******************************/ +/***/ ((module) => { + +module.exports = window["wp"]["i18n"]; + +/***/ }), + +/***/ "./node_modules/axios/lib/adapters/adapters.js": +/*!*****************************************************!*\ + !*** ./node_modules/axios/lib/adapters/adapters.js ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _http_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./http.js */ "./node_modules/axios/lib/helpers/null.js"); +/* harmony import */ var _xhr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./xhr.js */ "./node_modules/axios/lib/adapters/xhr.js"); +/* harmony import */ var _fetch_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fetch.js */ "./node_modules/axios/lib/adapters/fetch.js"); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); + + + + + + +const knownAdapters = { + http: _http_js__WEBPACK_IMPORTED_MODULE_0__["default"], + xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_1__["default"], + fetch: _fetch_js__WEBPACK_IMPORTED_MODULE_2__["default"] +} + +_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + Object.defineProperty(fn, 'name', {value}); + } catch (e) { + // eslint-disable-next-line no-empty + } + Object.defineProperty(fn, 'adapterName', {value}); + } +}); + +const renderReason = (reason) => `- ${reason}`; + +const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(adapter) || adapter === null || adapter === false; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + getAdapter: (adapters) => { + adapters = _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isArray(adapters) ? adapters : [adapters]; + + const {length} = adapters; + let nameOrAdapter; + let adapter; + + const rejectedReasons = {}; + + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; + + adapter = nameOrAdapter; + + if (!isResolvedHandle(nameOrAdapter)) { + adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + + if (adapter === undefined) { + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"](`Unknown adapter '${id}'`); + } + } + + if (adapter) { + break; + } + + rejectedReasons[id || '#' + i] = adapter; + } + + if (!adapter) { + + const reasons = Object.entries(rejectedReasons) + .map(([id, state]) => `adapter ${id} ` + + (state === false ? 'is not supported by the environment' : 'is not available in the build') + ); + + let s = length ? + (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : + 'as no adapter specified'; + + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"]( + `There is no suitable adapter to dispatch the request ` + s, + 'ERR_NOT_SUPPORT' + ); + } + + return adapter; + }, + adapters: knownAdapters +}); + + +/***/ }), + +/***/ "./node_modules/axios/lib/adapters/fetch.js": +/*!**************************************************!*\ + !*** ./node_modules/axios/lib/adapters/fetch.js ***! + \**************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); +/* harmony import */ var _helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/composeSignals.js */ "./node_modules/axios/lib/helpers/composeSignals.js"); +/* harmony import */ var _helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/trackStream.js */ "./node_modules/axios/lib/helpers/trackStream.js"); +/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); +/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../helpers/progressEventReducer.js */ "./node_modules/axios/lib/helpers/progressEventReducer.js"); +/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/resolveConfig.js */ "./node_modules/axios/lib/helpers/resolveConfig.js"); +/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/settle.js */ "./node_modules/axios/lib/core/settle.js"); + + + + + + + + + + +const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function'; +const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function'; + +// used only inside the fetch adapter +const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? + ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : + async (str) => new Uint8Array(await new Response(str).arrayBuffer()) +); + +const test = (fn, ...args) => { + try { + return !!fn(...args); + } catch (e) { + return false + } +} + +const supportsRequestStream = isReadableStreamSupported && test(() => { + let duplexAccessed = false; + + const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, { + body: new ReadableStream(), + method: 'POST', + get duplex() { + duplexAccessed = true; + return 'half'; + }, + }).headers.has('Content-Type'); + + return duplexAccessed && !hasContentType; +}); + +const DEFAULT_CHUNK_SIZE = 64 * 1024; + +const supportsResponseStream = isReadableStreamSupported && + test(() => _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReadableStream(new Response('').body)); + + +const resolvers = { + stream: supportsResponseStream && ((res) => res.body) +}; + +isFetchSupported && (((res) => { + ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => { + !resolvers[type] && (resolvers[type] = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(res[type]) ? (res) => res[type]() : + (_, config) => { + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](`Response type '${type}' is not supported`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT, config); + }) + }); +})(new Response)); + +const getBodyLength = async (body) => { + if (body == null) { + return 0; + } + + if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isBlob(body)) { + return body.size; + } + + if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isSpecCompliantForm(body)) { + const _request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, { + method: 'POST', + body, + }); + return (await _request.arrayBuffer()).byteLength; + } + + if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBufferView(body) || _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBuffer(body)) { + return body.byteLength; + } + + if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isURLSearchParams(body)) { + body = body + ''; + } + + if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(body)) { + return (await encodeText(body)).byteLength; + } +} + +const resolveBodyLength = async (headers, body) => { + const length = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(headers.getContentLength()); + + return length == null ? getBodyLength(body) : length; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isFetchSupported && (async (config) => { + let { + url, + method, + data, + signal, + cancelToken, + timeout, + onDownloadProgress, + onUploadProgress, + responseType, + headers, + withCredentials = 'same-origin', + fetchOptions + } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(config); + + responseType = responseType ? (responseType + '').toLowerCase() : 'text'; + + let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__["default"])([signal, cancelToken && cancelToken.toAbortSignal()], timeout); + + let request; + + const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { + composedSignal.unsubscribe(); + }); + + let requestContentLength; + + try { + if ( + onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' && + (requestContentLength = await resolveBodyLength(headers, data)) !== 0 + ) { + let _request = new Request(url, { + method: 'POST', + body: data, + duplex: "half" + }); + + let contentTypeHeader; + + if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { + headers.setContentType(contentTypeHeader) + } + + if (_request.body) { + const [onProgress, flush] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)( + requestContentLength, + (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onUploadProgress)) + ); + + data = (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); + } + } + + if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(withCredentials)) { + withCredentials = withCredentials ? 'include' : 'omit'; + } + + // Cloudflare Workers throws when credentials are defined + // see https://github.com/cloudflare/workerd/issues/902 + const isCredentialsSupported = "credentials" in Request.prototype; + request = new Request(url, { + ...fetchOptions, + signal: composedSignal, + method: method.toUpperCase(), + headers: headers.normalize().toJSON(), + body: data, + duplex: "half", + credentials: isCredentialsSupported ? withCredentials : undefined + }); + + let response = await fetch(request); + + const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); + + if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) { + const options = {}; + + ['status', 'statusText', 'headers'].forEach(prop => { + options[prop] = response[prop]; + }); + + const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length')); + + const [onProgress, flush] = onDownloadProgress && (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)( + responseContentLength, + (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onDownloadProgress), true) + ) || []; + + response = new Response( + (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { + flush && flush(); + unsubscribe && unsubscribe(); + }), + options + ); + } + + responseType = responseType || 'text'; + + let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].findKey(resolvers, responseType) || 'text'](response, config); + + !isStreamResponse && unsubscribe && unsubscribe(); + + return await new Promise((resolve, reject) => { + (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_7__["default"])(resolve, reject, { + data: responseData, + headers: _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].from(response.headers), + status: response.status, + statusText: response.statusText, + config, + request + }) + }) + } catch (err) { + unsubscribe && unsubscribe(); + + if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) { + throw Object.assign( + new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NETWORK, config, request), + { + cause: err.cause || err + } + ) + } + + throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(err, err && err.code, config, request); + } +})); + + + + +/***/ }), + +/***/ "./node_modules/axios/lib/adapters/xhr.js": +/*!************************************************!*\ + !*** ./node_modules/axios/lib/adapters/xhr.js ***! + \************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../core/settle.js */ "./node_modules/axios/lib/core/settle.js"); +/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaults/transitional.js */ "./node_modules/axios/lib/defaults/transitional.js"); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); +/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); +/* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../helpers/parseProtocol.js */ "./node_modules/axios/lib/helpers/parseProtocol.js"); +/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); +/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); +/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/progressEventReducer.js */ "./node_modules/axios/lib/helpers/progressEventReducer.js"); +/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/resolveConfig.js */ "./node_modules/axios/lib/helpers/resolveConfig.js"); + + + + + + + + + + + +const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported && function (config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_0__["default"])(config); + let requestData = _config.data; + const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(_config.headers).normalize(); + let {responseType, onUploadProgress, onDownloadProgress} = _config; + let onCanceled; + let uploadThrottled, downloadThrottled; + let flushUpload, flushDownload; + + function done() { + flushUpload && flushUpload(); // flush events + flushDownload && flushDownload(); // flush events + + _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); + + _config.signal && _config.signal.removeEventListener('abort', onCanceled); + } + + let request = new XMLHttpRequest(); + + request.open(_config.method.toUpperCase(), _config.url, true); + + // Set the request timeout in MS + request.timeout = _config.timeout; + + function onloadend() { + if (!request) { + return; + } + // Prepare the response + const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from( + 'getAllResponseHeaders' in request && request.getAllResponseHeaders() + ); + const responseData = !responseType || responseType === 'text' || responseType === 'json' ? + request.responseText : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config, + request + }; + + (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(function _resolve(value) { + resolve(value); + done(); + }, function _reject(err) { + reject(err); + done(); + }, response); + + // Clean up request + request = null; + } + + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } + + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } + + reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, config, request)); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_NETWORK, config, request)); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; + const transitional = _config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_4__["default"]; + if (_config.timeoutErrorMessage) { + timeoutErrorMessage = _config.timeoutErrorMessage; + } + reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]( + timeoutErrorMessage, + transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, + config, + request)); + + // Clean up request + request = null; + }; + + // Remove Content-Type if data is undefined + requestData === undefined && requestHeaders.setContentType(null); + + // Add headers to the request + if ('setRequestHeader' in request) { + _utils_js__WEBPACK_IMPORTED_MODULE_5__["default"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + }); + } + + // Add withCredentials to request if needed + if (!_utils_js__WEBPACK_IMPORTED_MODULE_5__["default"].isUndefined(_config.withCredentials)) { + request.withCredentials = !!_config.withCredentials; + } + + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = _config.responseType; + } + + // Handle progress if needed + if (onDownloadProgress) { + ([downloadThrottled, flushDownload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)(onDownloadProgress, true)); + request.addEventListener('progress', downloadThrottled); + } + + // Not all browsers support upload events + if (onUploadProgress && request.upload) { + ([uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)(onUploadProgress)); + + request.upload.addEventListener('progress', uploadThrottled); + + request.upload.addEventListener('loadend', flushUpload); + } + + if (_config.cancelToken || _config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = cancel => { + if (!request) { + return; + } + reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_7__["default"](null, config, request) : cancel); + request.abort(); + request = null; + }; + + _config.cancelToken && _config.cancelToken.subscribe(onCanceled); + if (_config.signal) { + _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); + } + } + + const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_config.url); + + if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_9__["default"].protocols.indexOf(protocol) === -1) { + reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Unsupported protocol ' + protocol + ':', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_BAD_REQUEST, config)); + return; + } + + + // Send the request + request.send(requestData || null); + }); +}); + + +/***/ }), + +/***/ "./node_modules/axios/lib/axios.js": +/*!*****************************************!*\ + !*** ./node_modules/axios/lib/axios.js ***! + \*****************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js"); +/* harmony import */ var _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/Axios.js */ "./node_modules/axios/lib/core/Axios.js"); +/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); +/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); +/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js"); +/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); +/* harmony import */ var _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cancel/CancelToken.js */ "./node_modules/axios/lib/cancel/CancelToken.js"); +/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js"); +/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./env/data.js */ "./node_modules/axios/lib/env/data.js"); +/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); +/* harmony import */ var _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/spread.js */ "./node_modules/axios/lib/helpers/spread.js"); +/* harmony import */ var _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/isAxiosError.js */ "./node_modules/axios/lib/helpers/isAxiosError.js"); +/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); +/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js"); +/* harmony import */ var _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers/HttpStatusCode.js */ "./node_modules/axios/lib/helpers/HttpStatusCode.js"); + + + + + + + + + + + + + + + + + + + + +/** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * + * @returns {Axios} A new instance of Axios + */ +function createInstance(defaultConfig) { + const context = new _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"](defaultConfig); + const instance = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.request, context); + + // Copy axios.prototype to instance + _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype, context, {allOwnKeys: true}); + + // Copy context to instance + _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, context, null, {allOwnKeys: true}); + + // Factory for creating new instances + instance.create = function create(instanceConfig) { + return createInstance((0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(defaultConfig, instanceConfig)); + }; + + return instance; +} + +// Create the default instance to be exported +const axios = createInstance(_defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"]); + +// Expose Axios class to allow class inheritance +axios.Axios = _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"]; + +// Expose Cancel & CancelToken +axios.CanceledError = _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__["default"]; +axios.CancelToken = _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__["default"]; +axios.isCancel = _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__["default"]; +axios.VERSION = _env_data_js__WEBPACK_IMPORTED_MODULE_8__.VERSION; +axios.toFormData = _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__["default"]; + +// Expose AxiosError class +axios.AxiosError = _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__["default"]; + +// alias for CanceledError for backward compatibility +axios.Cancel = axios.CanceledError; + +// Expose all/spread +axios.all = function all(promises) { + return Promise.all(promises); +}; + +axios.spread = _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__["default"]; + +// Expose isAxiosError +axios.isAxiosError = _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__["default"]; + +// Expose mergeConfig +axios.mergeConfig = _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"]; + +axios.AxiosHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__["default"]; + +axios.formToJSON = thing => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isHTMLForm(thing) ? new FormData(thing) : thing); + +axios.getAdapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__["default"].getAdapter; + +axios.HttpStatusCode = _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__["default"]; + +axios.default = axios; + +// this module should only have a default export +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (axios); + + +/***/ }), + +/***/ "./node_modules/axios/lib/cancel/CancelToken.js": +/*!******************************************************!*\ + !*** ./node_modules/axios/lib/cancel/CancelToken.js ***! + \******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); + + + + +/** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @param {Function} executor The executor function. + * + * @returns {CancelToken} + */ +class CancelToken { + constructor(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + let resolvePromise; + + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + const token = this; + + // eslint-disable-next-line func-names + this.promise.then(cancel => { + if (!token._listeners) return; + + let i = token._listeners.length; + + while (i-- > 0) { + token._listeners[i](cancel); + } + token._listeners = null; + }); + + // eslint-disable-next-line func-names + this.promise.then = onfulfilled => { + let _resolve; + // eslint-disable-next-line func-names + const promise = new Promise(resolve => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + + promise.cancel = function reject() { + token.unsubscribe(_resolve); + }; + + return promise; + }; + + executor(function cancel(message, config, request) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](message, config, request); + resolvePromise(token.reason); + }); + } + + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) { + throw this.reason; + } + } + + /** + * Subscribe to the cancel signal + */ + + subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } + } + + /** + * Unsubscribe from the cancel signal + */ + + unsubscribe(listener) { + if (!this._listeners) { + return; + } + const index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } + } + + toAbortSignal() { + const controller = new AbortController(); + + const abort = (err) => { + controller.abort(err); + }; + + this.subscribe(abort); + + controller.signal.unsubscribe = () => this.unsubscribe(abort); + + return controller.signal; + } + + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + const token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token, + cancel + }; + } +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CancelToken); + + +/***/ }), + +/***/ "./node_modules/axios/lib/cancel/CanceledError.js": +/*!********************************************************!*\ + !*** ./node_modules/axios/lib/cancel/CanceledError.js ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); + + + + + +/** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ +function CanceledError(message, config, request) { + // eslint-disable-next-line no-eq-null,eqeqeq + _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, message == null ? 'canceled' : message, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_CANCELED, config, request); + this.name = 'CanceledError'; +} + +_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].inherits(CanceledError, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"], { + __CANCEL__: true +}); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CanceledError); + + +/***/ }), + +/***/ "./node_modules/axios/lib/cancel/isCancel.js": +/*!***************************************************!*\ + !*** ./node_modules/axios/lib/cancel/isCancel.js ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ isCancel) +/* harmony export */ }); + + +function isCancel(value) { + return !!(value && value.__CANCEL__); +} + + +/***/ }), + +/***/ "./node_modules/axios/lib/core/Axios.js": +/*!**********************************************!*\ + !*** ./node_modules/axios/lib/core/Axios.js ***! + \**********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js"); +/* harmony import */ var _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InterceptorManager.js */ "./node_modules/axios/lib/core/InterceptorManager.js"); +/* harmony import */ var _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dispatchRequest.js */ "./node_modules/axios/lib/core/dispatchRequest.js"); +/* harmony import */ var _mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); +/* harmony import */ var _buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js"); +/* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/validator.js */ "./node_modules/axios/lib/helpers/validator.js"); +/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); + + + + + + + + + + + +const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].validators; + +/** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + * + * @return {Axios} A new instance of Axios + */ +class Axios { + constructor(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"](), + response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"]() + }; + } + + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + async request(configOrUrl, config) { + try { + return await this._request(configOrUrl, config); + } catch (err) { + if (err instanceof Error) { + let dummy; + + Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error()); + + // slice off the Error: ... line + const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; + try { + if (!err.stack) { + err.stack = stack; + // match without the 2 top stack lines + } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) { + err.stack += '\n' + stack + } + } catch (e) { + // ignore the case where "stack" is an un-writable property + } + } + + throw err; + } + } + + _request(configOrUrl, config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof configOrUrl === 'string') { + config = config || {}; + config.url = configOrUrl; + } else { + config = configOrUrl || {}; + } + + config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config); + + const {transitional, paramsSerializer, headers} = config; + + if (transitional !== undefined) { + _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(transitional, { + silentJSONParsing: validators.transitional(validators.boolean), + forcedJSONParsing: validators.transitional(validators.boolean), + clarifyTimeoutError: validators.transitional(validators.boolean) + }, false); + } + + if (paramsSerializer != null) { + if (_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(paramsSerializer)) { + config.paramsSerializer = { + serialize: paramsSerializer + } + } else { + _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(paramsSerializer, { + encode: validators.function, + serialize: validators.function + }, true); + } + } + + // Set config.method + config.method = (config.method || this.defaults.method || 'get').toLowerCase(); + + // Flatten headers + let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].merge( + headers.common, + headers[config.method] + ); + + headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach( + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], + (method) => { + delete headers[method]; + } + ); + + config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].concat(contextHeaders, headers); + + // filter out skipped interceptors + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { + return; + } + + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + }); + + const responseInterceptorChain = []; + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); + + let promise; + let i = 0; + let len; + + if (!synchronousRequestInterceptors) { + const chain = [_dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].bind(this), undefined]; + chain.unshift.apply(chain, requestInterceptorChain); + chain.push.apply(chain, responseInterceptorChain); + len = chain.length; + + promise = Promise.resolve(config); + + while (i < len) { + promise = promise.then(chain[i++], chain[i++]); + } + + return promise; + } + + len = requestInterceptorChain.length; + + let newConfig = config; + + i = 0; + + while (i < len) { + const onFulfilled = requestInterceptorChain[i++]; + const onRejected = requestInterceptorChain[i++]; + try { + newConfig = onFulfilled(newConfig); + } catch (error) { + onRejected.call(this, error); + break; + } + } + + try { + promise = _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].call(this, newConfig); + } catch (error) { + return Promise.reject(error); + } + + i = 0; + len = responseInterceptorChain.length; + + while (i < len) { + promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); + } + + return promise; + } + + getUri(config) { + config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config); + const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__["default"])(config.baseURL, config.url); + return (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(fullPath, config.params, config.paramsSerializer); + } +} + +// Provide aliases for supported request methods +_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, config) { + return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, { + method, + url, + data: (config || {}).data + })); + }; +}); + +_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + /*eslint func-names:0*/ + + function generateHTTPMethod(isForm) { + return function httpMethod(url, data, config) { + return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, { + method, + headers: isForm ? { + 'Content-Type': 'multipart/form-data' + } : {}, + url, + data + })); + }; + } + + Axios.prototype[method] = generateHTTPMethod(); + + Axios.prototype[method + 'Form'] = generateHTTPMethod(true); +}); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Axios); + + +/***/ }), + +/***/ "./node_modules/axios/lib/core/AxiosError.js": +/*!***************************************************!*\ + !*** ./node_modules/axios/lib/core/AxiosError.js ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); + + + + +/** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ +function AxiosError(message, code, config, request, response) { + Error.call(this); + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = (new Error()).stack; + } + + this.message = message; + this.name = 'AxiosError'; + code && (this.code = code); + config && (this.config = config); + request && (this.request = request); + if (response) { + this.response = response; + this.status = response.status ? response.status : null; + } +} + +_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].inherits(AxiosError, Error, { + toJSON: function toJSON() { + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(this.config), + code: this.code, + status: this.status + }; + } +}); + +const prototype = AxiosError.prototype; +const descriptors = {}; + +[ + 'ERR_BAD_OPTION_VALUE', + 'ERR_BAD_OPTION', + 'ECONNABORTED', + 'ETIMEDOUT', + 'ERR_NETWORK', + 'ERR_FR_TOO_MANY_REDIRECTS', + 'ERR_DEPRECATED', + 'ERR_BAD_RESPONSE', + 'ERR_BAD_REQUEST', + 'ERR_CANCELED', + 'ERR_NOT_SUPPORT', + 'ERR_INVALID_URL' +// eslint-disable-next-line func-names +].forEach(code => { + descriptors[code] = {value: code}; +}); + +Object.defineProperties(AxiosError, descriptors); +Object.defineProperty(prototype, 'isAxiosError', {value: true}); + +// eslint-disable-next-line func-names +AxiosError.from = (error, code, config, request, response, customProps) => { + const axiosError = Object.create(prototype); + + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(error, axiosError, function filter(obj) { + return obj !== Error.prototype; + }, prop => { + return prop !== 'isAxiosError'; + }); + + AxiosError.call(axiosError, error.message, code, config, request, response); + + axiosError.cause = error; + + axiosError.name = error.name; + + customProps && Object.assign(axiosError, customProps); + + return axiosError; +}; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError); + + +/***/ }), + +/***/ "./node_modules/axios/lib/core/AxiosHeaders.js": +/*!*****************************************************!*\ + !*** ./node_modules/axios/lib/core/AxiosHeaders.js ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/parseHeaders.js */ "./node_modules/axios/lib/helpers/parseHeaders.js"); + + + + + +const $internals = Symbol('internals'); + +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); +} + +function normalizeValue(value) { + if (value === false || value == null) { + return value; + } + + return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : String(value); +} + +function parseTokens(str) { + const tokens = Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match; + + while ((match = tokensRE.exec(str))) { + tokens[match[1]] = match[2]; + } + + return tokens; +} + +const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); + +function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(filter)) { + return filter.call(this, value, header); + } + + if (isHeaderNameFilter) { + value = header; + } + + if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(value)) return; + + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(filter)) { + return value.indexOf(filter) !== -1; + } + + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(filter)) { + return filter.test(value); + } +} + +function formatHeader(header) { + return header.trim() + .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; + }); +} + +function buildAccessors(obj, header) { + const accessorName = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toCamelCase(' ' + header); + + ['get', 'set', 'has'].forEach(methodName => { + Object.defineProperty(obj, methodName + accessorName, { + value: function(arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true + }); + }); +} + +class AxiosHeaders { + constructor(headers) { + headers && this.set(headers); + } + + set(header, valueOrRewrite, rewrite) { + const self = this; + + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); + + if (!lHeader) { + throw new Error('header name must be a non-empty string'); + } + + const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, lHeader); + + if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { + self[key || _header] = normalizeValue(_value); + } + } + + const setHeaders = (headers, _rewrite) => + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); + + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite) + } else if(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"])(header), valueOrRewrite); + } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHeaders(header)) { + for (const [key, value] of header.entries()) { + setHeader(value, key, rewrite); + } + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); + } + + return this; + } + + get(header, parser) { + header = normalizeHeader(header); + + if (header) { + const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header); + + if (key) { + const value = this[key]; + + if (!parser) { + return value; + } + + if (parser === true) { + return parseTokens(value); + } + + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(parser)) { + return parser.call(this, value, key); + } + + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(parser)) { + return parser.exec(value); + } + + throw new TypeError('parser must be boolean|regexp|function'); + } + } + } + + has(header, matcher) { + header = normalizeHeader(header); + + if (header) { + const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header); + + return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); + } + + return false; + } + + delete(header, matcher) { + const self = this; + let deleted = false; + + function deleteHeader(_header) { + _header = normalizeHeader(_header); + + if (_header) { + const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, _header); + + if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { + delete self[key]; + + deleted = true; + } + } + } + + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); + } + + return deleted; + } + + clear(matcher) { + const keys = Object.keys(this); + let i = keys.length; + let deleted = false; + + while (i--) { + const key = keys[i]; + if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; + } + } + + return deleted; + } + + normalize(format) { + const self = this; + const headers = {}; + + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => { + const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(headers, header); + + if (key) { + self[key] = normalizeValue(value); + delete self[header]; + return; + } + + const normalized = format ? formatHeader(header) : String(header).trim(); + + if (normalized !== header) { + delete self[header]; + } + + self[normalized] = normalizeValue(value); + + headers[normalized] = true; + }); + + return this; + } + + concat(...targets) { + return this.constructor.concat(this, ...targets); + } + + toJSON(asStrings) { + const obj = Object.create(null); + + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => { + value != null && value !== false && (obj[header] = asStrings && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.join(', ') : value); + }); + + return obj; + } + + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + + toString() { + return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); + } + + get [Symbol.toStringTag]() { + return 'AxiosHeaders'; + } + + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } + + static concat(first, ...targets) { + const computed = new this(first); + + targets.forEach((target) => computed.set(target)); + + return computed; + } + + static accessor(header) { + const internals = this[$internals] = (this[$internals] = { + accessors: {} + }); + + const accessors = internals.accessors; + const prototype = this.prototype; + + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + + if (!accessors[lHeader]) { + buildAccessors(prototype, _header); + accessors[lHeader] = true; + } + } + + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + + return this; + } +} + +AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); + +// reserved names hotfix +_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; + } + } +}); + +_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosHeaders); + + +/***/ }), + +/***/ "./node_modules/axios/lib/core/InterceptorManager.js": +/*!***********************************************************!*\ + !*** ./node_modules/axios/lib/core/InterceptorManager.js ***! + \***********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); + + + + +class InterceptorManager { + constructor() { + this.handlers = []; + } + + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + this.handlers.push({ + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }); + return this.handlers.length - 1; + } + + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise + */ + eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } + } + + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; + } + } + + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + } +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InterceptorManager); + + +/***/ }), + +/***/ "./node_modules/axios/lib/core/buildFullPath.js": +/*!******************************************************!*\ + !*** ./node_modules/axios/lib/core/buildFullPath.js ***! + \******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ buildFullPath) +/* harmony export */ }); +/* harmony import */ var _helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/isAbsoluteURL.js */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js"); +/* harmony import */ var _helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/combineURLs.js */ "./node_modules/axios/lib/helpers/combineURLs.js"); + + + + + +/** + * Creates a new URL by combining the baseURL with the requestedURL, + * only when the requestedURL is not already an absolute URL. + * If the requestURL is absolute, this function returns the requestedURL untouched. + * + * @param {string} baseURL The base URL + * @param {string} requestedURL Absolute or relative URL to combine + * + * @returns {string} The combined full path + */ +function buildFullPath(baseURL, requestedURL) { + if (baseURL && !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL)) { + return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL); + } + return requestedURL; +} + + +/***/ }), + +/***/ "./node_modules/axios/lib/core/dispatchRequest.js": +/*!********************************************************!*\ + !*** ./node_modules/axios/lib/core/dispatchRequest.js ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ dispatchRequest) +/* harmony export */ }); +/* harmony import */ var _transformData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transformData.js */ "./node_modules/axios/lib/core/transformData.js"); +/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js"); +/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); +/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); +/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); +/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js"); + + + + + + + + + +/** + * Throws a `CanceledError` if cancellation has been requested. + * + * @param {Object} config The config that is to be used for the request + * + * @returns {void} + */ +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + + if (config.signal && config.signal.aborted) { + throw new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](null, config); + } +} + +/** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * + * @returns {Promise} The Promise to be fulfilled + */ +function dispatchRequest(config) { + throwIfCancellationRequested(config); + + config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(config.headers); + + // Transform request data + config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( + config, + config.transformRequest + ); + + if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { + config.headers.setContentType('application/x-www-form-urlencoded', false); + } + + const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].adapter); + + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( + config, + config.transformResponse, + response + ); + + response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(response.headers); + + return response; + }, function onAdapterRejection(reason) { + if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__["default"])(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( + config, + config.transformResponse, + reason.response + ); + reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(reason.response.headers); + } + } + + return Promise.reject(reason); + }); +} + + +/***/ }), + +/***/ "./node_modules/axios/lib/core/mergeConfig.js": +/*!****************************************************!*\ + !*** ./node_modules/axios/lib/core/mergeConfig.js ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ mergeConfig) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); + + + + + +const headersToObject = (thing) => thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? { ...thing } : thing; + +/** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * + * @returns {Object} New object resulting from merging config2 to config1 + */ +function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config2 = config2 || {}; + const config = {}; + + function getMergedValue(target, source, caseless) { + if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) { + return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call({caseless}, target, source); + } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) { + return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge({}, source); + } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArray(source)) { + return source.slice(); + } + return source; + } + + // eslint-disable-next-line consistent-return + function mergeDeepProperties(a, b, caseless) { + if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { + return getMergedValue(a, b, caseless); + } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) { + return getMergedValue(undefined, a, caseless); + } + } + + // eslint-disable-next-line consistent-return + function valueFromConfig2(a, b) { + if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { + return getMergedValue(undefined, b); + } + } + + // eslint-disable-next-line consistent-return + function defaultToConfig2(a, b) { + if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { + return getMergedValue(undefined, b); + } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) { + return getMergedValue(undefined, a); + } + } + + // eslint-disable-next-line consistent-return + function mergeDirectKeys(a, b, prop) { + if (prop in config2) { + return getMergedValue(a, b); + } else if (prop in config1) { + return getMergedValue(undefined, a); + } + } + + const mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + withXSRFToken: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true) + }; + + _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { + const merge = mergeMap[prop] || mergeDeepProperties; + const configValue = merge(config1[prop], config2[prop], prop); + (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); + }); + + return config; +} + + +/***/ }), + +/***/ "./node_modules/axios/lib/core/settle.js": +/*!***********************************************!*\ + !*** ./node_modules/axios/lib/core/settle.js ***! + \***********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ settle) +/* harmony export */ }); +/* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); + + + + +/** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + * + * @returns {object} The response. + */ +function settle(resolve, reject, response) { + const validateStatus = response.config.validateStatus; + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"]( + 'Request failed with status code ' + response.status, + [_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST, _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], + response.config, + response.request, + response + )); + } +} + + +/***/ }), + +/***/ "./node_modules/axios/lib/core/transformData.js": +/*!******************************************************!*\ + !*** ./node_modules/axios/lib/core/transformData.js ***! + \******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ transformData) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); +/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); + + + + + + +/** + * Transform the data for a request or a response + * + * @param {Array|Function} fns A single function or Array of functions + * @param {?Object} response The response object + * + * @returns {*} The resulting transformed data + */ +function transformData(fns, response) { + const config = this || _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__["default"]; + const context = response || config; + const headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(context.headers); + let data = context.data; + + _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(fns, function transform(fn) { + data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); + }); + + headers.normalize(); + + return data; +} + + +/***/ }), + +/***/ "./node_modules/axios/lib/defaults/index.js": +/*!**************************************************!*\ + !*** ./node_modules/axios/lib/defaults/index.js ***! + \**************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); +/* harmony import */ var _transitional_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transitional.js */ "./node_modules/axios/lib/defaults/transitional.js"); +/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); +/* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/toURLEncodedForm.js */ "./node_modules/axios/lib/helpers/toURLEncodedForm.js"); +/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); +/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js"); + + + + + + + + + + +/** + * It takes a string, tries to parse it, and if it fails, it returns the stringified version + * of the input + * + * @param {any} rawValue - The value to be stringified. + * @param {Function} parser - A function that parses a string into a JavaScript object. + * @param {Function} encoder - A function that takes a value and returns a string. + * + * @returns {string} A stringified version of the rawValue. + */ +function stringifySafely(rawValue, parser, encoder) { + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].trim(rawValue); + } catch (e) { + if (e.name !== 'SyntaxError') { + throw e; + } + } + } + + return (encoder || JSON.stringify)(rawValue); +} + +const defaults = { + + transitional: _transitional_js__WEBPACK_IMPORTED_MODULE_1__["default"], + + adapter: ['xhr', 'http', 'fetch'], + + transformRequest: [function transformRequest(data, headers) { + const contentType = headers.getContentType() || ''; + const hasJSONContentType = contentType.indexOf('application/json') > -1; + const isObjectPayload = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(data); + + if (isObjectPayload && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(data)) { + data = new FormData(data); + } + + const isFormData = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(data); + + if (isFormData) { + return hasJSONContentType ? JSON.stringify((0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__["default"])(data)) : data; + } + + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(data) || + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(data) || + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStream(data) || + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFile(data) || + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(data) || + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data) + ) { + return data; + } + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBufferView(data)) { + return data.buffer; + } + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(data)) { + headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); + return data.toString(); + } + + let isFileList; + + if (isObjectPayload) { + if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { + return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__["default"])(data, this.formSerializer).toString(); + } + + if ((isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { + const _FormData = this.env && this.env.FormData; + + return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__["default"])( + isFileList ? {'files[]': data} : data, + _FormData && new _FormData(), + this.formSerializer + ); + } + } + + if (isObjectPayload || hasJSONContentType ) { + headers.setContentType('application/json', false); + return stringifySafely(data); + } + + return data; + }], + + transformResponse: [function transformResponse(data) { + const transitional = this.transitional || defaults.transitional; + const forcedJSONParsing = transitional && transitional.forcedJSONParsing; + const JSONRequested = this.responseType === 'json'; + + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isResponse(data) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)) { + return data; + } + + if (data && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { + const silentJSONParsing = transitional && transitional.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; + + try { + return JSON.parse(data); + } catch (e) { + if (strictJSONParsing) { + if (e.name === 'SyntaxError') { + throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].ERR_BAD_RESPONSE, this, null, this.response); + } + throw e; + } + } + } + + return data; + }], + + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + maxBodyLength: -1, + + env: { + FormData: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.FormData, + Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.Blob + }, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + + headers: { + common: { + 'Accept': 'application/json, text/plain, */*', + 'Content-Type': undefined + } + } +}; + +_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { + defaults.headers[method] = {}; +}); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); + + +/***/ }), + +/***/ "./node_modules/axios/lib/defaults/transitional.js": +/*!*********************************************************!*\ + !*** ./node_modules/axios/lib/defaults/transitional.js ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false +}); + + +/***/ }), + +/***/ "./node_modules/axios/lib/env/data.js": +/*!********************************************!*\ + !*** ./node_modules/axios/lib/env/data.js ***! + \********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ VERSION: () => (/* binding */ VERSION) +/* harmony export */ }); +const VERSION = "1.7.7"; + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js": +/*!****************************************************************!*\ + !*** ./node_modules/axios/lib/helpers/AxiosURLSearchParams.js ***! + \****************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); + + + + +/** + * It encodes a string by replacing all characters that are not in the unreserved set with + * their percent-encoded equivalents + * + * @param {string} str - The string to encode. + * + * @returns {string} The encoded string. + */ +function encode(str) { + const charMap = { + '!': '%21', + "'": '%27', + '(': '%28', + ')': '%29', + '~': '%7E', + '%20': '+', + '%00': '\x00' + }; + return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { + return charMap[match]; + }); +} + +/** + * It takes a params object and converts it to a FormData object + * + * @param {Object} params - The parameters to be converted to a FormData object. + * @param {Object} options - The options object passed to the Axios constructor. + * + * @returns {void} + */ +function AxiosURLSearchParams(params, options) { + this._pairs = []; + + params && (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, this, options); +} + +const prototype = AxiosURLSearchParams.prototype; + +prototype.append = function append(name, value) { + this._pairs.push([name, value]); +}; + +prototype.toString = function toString(encoder) { + const _encode = encoder ? function(value) { + return encoder.call(this, value, encode); + } : encode; + + return this._pairs.map(function each(pair) { + return _encode(pair[0]) + '=' + _encode(pair[1]); + }, '').join('&'); +}; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosURLSearchParams); + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/HttpStatusCode.js": +/*!**********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/HttpStatusCode.js ***! + \**********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +const HttpStatusCode = { + Continue: 100, + SwitchingProtocols: 101, + Processing: 102, + EarlyHints: 103, + Ok: 200, + Created: 201, + Accepted: 202, + NonAuthoritativeInformation: 203, + NoContent: 204, + ResetContent: 205, + PartialContent: 206, + MultiStatus: 207, + AlreadyReported: 208, + ImUsed: 226, + MultipleChoices: 300, + MovedPermanently: 301, + Found: 302, + SeeOther: 303, + NotModified: 304, + UseProxy: 305, + Unused: 306, + TemporaryRedirect: 307, + PermanentRedirect: 308, + BadRequest: 400, + Unauthorized: 401, + PaymentRequired: 402, + Forbidden: 403, + NotFound: 404, + MethodNotAllowed: 405, + NotAcceptable: 406, + ProxyAuthenticationRequired: 407, + RequestTimeout: 408, + Conflict: 409, + Gone: 410, + LengthRequired: 411, + PreconditionFailed: 412, + PayloadTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + UnprocessableEntity: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, +}; + +Object.entries(HttpStatusCode).forEach(([key, value]) => { + HttpStatusCode[value] = key; +}); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HttpStatusCode); + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/bind.js": +/*!************************************************!*\ + !*** ./node_modules/axios/lib/helpers/bind.js ***! + \************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ bind) +/* harmony export */ }); + + +function bind(fn, thisArg) { + return function wrap() { + return fn.apply(thisArg, arguments); + }; +} + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/buildURL.js": +/*!****************************************************!*\ + !*** ./node_modules/axios/lib/helpers/buildURL.js ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ buildURL) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js"); + + + + + +/** + * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their + * URI encoded counterparts + * + * @param {string} val The value to be encoded. + * + * @returns {string} The encoded value. + */ +function encode(val) { + return encodeURIComponent(val). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, '+'). + replace(/%5B/gi, '['). + replace(/%5D/gi, ']'); +} + +/** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @param {?object} options + * + * @returns {string} The formatted url + */ +function buildURL(url, params, options) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + const _encode = options && options.encode || encode; + + const serializeFn = options && options.serialize; + + let serializedParams; + + if (serializeFn) { + serializedParams = serializeFn(params, options); + } else { + serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(params) ? + params.toString() : + new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"](params, options).toString(_encode); + } + + if (serializedParams) { + const hashmarkIndex = url.indexOf("#"); + + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); + } + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; +} + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/combineURLs.js": +/*!*******************************************************!*\ + !*** ./node_modules/axios/lib/helpers/combineURLs.js ***! + \*******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ combineURLs) +/* harmony export */ }); + + +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * + * @returns {string} The combined URL + */ +function combineURLs(baseURL, relativeURL) { + return relativeURL + ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') + : baseURL; +} + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/composeSignals.js": +/*!**********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/composeSignals.js ***! + \**********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); + + + + +const composeSignals = (signals, timeout) => { + const {length} = (signals = signals ? signals.filter(Boolean) : []); + + if (timeout || length) { + let controller = new AbortController(); + + let aborted; + + const onabort = function (reason) { + if (!aborted) { + aborted = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort(err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? err : new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_1__["default"](err instanceof Error ? err.message : err)); + } + } + + let timer = timeout && setTimeout(() => { + timer = null; + onabort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](`timeout ${timeout} of ms exceeded`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ETIMEDOUT)) + }, timeout) + + const unsubscribe = () => { + if (signals) { + timer && clearTimeout(timer); + timer = null; + signals.forEach(signal => { + signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort); + }); + signals = null; + } + } + + signals.forEach((signal) => signal.addEventListener('abort', onabort)); + + const {signal} = controller; + + signal.unsubscribe = () => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(unsubscribe); + + return signal; + } +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (composeSignals); + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/cookies.js": +/*!***************************************************!*\ + !*** ./node_modules/axios/lib/helpers/cookies.js ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ? + + // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain, secure) { + const cookie = [name + '=' + encodeURIComponent(value)]; + + _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); + + _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(path) && cookie.push('path=' + path); + + _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(domain) && cookie.push('domain=' + domain); + + secure === true && cookie.push('secure'); + + document.cookie = cookie.join('; '); + }, + + read(name) { + const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove(name) { + this.write(name, '', Date.now() - 86400000); + } + } + + : + + // Non-standard browser env (web workers, react-native) lack needed support. + { + write() {}, + read() { + return null; + }, + remove() {} + }); + + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/formDataToJSON.js": +/*!**********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/formDataToJSON.js ***! + \**********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); + + + + +/** + * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] + * + * @param {string} name - The name of the property to get. + * + * @returns An array of strings. + */ +function parsePropPath(name) { + // foo[x][y][z] + // foo.x.y.z + // foo-x-y-z + // foo x y z + return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map(match => { + return match[0] === '[]' ? '' : match[1] || match[0]; + }); +} + +/** + * Convert an array to an object. + * + * @param {Array} arr - The array to convert to an object. + * + * @returns An object with the same keys and values as the array. + */ +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i; + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + obj[key] = arr[key]; + } + return obj; +} + +/** + * It takes a FormData object and returns a JavaScript object + * + * @param {string} formData The FormData object to convert to JSON. + * + * @returns {Object | null} The converted object. + */ +function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + let name = path[index++]; + + if (name === '__proto__') return true; + + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = !name && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target) ? target.length : name; + + if (isLast) { + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name)) { + target[name] = [target[name], value]; + } else { + target[name] = value; + } + + return !isNumericKey; + } + + if (!target[name] || !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(target[name])) { + target[name] = []; + } + + const result = buildPath(path, value, target[name], index); + + if (result && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target[name])) { + target[name] = arrayToObject(target[name]); + } + + return !isNumericKey; + } + + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(formData) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(formData.entries)) { + const obj = {}; + + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); + + return obj; + } + + return null; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (formDataToJSON); + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js": +/*!*********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ isAbsoluteURL) +/* harmony export */ }); + + +/** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); +} + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/isAxiosError.js": +/*!********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/isAxiosError.js ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ isAxiosError) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); + + + + +/** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ +function isAxiosError(payload) { + return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(payload) && (payload.isAxiosError === true); +} + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js": +/*!***********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***! + \***********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ? + +// Standard browser envs have full support of the APIs needed to test +// whether the request URL is of the same origin as current location. + (function standardBrowserEnv() { + const msie = _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent); + const urlParsingNode = document.createElement('a'); + let originURL; + + /** + * Parse a URL to discover its components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + let href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') ? + urlParsingNode.pathname : + '/' + urlParsingNode.pathname + }; + } + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + const parsed = (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(requestURL)) ? resolveURL(requestURL) : requestURL; + return (parsed.protocol === originURL.protocol && + parsed.host === originURL.host); + }; + })() : + + // Non standard browser envs (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + })()); + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/null.js": +/*!************************************************!*\ + !*** ./node_modules/axios/lib/helpers/null.js ***! + \************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +// eslint-disable-next-line strict +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (null); + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/parseHeaders.js": +/*!********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); + + + + +// RawAxiosHeaders whose duplicates are ignored by node +// c.f. https://nodejs.org/api/http.html#http_message_headers +const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toObjectSet([ + 'age', 'authorization', 'content-length', 'content-type', 'etag', + 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', + 'last-modified', 'location', 'max-forwards', 'proxy-authorization', + 'referer', 'retry-after', 'user-agent' +]); + +/** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} rawHeaders Headers needing to be parsed + * + * @returns {Object} Headers parsed into an object + */ +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rawHeaders => { + const parsed = {}; + let key; + let val; + let i; + + rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { + i = line.indexOf(':'); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); + + if (!key || (parsed[key] && ignoreDuplicateOf[key])) { + return; + } + + if (key === 'set-cookie') { + if (parsed[key]) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + }); + + return parsed; +}); + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/parseProtocol.js": +/*!*********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/parseProtocol.js ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ parseProtocol) +/* harmony export */ }); + + +function parseProtocol(url) { + const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); + return match && match[1] || ''; +} + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/progressEventReducer.js": +/*!****************************************************************!*\ + !*** ./node_modules/axios/lib/helpers/progressEventReducer.js ***! + \****************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ asyncDecorator: () => (/* binding */ asyncDecorator), +/* harmony export */ progressEventDecorator: () => (/* binding */ progressEventDecorator), +/* harmony export */ progressEventReducer: () => (/* binding */ progressEventReducer) +/* harmony export */ }); +/* harmony import */ var _speedometer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./speedometer.js */ "./node_modules/axios/lib/helpers/speedometer.js"); +/* harmony import */ var _throttle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./throttle.js */ "./node_modules/axios/lib/helpers/throttle.js"); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); + + + + +const progressEventReducer = (listener, isDownloadStream, freq = 3) => { + let bytesNotified = 0; + const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250); + + return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e => { + const loaded = e.loaded; + const total = e.lengthComputable ? e.total : undefined; + const progressBytes = loaded - bytesNotified; + const rate = _speedometer(progressBytes); + const inRange = loaded <= total; + + bytesNotified = loaded; + + const data = { + loaded, + total, + progress: total ? (loaded / total) : undefined, + bytes: progressBytes, + rate: rate ? rate : undefined, + estimated: rate && total && inRange ? (total - loaded) / rate : undefined, + event: e, + lengthComputable: total != null, + [isDownloadStream ? 'download' : 'upload']: true + }; + + listener(data); + }, freq); +} + +const progressEventDecorator = (total, throttled) => { + const lengthComputable = total != null; + + return [(loaded) => throttled[0]({ + lengthComputable, + total, + loaded + }), throttled[1]]; +} + +const asyncDecorator = (fn) => (...args) => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(() => fn(...args)); + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/resolveConfig.js": +/*!*********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/resolveConfig.js ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./isURLSameOrigin.js */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js"); +/* harmony import */ var _cookies_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cookies.js */ "./node_modules/axios/lib/helpers/cookies.js"); +/* harmony import */ var _core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js"); +/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); +/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); +/* harmony import */ var _buildURL_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js"); + + + + + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((config) => { + const newConfig = (0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, config); + + let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig; + + newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(headers); + + newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__["default"])(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer); + + // HTTP basic authentication + if (auth) { + headers.set('Authorization', 'Basic ' + + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')) + ); + } + + let contentType; + + if (_utils_js__WEBPACK_IMPORTED_MODULE_4__["default"].isFormData(data)) { + if (_platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserWebWorkerEnv) { + headers.setContentType(undefined); // Let the browser set it + } else if ((contentType = headers.getContentType()) !== false) { + // fix semicolon duplication issue for ReactNative FormData implementation + const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; + headers.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); + } + } + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + + if (_platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserEnv) { + withXSRFToken && _utils_js__WEBPACK_IMPORTED_MODULE_4__["default"].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); + + if (withXSRFToken || (withXSRFToken !== false && (0,_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_6__["default"])(newConfig.url))) { + // Add xsrf header + const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__WEBPACK_IMPORTED_MODULE_7__["default"].read(xsrfCookieName); + + if (xsrfValue) { + headers.set(xsrfHeaderName, xsrfValue); + } + } + } + + return newConfig; +}); + + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/speedometer.js": +/*!*******************************************************!*\ + !*** ./node_modules/axios/lib/helpers/speedometer.js ***! + \*******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); + + +/** + * Calculate data maxRate + * @param {Number} [samplesCount= 10] + * @param {Number} [min= 1000] + * @returns {Function} + */ +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + + min = min !== undefined ? min : 1000; + + return function push(chunkLength) { + const now = Date.now(); + + const startedAt = timestamps[tail]; + + if (!firstSampleTS) { + firstSampleTS = now; + } + + bytes[head] = chunkLength; + timestamps[head] = now; + + let i = tail; + let bytesCount = 0; + + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; + } + + head = (head + 1) % samplesCount; + + if (head === tail) { + tail = (tail + 1) % samplesCount; + } + + if (now - firstSampleTS < min) { + return; + } + + const passed = startedAt && now - startedAt; + + return passed ? Math.round(bytesCount * 1000 / passed) : undefined; + }; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (speedometer); + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/spread.js": +/*!**************************************************!*\ + !*** ./node_modules/axios/lib/helpers/spread.js ***! + \**************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ spread) +/* harmony export */ }); + + +/** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * + * @returns {Function} + */ +function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; +} + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/throttle.js": +/*!****************************************************!*\ + !*** ./node_modules/axios/lib/helpers/throttle.js ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Throttle decorator + * @param {Function} fn + * @param {Number} freq + * @return {Function} + */ +function throttle(fn, freq) { + let timestamp = 0; + let threshold = 1000 / freq; + let lastArgs; + let timer; + + const invoke = (args, now = Date.now()) => { + timestamp = now; + lastArgs = null; + if (timer) { + clearTimeout(timer); + timer = null; + } + fn.apply(null, args); + } + + const throttled = (...args) => { + const now = Date.now(); + const passed = now - timestamp; + if ( passed >= threshold) { + invoke(args, now); + } else { + lastArgs = args; + if (!timer) { + timer = setTimeout(() => { + timer = null; + invoke(lastArgs) + }, threshold - passed); + } + } + } + + const flush = () => lastArgs && invoke(lastArgs); + + return [throttled, flush]; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (throttle); + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/toFormData.js": +/*!******************************************************!*\ + !*** ./node_modules/axios/lib/helpers/toFormData.js ***! + \******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); +/* harmony import */ var _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/node/classes/FormData.js */ "./node_modules/axios/lib/helpers/null.js"); + + + + +// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored + + +/** + * Determines if the given thing is a array or js object. + * + * @param {string} thing - The object or array to be visited. + * + * @returns {boolean} + */ +function isVisitable(thing) { + return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(thing) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(thing); +} + +/** + * It removes the brackets from the end of a string + * + * @param {string} key - The key of the parameter. + * + * @returns {string} the key without the brackets. + */ +function removeBrackets(key) { + return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]') ? key.slice(0, -2) : key; +} + +/** + * It takes a path, a key, and a boolean, and returns a string + * + * @param {string} path - The path to the current key. + * @param {string} key - The key of the current object being iterated over. + * @param {string} dots - If true, the key will be rendered with dots instead of brackets. + * + * @returns {string} The path to the current key. + */ +function renderKey(path, key, dots) { + if (!path) return key; + return path.concat(key).map(function each(token, i) { + // eslint-disable-next-line no-param-reassign + token = removeBrackets(token); + return !dots && i ? '[' + token + ']' : token; + }).join(dots ? '.' : ''); +} + +/** + * If the array is an array and none of its elements are visitable, then it's a flat array. + * + * @param {Array} arr - The array to check + * + * @returns {boolean} + */ +function isFlatArray(arr) { + return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(arr) && !arr.some(isVisitable); +} + +const predicates = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"], {}, null, function filter(prop) { + return /^is[A-Z]/.test(prop); +}); + +/** + * Convert a data object to FormData + * + * @param {Object} obj + * @param {?Object} [formData] + * @param {?Object} [options] + * @param {Function} [options.visitor] + * @param {Boolean} [options.metaTokens = true] + * @param {Boolean} [options.dots = false] + * @param {?Boolean} [options.indexes = false] + * + * @returns {Object} + **/ + +/** + * It converts an object into a FormData object + * + * @param {Object} obj - The object to convert to form data. + * @param {string} formData - The FormData object to append to. + * @param {Object} options + * + * @returns + */ +function toFormData(obj, formData, options) { + if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) { + throw new TypeError('target must be an object'); + } + + // eslint-disable-next-line no-param-reassign + formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"] || FormData)(); + + // eslint-disable-next-line no-param-reassign + options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(options, { + metaTokens: true, + dots: false, + indexes: false + }, false, function defined(option, source) { + // eslint-disable-next-line no-eq-null,eqeqeq + return !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(source[option]); + }); + + const metaTokens = options.metaTokens; + // eslint-disable-next-line no-use-before-define + const visitor = options.visitor || defaultVisitor; + const dots = options.dots; + const indexes = options.indexes; + const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; + const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData); + + if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) { + throw new TypeError('visitor must be a function'); + } + + function convertValue(value) { + if (value === null) return ''; + + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isDate(value)) { + return value.toISOString(); + } + + if (!useBlob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(value)) { + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Blob is not supported. Use a Buffer instead.'); + } + + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isTypedArray(value)) { + return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); + } + + return value; + } + + /** + * Default visitor. + * + * @param {*} value + * @param {String|Number} key + * @param {Array} path + * @this {FormData} + * + * @returns {boolean} return true to visit the each prop of the value recursively + */ + function defaultVisitor(value, key, path) { + let arr = value; + + if (value && !path && typeof value === 'object') { + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '{}')) { + // eslint-disable-next-line no-param-reassign + key = metaTokens ? key : key.slice(0, -2); + // eslint-disable-next-line no-param-reassign + value = JSON.stringify(value); + } else if ( + (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) && isFlatArray(value)) || + ((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value)) + )) { + // eslint-disable-next-line no-param-reassign + key = removeBrackets(key); + + arr.forEach(function each(el, index) { + !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), + convertValue(el) + ); + }); + return false; + } + } + + if (isVisitable(value)) { + return true; + } + + formData.append(renderKey(path, key, dots), convertValue(value)); + + return false; + } + + const stack = []; + + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable + }); + + function build(value, path) { + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value)) return; + + if (stack.indexOf(value) !== -1) { + throw Error('Circular reference detected in ' + path.join('.')); + } + + stack.push(value); + + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(value, function each(el, key) { + const result = !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && visitor.call( + formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(key) ? key.trim() : key, path, exposedHelpers + ); + + if (result === true) { + build(el, path ? path.concat(key) : [key]); + } + }); + + stack.pop(); + } + + if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) { + throw new TypeError('data must be an object'); + } + + build(obj); + + return formData; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toFormData); + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/toURLEncodedForm.js": +/*!************************************************************!*\ + !*** ./node_modules/axios/lib/helpers/toURLEncodedForm.js ***! + \************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ toURLEncodedForm) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); +/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); + + + + + + +function toURLEncodedForm(data, options) { + return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].classes.URLSearchParams(), Object.assign({ + visitor: function(value, key, path, helpers) { + if (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isBuffer(value)) { + this.append(key, value.toString('base64')); + return false; + } + + return helpers.defaultVisitor.apply(this, arguments); + } + }, options)); +} + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/trackStream.js": +/*!*******************************************************!*\ + !*** ./node_modules/axios/lib/helpers/trackStream.js ***! + \*******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ readBytes: () => (/* binding */ readBytes), +/* harmony export */ streamChunk: () => (/* binding */ streamChunk), +/* harmony export */ trackStream: () => (/* binding */ trackStream) +/* harmony export */ }); + +const streamChunk = function* (chunk, chunkSize) { + let len = chunk.byteLength; + + if (!chunkSize || len < chunkSize) { + yield chunk; + return; + } + + let pos = 0; + let end; + + while (pos < len) { + end = pos + chunkSize; + yield chunk.slice(pos, end); + pos = end; + } +} + +const readBytes = async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); + } +} + +const readStream = async function* (stream) { + if (stream[Symbol.asyncIterator]) { + yield* stream; + return; + } + + const reader = stream.getReader(); + try { + for (;;) { + const {done, value} = await reader.read(); + if (done) { + break; + } + yield value; + } + } finally { + await reader.cancel(); + } +} + +const trackStream = (stream, chunkSize, onProgress, onFinish) => { + const iterator = readBytes(stream, chunkSize); + + let bytes = 0; + let done; + let _onFinish = (e) => { + if (!done) { + done = true; + onFinish && onFinish(e); + } + } + + return new ReadableStream({ + async pull(controller) { + try { + const {done, value} = await iterator.next(); + + if (done) { + _onFinish(); + controller.close(); + return; + } + + let len = value.byteLength; + if (onProgress) { + let loadedBytes = bytes += len; + onProgress(loadedBytes); + } + controller.enqueue(new Uint8Array(value)); + } catch (err) { + _onFinish(err); + throw err; + } + }, + cancel(reason) { + _onFinish(reason); + return iterator.return(); + } + }, { + highWaterMark: 2 + }) +} + + +/***/ }), + +/***/ "./node_modules/axios/lib/helpers/validator.js": +/*!*****************************************************!*\ + !*** ./node_modules/axios/lib/helpers/validator.js ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../env/data.js */ "./node_modules/axios/lib/env/data.js"); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); + + + + + +const validators = {}; + +// eslint-disable-next-line func-names +['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { + validators[type] = function validator(thing) { + return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; + }; +}); + +const deprecatedWarnings = {}; + +/** + * Transitional option validator + * + * @param {function|boolean?} validator - set to false if the transitional option has been removed + * @param {string?} version - deprecated version / removed since version + * @param {string?} message - some message with additional info + * + * @returns {function} + */ +validators.transitional = function transitional(validator, version, message) { + function formatMessage(opt, desc) { + return '[Axios v' + _env_data_js__WEBPACK_IMPORTED_MODULE_0__.VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); + } + + // eslint-disable-next-line func-names + return (value, opt, opts) => { + if (validator === false) { + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]( + formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), + _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_DEPRECATED + ); + } + + if (version && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + // eslint-disable-next-line no-console + console.warn( + formatMessage( + opt, + ' has been deprecated since v' + version + ' and will be removed in the near future' + ) + ); + } + + return validator ? validator(value, opt, opts) : true; + }; +}; + +/** + * Assert object's properties type + * + * @param {object} options + * @param {object} schema + * @param {boolean?} allowUnknown + * + * @returns {object} + */ + +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== 'object') { + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('options must be an object', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE); + } + const keys = Object.keys(options); + let i = keys.length; + while (i-- > 0) { + const opt = keys[i]; + const validator = schema[opt]; + if (validator) { + const value = options[opt]; + const result = value === undefined || validator(value, opt, options); + if (result !== true) { + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('option ' + opt + ' must be ' + result, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE); + } + continue; + } + if (allowUnknown !== true) { + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('Unknown option ' + opt, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION); + } + } +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + assertOptions, + validators +}); + + +/***/ }), + +/***/ "./node_modules/axios/lib/platform/browser/classes/Blob.js": +/*!*****************************************************************!*\ + !*** ./node_modules/axios/lib/platform/browser/classes/Blob.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof Blob !== 'undefined' ? Blob : null); + + +/***/ }), + +/***/ "./node_modules/axios/lib/platform/browser/classes/FormData.js": +/*!*********************************************************************!*\ + !*** ./node_modules/axios/lib/platform/browser/classes/FormData.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof FormData !== 'undefined' ? FormData : null); + + +/***/ }), + +/***/ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js": +/*!****************************************************************************!*\ + !*** ./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js ***! + \****************************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js"); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + + +/***/ }), + +/***/ "./node_modules/axios/lib/platform/browser/index.js": +/*!**********************************************************!*\ + !*** ./node_modules/axios/lib/platform/browser/index.js ***! + \**********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"); +/* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/FormData.js */ "./node_modules/axios/lib/platform/browser/classes/FormData.js"); +/* harmony import */ var _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./classes/Blob.js */ "./node_modules/axios/lib/platform/browser/classes/Blob.js"); + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + isBrowser: true, + classes: { + URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"], + FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"], + Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"] + }, + protocols: ['http', 'https', 'file', 'blob', 'url', 'data'] +}); + + +/***/ }), + +/***/ "./node_modules/axios/lib/platform/common/utils.js": +/*!*********************************************************!*\ + !*** ./node_modules/axios/lib/platform/common/utils.js ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ hasBrowserEnv: () => (/* binding */ hasBrowserEnv), +/* harmony export */ hasStandardBrowserEnv: () => (/* binding */ hasStandardBrowserEnv), +/* harmony export */ hasStandardBrowserWebWorkerEnv: () => (/* binding */ hasStandardBrowserWebWorkerEnv), +/* harmony export */ navigator: () => (/* binding */ _navigator), +/* harmony export */ origin: () => (/* binding */ origin) +/* harmony export */ }); +const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; + +const _navigator = typeof navigator === 'object' && navigator || undefined; + +/** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' + * + * @returns {boolean} + */ +const hasStandardBrowserEnv = hasBrowserEnv && + (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); + +/** + * Determine if we're running in a standard browser webWorker environment + * + * Although the `isStandardBrowserEnv` method indicates that + * `allows axios to run in a web worker`, the WebWorker will still be + * filtered out due to its judgment standard + * `typeof window !== 'undefined' && typeof document !== 'undefined'`. + * This leads to a problem when axios post `FormData` in webWorker + */ +const hasStandardBrowserWebWorkerEnv = (() => { + return ( + typeof WorkerGlobalScope !== 'undefined' && + // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && + typeof self.importScripts === 'function' + ); +})(); + +const origin = hasBrowserEnv && window.location.href || 'http://localhost'; + + + + +/***/ }), + +/***/ "./node_modules/axios/lib/platform/index.js": +/*!**************************************************!*\ + !*** ./node_modules/axios/lib/platform/index.js ***! + \**************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node/index.js */ "./node_modules/axios/lib/platform/browser/index.js"); +/* harmony import */ var _common_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/utils.js */ "./node_modules/axios/lib/platform/common/utils.js"); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + ..._common_utils_js__WEBPACK_IMPORTED_MODULE_0__, + ..._node_index_js__WEBPACK_IMPORTED_MODULE_1__["default"] +}); + + +/***/ }), + +/***/ "./node_modules/axios/lib/utils.js": +/*!*****************************************!*\ + !*** ./node_modules/axios/lib/utils.js ***! + \*****************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js"); + + + + +// utils is a library of generic helper functions non-specific to axios + +const {toString} = Object.prototype; +const {getPrototypeOf} = Object; + +const kindOf = (cache => thing => { + const str = toString.call(thing); + return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); +})(Object.create(null)); + +const kindOfTest = (type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type +} + +const typeOfTest = type => thing => typeof thing === type; + +/** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * + * @returns {boolean} True if value is an Array, otherwise false + */ +const {isArray} = Array; + +/** + * Determine if a value is undefined + * + * @param {*} val The value to test + * + * @returns {boolean} True if the value is undefined, otherwise false + */ +const isUndefined = typeOfTest('undefined'); + +/** + * Determine if a value is a Buffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Buffer, otherwise false + */ +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) + && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); +} + +/** + * Determine if a value is an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ +const isArrayBuffer = kindOfTest('ArrayBuffer'); + + +/** + * Determine if a value is a view on an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ +function isArrayBufferView(val) { + let result; + if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { + result = ArrayBuffer.isView(val); + } else { + result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); + } + return result; +} + +/** + * Determine if a value is a String + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a String, otherwise false + */ +const isString = typeOfTest('string'); + +/** + * Determine if a value is a Function + * + * @param {*} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ +const isFunction = typeOfTest('function'); + +/** + * Determine if a value is a Number + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Number, otherwise false + */ +const isNumber = typeOfTest('number'); + +/** + * Determine if a value is an Object + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an Object, otherwise false + */ +const isObject = (thing) => thing !== null && typeof thing === 'object'; + +/** + * Determine if a value is a Boolean + * + * @param {*} thing The value to test + * @returns {boolean} True if value is a Boolean, otherwise false + */ +const isBoolean = thing => thing === true || thing === false; + +/** + * Determine if a value is a plain Object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a plain Object, otherwise false + */ +const isPlainObject = (val) => { + if (kindOf(val) !== 'object') { + return false; + } + + const prototype = getPrototypeOf(val); + return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); +} + +/** + * Determine if a value is a Date + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Date, otherwise false + */ +const isDate = kindOfTest('Date'); + +/** + * Determine if a value is a File + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a File, otherwise false + */ +const isFile = kindOfTest('File'); + +/** + * Determine if a value is a Blob + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Blob, otherwise false + */ +const isBlob = kindOfTest('Blob'); + +/** + * Determine if a value is a FileList + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a File, otherwise false + */ +const isFileList = kindOfTest('FileList'); + +/** + * Determine if a value is a Stream + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Stream, otherwise false + */ +const isStream = (val) => isObject(val) && isFunction(val.pipe); + +/** + * Determine if a value is a FormData + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an FormData, otherwise false + */ +const isFormData = (thing) => { + let kind; + return thing && ( + (typeof FormData === 'function' && thing instanceof FormData) || ( + isFunction(thing.append) && ( + (kind = kindOf(thing)) === 'formdata' || + // detect form-data instance + (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') + ) + ) + ) +} + +/** + * Determine if a value is a URLSearchParams object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ +const isURLSearchParams = kindOfTest('URLSearchParams'); + +const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest); + +/** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * + * @returns {String} The String freed of excess whitespace + */ +const trim = (str) => str.trim ? + str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + +/** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + * + * @param {Boolean} [allOwnKeys = false] + * @returns {any} + */ +function forEach(obj, fn, {allOwnKeys = false} = {}) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + let i; + let l; + + // Force an array if not already something iterable + if (typeof obj !== 'object') { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray(obj)) { + // Iterate over array values + for (i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Iterate over object keys + const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + const len = keys.length; + let key; + + for (i = 0; i < len; i++) { + key = keys[i]; + fn.call(null, obj[key], key, obj); + } + } +} + +function findKey(obj, key) { + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i = keys.length; + let _key; + while (i-- > 0) { + _key = keys[i]; + if (key === _key.toLowerCase()) { + return _key; + } + } + return null; +} + +const _global = (() => { + /*eslint no-undef:0*/ + if (typeof globalThis !== "undefined") return globalThis; + return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global) +})(); + +const isContextDefined = (context) => !isUndefined(context) && context !== _global; + +/** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * + * @returns {Object} Result of all merge properties + */ +function merge(/* obj1, obj2, obj3, ... */) { + const {caseless} = isContextDefined(this) && this || {}; + const result = {}; + const assignValue = (val, key) => { + const targetKey = caseless && findKey(result, key) || key; + if (isPlainObject(result[targetKey]) && isPlainObject(val)) { + result[targetKey] = merge(result[targetKey], val); + } else if (isPlainObject(val)) { + result[targetKey] = merge({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else { + result[targetKey] = val; + } + } + + for (let i = 0, l = arguments.length; i < l; i++) { + arguments[i] && forEach(arguments[i], assignValue); + } + return result; +} + +/** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * + * @param {Boolean} [allOwnKeys] + * @returns {Object} The resulting value of object a + */ +const extend = (a, b, thisArg, {allOwnKeys}= {}) => { + forEach(b, (val, key) => { + if (thisArg && isFunction(val)) { + a[key] = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__["default"])(val, thisArg); + } else { + a[key] = val; + } + }, {allOwnKeys}); + return a; +} + +/** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * + * @returns {string} content value without BOM + */ +const stripBOM = (content) => { + if (content.charCodeAt(0) === 0xFEFF) { + content = content.slice(1); + } + return content; +} + +/** + * Inherit the prototype methods from one constructor into another + * @param {function} constructor + * @param {function} superConstructor + * @param {object} [props] + * @param {object} [descriptors] + * + * @returns {void} + */ +const inherits = (constructor, superConstructor, props, descriptors) => { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + constructor.prototype.constructor = constructor; + Object.defineProperty(constructor, 'super', { + value: superConstructor.prototype + }); + props && Object.assign(constructor.prototype, props); +} + +/** + * Resolve object with deep prototype chain to a flat object + * @param {Object} sourceObj source object + * @param {Object} [destObj] + * @param {Function|Boolean} [filter] + * @param {Function} [propFilter] + * + * @returns {Object} + */ +const toFlatObject = (sourceObj, destObj, filter, propFilter) => { + let props; + let i; + let prop; + const merged = {}; + + destObj = destObj || {}; + // eslint-disable-next-line no-eq-null,eqeqeq + if (sourceObj == null) return destObj; + + do { + props = Object.getOwnPropertyNames(sourceObj); + i = props.length; + while (i-- > 0) { + prop = props[i]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; + } + } + sourceObj = filter !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); + + return destObj; +} + +/** + * Determines whether a string ends with the characters of a specified string + * + * @param {String} str + * @param {String} searchString + * @param {Number} [position= 0] + * + * @returns {boolean} + */ +const endsWith = (str, searchString, position) => { + str = String(str); + if (position === undefined || position > str.length) { + position = str.length; + } + position -= searchString.length; + const lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; +} + + +/** + * Returns new array from array like object or null if failed + * + * @param {*} [thing] + * + * @returns {?Array} + */ +const toArray = (thing) => { + if (!thing) return null; + if (isArray(thing)) return thing; + let i = thing.length; + if (!isNumber(i)) return null; + const arr = new Array(i); + while (i-- > 0) { + arr[i] = thing[i]; + } + return arr; +} + +/** + * Checking if the Uint8Array exists and if it does, it returns a function that checks if the + * thing passed in is an instance of Uint8Array + * + * @param {TypedArray} + * + * @returns {Array} + */ +// eslint-disable-next-line func-names +const isTypedArray = (TypedArray => { + // eslint-disable-next-line func-names + return thing => { + return TypedArray && thing instanceof TypedArray; + }; +})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); + +/** + * For each entry in the object, call the function with the key and value. + * + * @param {Object} obj - The object to iterate over. + * @param {Function} fn - The function to call for each entry. + * + * @returns {void} + */ +const forEachEntry = (obj, fn) => { + const generator = obj && obj[Symbol.iterator]; + + const iterator = generator.call(obj); + + let result; + + while ((result = iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); + } +} + +/** + * It takes a regular expression and a string, and returns an array of all the matches + * + * @param {string} regExp - The regular expression to match against. + * @param {string} str - The string to search. + * + * @returns {Array} + */ +const matchAll = (regExp, str) => { + let matches; + const arr = []; + + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); + } + + return arr; +} + +/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ +const isHTMLForm = kindOfTest('HTMLFormElement'); + +const toCamelCase = str => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, + function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; + } + ); +}; + +/* Creating a function that will check if an object has a property. */ +const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); + +/** + * Determine if a value is a RegExp object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a RegExp object, otherwise false + */ +const isRegExp = kindOfTest('RegExp'); + +const reduceDescriptors = (obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; + + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; + } + }); + + Object.defineProperties(obj, reducedDescriptors); +} + +/** + * Makes all methods read-only + * @param {Object} obj + */ + +const freezeMethods = (obj) => { + reduceDescriptors(obj, (descriptor, name) => { + // skip restricted props in strict mode + if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { + return false; + } + + const value = obj[name]; + + if (!isFunction(value)) return; + + descriptor.enumerable = false; + + if ('writable' in descriptor) { + descriptor.writable = false; + return; + } + + if (!descriptor.set) { + descriptor.set = () => { + throw Error('Can not rewrite read-only method \'' + name + '\''); + }; + } + }); +} + +const toObjectSet = (arrayOrString, delimiter) => { + const obj = {}; + + const define = (arr) => { + arr.forEach(value => { + obj[value] = true; + }); + } + + isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); + + return obj; +} + +const noop = () => {} + +const toFiniteNumber = (value, defaultValue) => { + return value != null && Number.isFinite(value = +value) ? value : defaultValue; +} + +const ALPHA = 'abcdefghijklmnopqrstuvwxyz' + +const DIGIT = '0123456789'; + +const ALPHABET = { + DIGIT, + ALPHA, + ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT +} + +const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { + let str = ''; + const {length} = alphabet; + while (size--) { + str += alphabet[Math.random() * length|0] + } + + return str; +} + +/** + * If the thing is a FormData object, return true, otherwise return false. + * + * @param {unknown} thing - The thing to check. + * + * @returns {boolean} + */ +function isSpecCompliantForm(thing) { + return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]); +} + +const toJSONObject = (obj) => { + const stack = new Array(10); + + const visit = (source, i) => { + + if (isObject(source)) { + if (stack.indexOf(source) >= 0) { + return; + } + + if(!('toJSON' in source)) { + stack[i] = source; + const target = isArray(source) ? [] : {}; + + forEach(source, (value, key) => { + const reducedValue = visit(value, i + 1); + !isUndefined(reducedValue) && (target[key] = reducedValue); + }); + + stack[i] = undefined; + + return target; + } + } + + return source; + } + + return visit(obj, 0); +} + +const isAsyncFn = kindOfTest('AsyncFunction'); + +const isThenable = (thing) => + thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); + +// original code +// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 + +const _setImmediate = ((setImmediateSupported, postMessageSupported) => { + if (setImmediateSupported) { + return setImmediate; + } + + return postMessageSupported ? ((token, callbacks) => { + _global.addEventListener("message", ({source, data}) => { + if (source === _global && data === token) { + callbacks.length && callbacks.shift()(); + } + }, false); + + return (cb) => { + callbacks.push(cb); + _global.postMessage(token, "*"); + } + })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); +})( + typeof setImmediate === 'function', + isFunction(_global.postMessage) +); + +const asap = typeof queueMicrotask !== 'undefined' ? + queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate); + +// ********************* + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + isArray, + isArrayBuffer, + isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject, + isPlainObject, + isReadableStream, + isRequest, + isResponse, + isHeaders, + isUndefined, + isDate, + isFile, + isBlob, + isRegExp, + isFunction, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge, + extend, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty, + hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase, + noop, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + ALPHABET, + generateString, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable, + setImmediate: _setImmediate, + asap +}); + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. +(() => { +/*!*******************************!*\ + !*** ./admin/src/js/admin.js ***! + \*******************************/ +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _licenses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./licenses */ "./admin/src/js/licenses.js"); + +var instant_images = instant_images || {}; +jQuery(document).ready(function ($) { + 'use strict'; + + // Media Uploader Modal + instant_images.setEditor = function (frame) { + var Parent = wp.media.view.Router; + wp.media.view.Router = Parent.extend({ + addNav: function addNav() { + // Button + var $a = $(' ' + instant_img_localize.instant_images + ''); + + // Click event + $a.on('click', function (e) { + e.preventDefault(); + // Set active state of #instant_images_modal + frame.addClass('active'); + }); + this.$el.append($a); // append + }, + initialize: function initialize() { + Parent.prototype.initialize.apply(this, arguments); + this.addNav(); // add buttons + return this; // return + } + }); + if (frame.length) { + $('.close-ii-modal').on('click', function (e) { + e.preventDefault(); + frame.removeClass('active'); + }); + } + }; + if (wp.media) { + var _frame = $('#instant_images_modal'); + if (_frame.length) { + instant_images.setEditor(_frame); + } + } + + // Close Modal. + $(document).on('click', '.media-modal-backdrop', function (e) { + e.preventDefault(); + frame.removeClass('active'); + }); + + // Save Settings Form. + $('.instant-images-settings form.settings').on('submit', function () { + var form = $(this); + form.addClass('saving'); + $('.save-settings .loading', form).addClass('active'); + $('.save-settings #submit', form).prop('disabled', true); + $(this).ajaxSubmit({ + success: function success() { + $('.save-settings .loading', form).removeClass('active'); + setTimeout(function () { + $('.save-settings .saved', form).addClass('active'); + setTimeout(function () { + $('.save-settings .saved', form).removeClass('active'); + form.removeClass('saving'); + $('.save-settings #submit', form).prop('disabled', false); + }, 2000); + }, 250); + }, + error: function error() { + form.removeClass('saving'); + $('.save-settings .loading', form).removeClass('active'); + $('.save-settings #submit', form).prop('disabled', false); + alert('An error occured and the settings could not be saved'); // eslint-disable-line no-alert + } + }); + return false; + }); + + // Settings anchor links. + var settings = document.querySelectorAll('.settings_page_instant-images-settings .settings-entry'); + if (settings) { + var hash = window.location.hash; + if (hash) { + scrollToSection(hash); + } + var nav = document.querySelector('.settings_page_instant-images-settings nav.jump-nav'); + settings.forEach(function (setting) { + var anchor = setting.getAttribute('id'); + var icon = setting.querySelector('.settings-entry--title .fa'); + var text = setting.querySelector('.settings-entry--title h2').innerText; + var button = document.createElement('button'); + button.setAttribute('data-anchor', anchor); + button.innerHTML = icon.outerHTML + text; + nav.appendChild(button); + + // Scroll to section. + button.addEventListener('click', function () { + scrollToSection('#' + anchor); + }); + }); + } +}); + +/** + * Scroll to section hash. + * + * @param {string} hash The section ID. + */ +function scrollToSection(hash) { + var target = document.querySelector(hash); + if (target) { + history.replaceState({}, '', hash); + window.scrollTo({ + top: target.offsetTop - 20, + behavior: 'smooth' + }); + } +} +})(); + +/******/ })() +; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/block/index.asset.php b/build/block/index.asset.php index 411d1b4..58768b5 100644 --- a/build/block/index.asset.php +++ b/build/block/index.asset.php @@ -1 +1 @@ - array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '81c099ea3fca1106f2d2'); + array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '243b85147e1c73c05ddb'); diff --git a/build/block/index.js b/build/block/index.js deleted file mode 100644 index 937aebb..0000000 --- a/build/block/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{var e={4184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t>>8^255&p^99,i[n]=p,o[p]=n;var m=e[n],v=e[m],g=e[v],y=257*e[p]^16843008*p;a[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,l[n]=y<<8|y>>>24,c[n]=y,y=16843009*g^65537*v^257*m^16843008*n,u[p]=y<<24|y>>>8,f[p]=y<<16|y>>>16,h[p]=y<<8|y>>>24,d[p]=y,n?(n=m^e[e[e[g^m]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a6&&a%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[a/n|0]<<24),o[a]=o[a-n]^c);for(var s=this._invKeySchedule=[],l=0;l>>24]]^f[i[c>>>16&255]]^h[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,l,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,f,h,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,a,s){for(var l=this._nRounds,c=e[t]^n[0],u=e[t+1]^n[1],f=e[t+2]^n[2],h=e[t+3]^n[3],d=4,p=1;p>>24]^i[u>>>16&255]^o[f>>>8&255]^a[255&h]^n[d++],v=r[u>>>24]^i[f>>>16&255]^o[h>>>8&255]^a[255&c]^n[d++],g=r[f>>>24]^i[h>>>16&255]^o[c>>>8&255]^a[255&u]^n[d++],y=r[h>>>24]^i[c>>>16&255]^o[u>>>8&255]^a[255&f]^n[d++];c=m,u=v,f=g,h=y}m=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^n[d++],v=(s[u>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^n[d++],g=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^n[d++],y=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&f])^n[d++],e[t]=m,e[t+1]=v,e[t+2]=g,e[t+3]=y},keySize:8});e.AES=t._createHelper(m)}(),r.AES)},5109:function(e,t,n){var r,i,o,a,s,l,c,u,f,h,d,p,m,v,g,y,_,b,w;e.exports=(r=n(8249),n(888),void(r.lib.Cipher||(i=r,o=i.lib,a=o.Base,s=o.WordArray,l=o.BufferedBlockAlgorithm,c=i.enc,c.Utf8,u=c.Base64,f=i.algo.EvpKDF,h=o.Cipher=l.extend({cfg:a.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){l.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?w:_}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),o.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),d=i.mode={},p=o.BlockCipherMode=a.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),m=d.CBC=function(){var e=p.extend();function t(e,t,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},o.BlockCipher=h.extend({cfg:h.cfg.extend({mode:m,padding:v}),reset:function(){var e;h.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),g=o.CipherParams=a.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),y=(i.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?s.create([1398893684,1701076831]).concat(n).concat(t):t).toString(u)},parse:function(e){var t,n=u.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=s.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:t})}},_=o.SerializableCipher=a.extend({cfg:a.extend({format:y}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),a=i.cfg;return g.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),b=(i.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=s.random(8));var i=f.create({keySize:t+n}).compute(e,r),o=s.create(i.words.slice(t),4*n);return i.sigBytes=4*t,g.create({key:i,iv:o,salt:r})}},w=o.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:b}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var o=_.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=i.iv,_.decrypt.call(this,e,t,i.key,r)}}))))},8249:function(e,t,n){var r;e.exports=(r=r||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==n.g&&n.g.crypto&&(r=n.g.crypto),!r)try{r=n(2480)}catch(e){}var i=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),a={},s=a.lib={},l=s.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=s.WordArray=l.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new c.init(n,t/2)}},h=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new c.init(n,t)}},d=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return h.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),l=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,u=e.min(4*l,o);if(l){for(var f=0;f>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i>>6-a%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return o.create(r,i)}(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},r.enc.Base64)},3786:function(e,t,n){var r,i,o;e.exports=(r=n(8249),o=(i=r).lib.WordArray,i.enc.Base64url={stringify:function(e,t=!0){var n=e.words,r=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,l=0;l<4&&a+.75*l>>6*(3-l)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e,t=!0){var n=e.length,r=t?this._safe_map:this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var a=0;a>>6-a%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return o.create(r,i)}(e,n,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},r.enc.Base64url)},298:function(e,t,n){var r;e.exports=(r=n(8249),function(){var e=r,t=e.lib.WordArray,n=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var n=e.length,r=[],i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(r,2*n)}},n.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var n=e.length,r=[],o=0;o>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(r,2*n)}}}(),r.enc.Utf16)},888:function(e,t,n){var r,i,o,a,s,l,c,u;e.exports=(u=n(8249),n(2783),n(9824),o=(i=(r=u).lib).Base,a=i.WordArray,l=(s=r.algo).MD5,c=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:l,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,i=r.hasher.create(),o=a.create(),s=o.words,l=r.keySize,c=r.iterations;s.lengthr&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),s=i.words,l=a.words,c=0;c>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)};n.prototype=e}}(),r.lib.WordArray)},8214:function(e,t,n){var r;e.exports=(r=n(8249),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],l=e[t+1],d=e[t+2],p=e[t+3],m=e[t+4],v=e[t+5],g=e[t+6],y=e[t+7],_=e[t+8],b=e[t+9],w=e[t+10],E=e[t+11],S=e[t+12],R=e[t+13],x=e[t+14],k=e[t+15],O=o[0],C=o[1],A=o[2],B=o[3];O=c(O,C,A,B,a,7,s[0]),B=c(B,O,C,A,l,12,s[1]),A=c(A,B,O,C,d,17,s[2]),C=c(C,A,B,O,p,22,s[3]),O=c(O,C,A,B,m,7,s[4]),B=c(B,O,C,A,v,12,s[5]),A=c(A,B,O,C,g,17,s[6]),C=c(C,A,B,O,y,22,s[7]),O=c(O,C,A,B,_,7,s[8]),B=c(B,O,C,A,b,12,s[9]),A=c(A,B,O,C,w,17,s[10]),C=c(C,A,B,O,E,22,s[11]),O=c(O,C,A,B,S,7,s[12]),B=c(B,O,C,A,R,12,s[13]),A=c(A,B,O,C,x,17,s[14]),O=u(O,C=c(C,A,B,O,k,22,s[15]),A,B,l,5,s[16]),B=u(B,O,C,A,g,9,s[17]),A=u(A,B,O,C,E,14,s[18]),C=u(C,A,B,O,a,20,s[19]),O=u(O,C,A,B,v,5,s[20]),B=u(B,O,C,A,w,9,s[21]),A=u(A,B,O,C,k,14,s[22]),C=u(C,A,B,O,m,20,s[23]),O=u(O,C,A,B,b,5,s[24]),B=u(B,O,C,A,x,9,s[25]),A=u(A,B,O,C,p,14,s[26]),C=u(C,A,B,O,_,20,s[27]),O=u(O,C,A,B,R,5,s[28]),B=u(B,O,C,A,d,9,s[29]),A=u(A,B,O,C,y,14,s[30]),O=f(O,C=u(C,A,B,O,S,20,s[31]),A,B,v,4,s[32]),B=f(B,O,C,A,_,11,s[33]),A=f(A,B,O,C,E,16,s[34]),C=f(C,A,B,O,x,23,s[35]),O=f(O,C,A,B,l,4,s[36]),B=f(B,O,C,A,m,11,s[37]),A=f(A,B,O,C,y,16,s[38]),C=f(C,A,B,O,w,23,s[39]),O=f(O,C,A,B,R,4,s[40]),B=f(B,O,C,A,a,11,s[41]),A=f(A,B,O,C,p,16,s[42]),C=f(C,A,B,O,g,23,s[43]),O=f(O,C,A,B,b,4,s[44]),B=f(B,O,C,A,S,11,s[45]),A=f(A,B,O,C,k,16,s[46]),O=h(O,C=f(C,A,B,O,d,23,s[47]),A,B,a,6,s[48]),B=h(B,O,C,A,y,10,s[49]),A=h(A,B,O,C,x,15,s[50]),C=h(C,A,B,O,v,21,s[51]),O=h(O,C,A,B,S,6,s[52]),B=h(B,O,C,A,p,10,s[53]),A=h(A,B,O,C,w,15,s[54]),C=h(C,A,B,O,l,21,s[55]),O=h(O,C,A,B,_,6,s[56]),B=h(B,O,C,A,k,10,s[57]),A=h(A,B,O,C,g,15,s[58]),C=h(C,A,B,O,R,21,s[59]),O=h(O,C,A,B,m,6,s[60]),B=h(B,O,C,A,E,10,s[61]),A=h(A,B,O,C,d,15,s[62]),C=h(C,A,B,O,b,21,s[63]),o[0]=o[0]+O|0,o[1]=o[1]+C|0,o[2]=o[2]+A|0,o[3]=o[3]+B|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+i+a;return(s<>>32-o)+t}function u(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+i+a;return(s<>>32-o)+t}function f(e,t,n,r,i,o,a){var s=e+(t^n^r)+i+a;return(s<>>32-o)+t}function h(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+i+a;return(s<>>32-o)+t}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),r.MD5)},8568:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();function t(e,t,n,r){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var a=0;a>24&255)){var t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}var n=e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(a);var s=a.slice(0);r.encryptBlock(s,0);for(var l=0;l>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Ansix923)},2807:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)},1077:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)},6991:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},6475:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},r.pad.ZeroPadding)},2112:function(e,t,n){var r,i,o,a,s,l,c,u,f;e.exports=(f=n(8249),n(2783),n(9824),o=(i=(r=f).lib).Base,a=i.WordArray,l=(s=r.algo).SHA1,c=s.HMAC,u=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:l,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=c.create(n.hasher,e),i=a.create(),o=a.create([1]),s=i.words,l=o.words,u=n.keySize,f=n.iterations;s.length>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&u,h=u<<16|65535&c;for(r[0]^=c,r[1]^=f,r[2]^=u,r[3]^=h,r[4]^=c,r[5]^=f,r[6]^=u,r[7]^=h,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)},4454:function(e,t,n){var r;e.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&u,h=u<<16|65535&c;for(i[0]^=c,i[1]^=f,i[2]^=u,i[3]^=h,i[4]^=c,i[5]^=f,i[6]^=u,i[7]^=h,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)},1857:function(e,t,n){var r;e.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var a=i%n,s=t[a>>>2]>>>24-a%4*8&255;o=(o+r[i]+s)%256;var l=r[i];r[i]=r[o],r[o]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}e.RC4=t._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),r.RC4)},706:function(e,t,n){var r;e.exports=(r=n(8249),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=i.create([0,1518500249,1859775393,2400959708,2840853838]),h=i.create([1352829926,1548603684,1836072691,2053994217,0]),d=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,d,b,w,E,S,R,x,k,O,C=this._hash.words,A=f.words,B=h.words,j=s.words,L=l.words,N=c.words,P=u.words;for(E=o=C[0],S=a=C[1],R=d=C[2],x=b=C[3],k=w=C[4],n=0;n<80;n+=1)O=o+e[t+j[n]]|0,O+=n<16?p(a,d,b)+A[0]:n<32?m(a,d,b)+A[1]:n<48?v(a,d,b)+A[2]:n<64?g(a,d,b)+A[3]:y(a,d,b)+A[4],O=(O=_(O|=0,N[n]))+w|0,o=w,w=b,b=_(d,10),d=a,a=O,O=E+e[t+L[n]]|0,O+=n<16?y(S,R,x)+B[0]:n<32?g(S,R,x)+B[1]:n<48?v(S,R,x)+B[2]:n<64?m(S,R,x)+B[3]:p(S,R,x)+B[4],O=(O=_(O|=0,P[n]))+k|0,E=k,k=x,x=_(R,10),R=S,S=O;O=C[1]+d+x|0,C[1]=C[2]+b+k|0,C[2]=C[3]+w+E|0,C[3]=C[4]+o+S|0,C[4]=C[0]+a+R|0,C[0]=O},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,n){return e^t^n}function m(e,t,n){return e&t|~e&n}function v(e,t,n){return(e|~t)^n}function g(e,t,n){return e&n|t&~n}function y(e,t,n){return e^(t|~n)}function _(e,t){return e<>>32-t}t.RIPEMD160=o._createHelper(d),t.HmacRIPEMD160=o._createHmacHelper(d)}(Math),r.RIPEMD160)},2783:function(e,t,n){var r,i,o,a,s,l,c,u;e.exports=(i=(r=u=n(8249)).lib,o=i.WordArray,a=i.Hasher,s=r.algo,l=[],c=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=0;c<80;c++){if(c<16)l[c]=0|e[t+c];else{var u=l[c-3]^l[c-8]^l[c-14]^l[c-16];l[c]=u<<1|u>>>31}var f=(r<<5|r>>>27)+s+l[c];f+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=a._createHelper(c),r.HmacSHA1=a._createHmacHelper(c),u.SHA1)},7792:function(e,t,n){var r,i,o,a,s,l;e.exports=(l=n(8249),n(2153),i=(r=l).lib.WordArray,o=r.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),r.SHA224=a._createHelper(s),r.HmacSHA224=a._createHmacHelper(s),l.SHA224)},2153:function(e,t,n){var r;e.exports=(r=n(8249),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[],l=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=n(e.pow(r,.5))),l[i]=n(e.pow(r,1/3)),i++),r++}();var c=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=0;d<64;d++){if(d<16)c[d]=0|e[t+d];else{var p=c[d-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=c[d-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;c[d]=m+c[d-7]+g+c[d-16]}var y=r&i^r&o^i&o,_=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),b=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&f)+l[d]+c[d];h=f,f=u,u=s,s=a+b|0,a=o,o=i,i=r,r=b+(_+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+f|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),r.SHA256)},3327:function(e,t,n){var r;e.exports=(r=n(8249),n(4938),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.x64.Word,s=t.algo,l=[],c=[],u=[];!function(){for(var e=1,t=0,n=0;n<24;n++){l[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,f=0,h=0;h<7;h++){if(1&i){var d=(1<>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(C=n[i]).high^=a,C.low^=o}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var d=0,p=0,m=0;m<5;m++)d^=(C=n[h+5*m]).high,p^=C.low;var v=f[h];v.high=d,v.low=p}for(h=0;h<5;h++){var g=f[(h+4)%5],y=f[(h+1)%5],_=y.high,b=y.low;for(d=g.high^(_<<1|b>>>31),p=g.low^(b<<1|_>>>31),m=0;m<5;m++)(C=n[h+5*m]).high^=d,C.low^=p}for(var w=1;w<25;w++){var E=(C=n[w]).high,S=C.low,R=l[w];R<32?(d=E<>>32-R,p=S<>>32-R):(d=S<>>64-R,p=E<>>64-R);var x=f[c[w]];x.high=d,x.low=p}var k=f[0],O=n[0];for(k.high=O.high,k.low=O.low,h=0;h<5;h++)for(m=0;m<5;m++){var C=n[w=h+5*m],A=f[w],B=f[(h+1)%5+5*m],j=f[(h+2)%5+5*m];C.high=A.high^~B.high&j.high,C.low=A.low^~B.low&j.low}C=n[0];var L=u[s];C.high^=L.high,C.low^=L.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u>>24)|4278255360&(h<<24|h>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),c.push(d),c.push(h)}return new i.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=o._createHelper(h),t.HmacSHA3=o._createHmacHelper(h)}(Math),r.SHA3)},7460:function(e,t,n){var r,i,o,a,s,l,c,u;e.exports=(u=n(8249),n(4938),n(34),i=(r=u).x64,o=i.Word,a=i.WordArray,s=r.algo,l=s.SHA512,c=s.SHA384=l.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var e=l._doFinalize.call(this);return e.sigBytes-=16,e}}),r.SHA384=l._createHelper(c),r.HmacSHA384=l._createHmacHelper(c),u.SHA384)},34:function(e,t,n){var r;e.exports=(r=n(8249),n(4938),function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var u=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=r.high,p=r.low,m=i.high,v=i.low,g=o.high,y=o.low,_=a.high,b=a.low,w=s.high,E=s.low,S=u.high,R=u.low,x=f.high,k=f.low,O=h.high,C=h.low,A=d,B=p,j=m,L=v,N=g,P=y,z=_,I=b,T=w,D=E,M=S,H=R,F=x,W=k,U=O,q=C,V=0;V<80;V++){var G,J,Y=c[V];if(V<16)J=Y.high=0|e[t+2*V],G=Y.low=0|e[t+2*V+1];else{var K=c[V-15],$=K.high,X=K.low,Z=($>>>1|X<<31)^($>>>8|X<<24)^$>>>7,Q=(X>>>1|$<<31)^(X>>>8|$<<24)^(X>>>7|$<<25),ee=c[V-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=c[V-7],ae=oe.high,se=oe.low,le=c[V-16],ce=le.high,ue=le.low;J=(J=(J=Z+ae+((G=Q+se)>>>0>>0?1:0))+re+((G+=ie)>>>0>>0?1:0))+ce+((G+=ue)>>>0>>0?1:0),Y.high=J,Y.low=G}var fe,he=T&M^~T&F,de=D&H^~D&W,pe=A&j^A&N^j&N,me=B&L^B&P^L&P,ve=(A>>>28|B<<4)^(A<<30|B>>>2)^(A<<25|B>>>7),ge=(B>>>28|A<<4)^(B<<30|A>>>2)^(B<<25|A>>>7),ye=(T>>>14|D<<18)^(T>>>18|D<<14)^(T<<23|D>>>9),_e=(D>>>14|T<<18)^(D>>>18|T<<14)^(D<<23|T>>>9),be=l[V],we=be.high,Ee=be.low,Se=U+ye+((fe=q+_e)>>>0>>0?1:0),Re=ge+me;U=F,q=W,F=M,W=H,M=T,H=D,T=z+(Se=(Se=(Se=Se+he+((fe+=de)>>>0>>0?1:0))+we+((fe+=Ee)>>>0>>0?1:0))+J+((fe+=G)>>>0>>0?1:0))+((D=I+fe|0)>>>0>>0?1:0)|0,z=N,I=P,N=j,P=L,j=A,L=B,A=Se+(ve+pe+(Re>>>0>>0?1:0))+((B=fe+Re|0)>>>0>>0?1:0)|0}p=r.low=p+B,r.high=d+A+(p>>>0>>0?1:0),v=i.low=v+L,i.high=m+j+(v>>>0>>0?1:0),y=o.low=y+P,o.high=g+N+(y>>>0

>>0?1:0),b=a.low=b+I,a.high=_+z+(b>>>0>>0?1:0),E=s.low=E+D,s.high=w+T+(E>>>0>>0?1:0),R=u.low=R+H,u.high=S+M+(R>>>0>>0?1:0),k=f.low=k+W,f.high=x+F+(k>>>0>>0?1:0),C=h.low=C+q,h.high=O+U+(C>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(u),e.HmacSHA512=t._createHmacHelper(u)}(),r.SHA512)},4253:function(e,t,n){var r;e.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=a[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],u=l[o];for(n=0;n<24;n++)c[n/6|0]|=t[(s[n]-1+u)%28]<<31-n%6,c[4+(n/6|0)]|=t[28+(s[n+24]-1+u)%28]<<31-n%6;for(c[0]=c[0]<<1|c[0]>>>31,n=1;n<7;n++)c[n]=c[n]>>>4*(n-1)+3;c[7]=c[7]<<5|c[7]>>>27}var f=this._invSubKeys=[];for(n=0;n<16;n++)f[n]=i[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,a=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((a^i[l])&u[l])>>>0];this._lBlock=a,this._rBlock=o^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,h.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=f.createEncryptor(n.create(t)),this._des2=f.createEncryptor(n.create(r)),this._des3=f.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),r.TripleDES)},4938:function(e,t,n){var r,i,o,a,s,l;e.exports=(r=n(8249),o=(i=r).lib,a=o.Base,s=o.WordArray,(l=i.x64={}).Word=a.extend({init:function(e,t){this.high=e,this.low=t}}),l.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r{var r,i;!function(o,a){"use strict";void 0===(i="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=i)}(window,(function(){"use strict";var e=function(){var e=window.Element.prototype;if(e.matches)return"matches";if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],n=0;n{var r,i;!function(o,a){r=[n(9741)],i=function(e){return function(e,t){"use strict";var n={extend:function(e,t){for(var n in t)e[n]=t[n];return e},modulo:function(e,t){return(e%t+t)%t}},r=Array.prototype.slice;n.makeArray=function(e){return Array.isArray(e)?e:null==e?[]:"object"==typeof e&&"number"==typeof e.length?r.call(e):[e]},n.removeFrom=function(e,t){var n=e.indexOf(t);-1!=n&&e.splice(n,1)},n.getParent=function(e,n){for(;e.parentNode&&e!=document.body;)if(e=e.parentNode,t(e,n))return e},n.getQueryElement=function(e){return"string"==typeof e?document.querySelector(e):e},n.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},n.filterFindElements=function(e,r){e=n.makeArray(e);var i=[];return e.forEach((function(e){if(e instanceof HTMLElement)if(r){t(e,r)&&i.push(e);for(var n=e.querySelectorAll(r),o=0;o{var r,i;window,void 0===(i="function"==typeof(r=function(){"use strict";function e(e){var t=parseFloat(e);return-1==e.indexOf("%")&&!isNaN(t)&&t}var t="undefined"==typeof console?function(){}:function(e){console.error(e)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],r=n.length;function i(e){var n=getComputedStyle(e);return n||t("Style returned "+n+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),n}var o,a=!1;function s(t){if(function(){if(!a){a=!0;var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(t);var r=i(t);o=200==Math.round(e(r.width)),s.isBoxSizeOuter=o,n.removeChild(t)}}(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var l=i(t);if("none"==l.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t{setTimeout((()=>{this.progress(e,t,n)}))};this.images.forEach((function(t){t.once("progress",e),t.check()}))},i.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&r&&r.log(`progress: ${n}`,e,t)},i.prototype.complete=function(){let e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){let e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},s.prototype=Object.create(t.prototype),s.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},s.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},s.prototype.confirm=function(e,t){this.isLoaded=e;let{parentNode:n}=this.img,r="PICTURE"===n.nodeName?n:this.img;this.emitEvent("progress",[this,r,t])},s.prototype.handleEvent=function(e){let t="on"+e.type;this[t]&&this[t](e)},s.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},s.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},s.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},l.prototype=Object.create(s.prototype),l.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},l.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},l.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},i.makeJQueryPlugin=function(t){(t=t||e.jQuery)&&(n=t,n.fn.imagesLoaded=function(e,t){return new i(this,e,t).jqDeferred.promise(n(this))})},i.makeJQueryPlugin(),i}))},8751:(e,t,n)=>{var r,i,o;window,i=[n(1794),n(6131)],void 0===(o="function"==typeof(r=function(e,t){"use strict";var n=e.create("masonry");n.compatOptions.fitWidth="isFitWidth";var r=n.prototype;return r._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var e=0;e1&&n+e>this.cols?0:n;var r=t.size.outerWidth&&t.size.outerHeight;return this.horizontalColIndex=r?n+e:this.horizontalColIndex,{col:n,y:this._getColGroupY(n,e)}},r._manageStamp=function(e){var n=t(e),r=this._getElementOffset(e),i=this._getOption("originLeft")?r.left:r.right,o=i+n.outerWidth,a=Math.floor(i/this.columnWidth);a=Math.max(0,a);var s=Math.floor(o/this.columnWidth);s-=o%this.columnWidth?0:1,s=Math.min(this.cols-1,s);for(var l=(this._getOption("originTop")?r.top:r.bottom)+n.outerHeight,c=a;c<=s;c++)this.colYs[c]=Math.max(l,this.colYs[c])},r._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var e={height:this.maxY};return this._getOption("fitWidth")&&(e.width=this._getContainerFitWidth()),e},r._getContainerFitWidth=function(){for(var e=0,t=this.cols;--t&&0===this.colYs[t];)e++;return(this.cols-e)*this.columnWidth-this.gutter},r.needsResizeLayout=function(){var e=this.containerWidth;return this.getContainerWidth(),e!=this.containerWidth},n})?r.apply(t,i):r)||(e.exports=o)},652:(e,t,n)=>{var r,i,o;window,i=[n(1206),n(6131)],void 0===(o="function"==typeof(r=function(e,t){"use strict";var n=document.documentElement.style,r="string"==typeof n.transition?"transition":"WebkitTransition",i="string"==typeof n.transform?"transform":"WebkitTransform",o={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],a={transform:i,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"};function s(e,t){e&&(this.element=e,this.layout=t,this.position={x:0,y:0},this._create())}var l=s.prototype=Object.create(e.prototype);l.constructor=s,l._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},l.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},l.getSize=function(){this.size=t(this.element)},l.css=function(e){var t=this.element.style;for(var n in e)t[a[n]||n]=e[n]},l.getPosition=function(){var e=getComputedStyle(this.element),t=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),r=e[t?"left":"right"],i=e[n?"top":"bottom"],o=parseFloat(r),a=parseFloat(i),s=this.layout.size;-1!=r.indexOf("%")&&(o=o/100*s.width),-1!=i.indexOf("%")&&(a=a/100*s.height),o=isNaN(o)?0:o,a=isNaN(a)?0:a,o-=t?s.paddingLeft:s.paddingRight,a-=n?s.paddingTop:s.paddingBottom,this.position.x=o,this.position.y=a},l.layoutPosition=function(){var e=this.layout.size,t={},n=this.layout._getOption("originLeft"),r=this.layout._getOption("originTop"),i=n?"paddingLeft":"paddingRight",o=n?"left":"right",a=n?"right":"left",s=this.position.x+e[i];t[o]=this.getXValue(s),t[a]="";var l=r?"paddingTop":"paddingBottom",c=r?"top":"bottom",u=r?"bottom":"top",f=this.position.y+e[l];t[c]=this.getYValue(f),t[u]="",this.css(t),this.emitEvent("layout",[this])},l.getXValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!t?e/this.layout.size.width*100+"%":e+"px"},l.getYValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&t?e/this.layout.size.height*100+"%":e+"px"},l._transitionTo=function(e,t){this.getPosition();var n=this.position.x,r=this.position.y,i=e==this.position.x&&t==this.position.y;if(this.setPosition(e,t),!i||this.isTransitioning){var o=e-n,a=t-r,s={};s.transform=this.getTranslate(o,a),this.transition({to:s,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},l.getTranslate=function(e,t){return"translate3d("+(e=this.layout._getOption("originLeft")?e:-e)+"px, "+(t=this.layout._getOption("originTop")?t:-t)+"px, 0)"},l.goTo=function(e,t){this.setPosition(e,t),this.layoutPosition()},l.moveTo=l._transitionTo,l.setPosition=function(e,t){this.position.x=parseFloat(e),this.position.y=parseFloat(t)},l._nonTransition=function(e){for(var t in this.css(e.to),e.isCleaning&&this._removeStyles(e.to),e.onTransitionEnd)e.onTransitionEnd[t].call(this)},l.transition=function(e){if(parseFloat(this.layout.options.transitionDuration)){var t=this._transn;for(var n in e.onTransitionEnd)t.onEnd[n]=e.onTransitionEnd[n];for(n in e.to)t.ingProperties[n]=!0,e.isCleaning&&(t.clean[n]=!0);e.from&&(this.css(e.from),this.element.offsetHeight),this.enableTransition(e.to),this.css(e.to),this.isTransitioning=!0}else this._nonTransition(e)};var c="opacity,"+i.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}));l.enableTransition=function(){if(!this.isTransitioning){var e=this.layout.options.transitionDuration;e="number"==typeof e?e+"ms":e,this.css({transitionProperty:c,transitionDuration:e,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(o,this,!1)}},l.onwebkitTransitionEnd=function(e){this.ontransitionend(e)},l.onotransitionend=function(e){this.ontransitionend(e)};var u={"-webkit-transform":"transform"};l.ontransitionend=function(e){if(e.target===this.element){var t=this._transn,n=u[e.propertyName]||e.propertyName;delete t.ingProperties[n],function(e){for(var t in e)return!1;return!0}(t.ingProperties)&&this.disableTransition(),n in t.clean&&(this.element.style[e.propertyName]="",delete t.clean[n]),n in t.onEnd&&(t.onEnd[n].call(this),delete t.onEnd[n]),this.emitEvent("transitionEnd",[this])}},l.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},l._removeStyles=function(e){var t={};for(var n in e)t[n]="";this.css(t)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return l.removeTransitionStyles=function(){this.css(f)},l.stagger=function(e){e=isNaN(e)?0:e,this.staggerDelay=e+"ms"},l.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},l.remove=function(){r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",(function(){this.removeElem()})),this.hide()):this.removeElem()},l.reveal=function(){delete this.isHidden,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:e.hiddenStyle,to:e.visibleStyle,isCleaning:!0,onTransitionEnd:t})},l.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},l.getHideRevealTransitionEndProperty=function(e){var t=this.layout.options[e];if(t.opacity)return"opacity";for(var n in t)return n},l.hide=function(){this.isHidden=!0,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:e.visibleStyle,to:e.hiddenStyle,isCleaning:!0,onTransitionEnd:t})},l.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},l.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},s})?r.apply(t,i):r)||(e.exports=o)},1206:function(e,t,n){var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},r=n[e]=n[e]||[];return-1==r.indexOf(t)&&r.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var r=n.indexOf(t);return-1!=r&&n.splice(r,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var r=this._onceEvents&&this._onceEvents[e],i=0;i{var r,i;!function(o,a){"use strict";r=[n(1206),n(6131),n(9047),n(652)],i=function(e,t,n,r){return function(e,t,n,r,i){var o=e.console,a=e.jQuery,s=function(){},l=0,c={};function u(e,t){var n=r.getQueryElement(e);if(n){this.element=n,a&&(this.$element=a(this.element)),this.options=r.extend({},this.constructor.defaults),this.option(t);var i=++l;this.element.outlayerGUID=i,c[i]=this,this._create(),this._getOption("initLayout")&&this.layout()}else o&&o.error("Bad element for "+this.constructor.namespace+": "+(n||e))}u.namespace="outlayer",u.Item=i,u.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=u.prototype;function h(e){function t(){e.apply(this,arguments)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t}r.extend(f,t.prototype),f.option=function(e){r.extend(this.options,e)},f._getOption=function(e){var t=this.constructor.compatOptions[e];return t&&void 0!==this.options[t]?this.options[t]:this.options[e]},u.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),r.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(e){for(var t=this._filterFindItemElements(e),n=this.constructor.Item,r=[],i=0;i{}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blockEditor,t=window.wp.blocks,r=window.wp.components,i=window.wp.element,o=window.wp.i18n,a=window.wp.primitives,s=(0,i.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(a.Path,{d:"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"}));function l(){return React.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("title",null,"Instant Images Icon"),React.createElement("path",{d:"M0 8C0 3.58172 3.58172 0 8 0H72C76.4183 0 80 3.58172 80 8V72C80 76.4183 76.4183 80 72 80H8C3.58172 80 0 76.4183 0 72V8Z",fill:"#647FE8"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z",fill:"white"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z",fill:"white"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z",fill:"#C7D2FF"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z",fill:"#C7D2FF"}))}function c(e,t){return function(){return e.apply(t,arguments)}}const{toString:u}=Object.prototype,{getPrototypeOf:f}=Object,h=(d=Object.create(null),e=>{const t=u.call(e);return d[t]||(d[t]=t.slice(8,-1).toLowerCase())});var d;const p=e=>(e=e.toLowerCase(),t=>h(t)===e),m=e=>t=>typeof t===e,{isArray:v}=Array,g=m("undefined"),y=p("ArrayBuffer"),_=m("string"),b=m("function"),w=m("number"),E=e=>null!==e&&"object"==typeof e,S=e=>{if("object"!==h(e))return!1;const t=f(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},R=p("Date"),x=p("File"),k=p("Blob"),O=p("FileList"),C=p("URLSearchParams");function A(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),v(e))for(r=0,i=e.length;r0;)if(r=n[i],t===r.toLowerCase())return r;return null}const j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,L=e=>!g(e)&&e!==j,N=(P="undefined"!=typeof Uint8Array&&f(Uint8Array),e=>P&&e instanceof P);var P;const z=p("HTMLFormElement"),I=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),T=p("RegExp"),D=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};A(n,((n,i)=>{!1!==t(n,i,e)&&(r[i]=n)})),Object.defineProperties(e,r)},M="abcdefghijklmnopqrstuvwxyz",H="0123456789",F={DIGIT:H,ALPHA:M,ALPHA_DIGIT:M+M.toUpperCase()+H},W={isArray:v,isArrayBuffer:y,isBuffer:function(e){return null!==e&&!g(e)&&null!==e.constructor&&!g(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{const t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||u.call(e)===t||b(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&y(e.buffer),t},isString:_,isNumber:w,isBoolean:e=>!0===e||!1===e,isObject:E,isPlainObject:S,isUndefined:g,isDate:R,isFile:x,isBlob:k,isRegExp:T,isFunction:b,isStream:e=>E(e)&&b(e.pipe),isURLSearchParams:C,isTypedArray:N,isFileList:O,forEach:A,merge:function e(){const{caseless:t}=L(this)&&this||{},n={},r=(r,i)=>{const o=t&&B(n,i)||i;S(n[o])&&S(r)?n[o]=e(n[o],r):S(r)?n[o]=e({},r):v(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e(A(t,((t,r)=>{n&&b(t)?e[r]=c(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&f(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:h,kindOfTest:p,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(v(e))return e;let t=e.length;if(!w(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:z,hasOwnProperty:I,hasOwnProp:I,reduceDescriptors:D,freezeMethods:e=>{D(e,((t,n)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];b(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return v(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:B,global:j,isContextDefined:L,ALPHABET:F,generateString:(e=16,t=F.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(E(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=v(e)?[]:{};return A(e,((e,t)=>{const o=n(e,r+1);!g(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)}};function U(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}W.inherits(U,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const q=U.prototype,V={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{V[e]={value:e}})),Object.defineProperties(U,V),Object.defineProperty(q,"isAxiosError",{value:!0}),U.from=(e,t,n,r,i,o)=>{const a=Object.create(q);return W.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),U.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const G=U;function J(e){return W.isPlainObject(e)||W.isArray(e)}function Y(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function K(e,t,n){return e?e.concat(t).map((function(e,t){return e=Y(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const $=W.toFlatObject(W,{},null,(function(e){return/^is[A-Z]/.test(e)})),X=function(e,t,n){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!W.isUndefined(t[e])}))).metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(W.isDate(e))return e.toISOString();if(!s&&W.isBlob(e))throw new G("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(e)||W.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,i){let s=e;if(e&&!i&&"object"==typeof e)if(W.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(W.isArray(e)&&function(e){return W.isArray(e)&&!e.some(J)}(e)||(W.isFileList(e)||W.endsWith(n,"[]"))&&(s=W.toArray(e)))return n=Y(n),s.forEach((function(e,r){!W.isUndefined(e)&&null!==e&&t.append(!0===a?K([n],r,o):null===a?n:n+"[]",l(e))})),!1;return!!J(e)||(t.append(K(i,n,o),l(e)),!1)}const u=[],f=Object.assign($,{defaultVisitor:c,convertValue:l,isVisitable:J});if(!W.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!W.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),W.forEach(n,(function(n,o){!0===(!(W.isUndefined(n)||null===n)&&i.call(t,n,W.isString(o)?o.trim():o,r,f))&&e(n,r?r.concat(o):[o])})),u.pop()}}(e),t};function Z(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Q(e,t){this._pairs=[],e&&X(e,this,t)}const ee=Q.prototype;ee.append=function(e,t){this._pairs.push([e,t])},ee.toString=function(e){const t=e?function(t){return e.call(this,t,Z)}:Z;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const te=Q;function ne(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function re(e,t,n){if(!t)return e;const r=n&&n.encode||ne,i=n&&n.serialize;let o;if(o=i?i(t,n):W.isURLSearchParams(t)?t.toString():new te(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const ie=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){W.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},oe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ae={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:te,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]},se=function(e){function t(e,n,r,i){let o=e[i++];const a=Number.isFinite(+o),s=i>=e.length;return o=!o&&W.isArray(r)?r.length:o,s?(W.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):(r[o]&&W.isObject(r[o])||(r[o]=[]),t(e,n,r[o],i)&&W.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r{t(function(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},le={"Content-Type":void 0},ce={transitional:oe,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=W.isObject(e);if(i&&W.isHTMLForm(e)&&(e=new FormData(e)),W.isFormData(e))return r&&r?JSON.stringify(se(e)):e;if(W.isArrayBuffer(e)||W.isBuffer(e)||W.isStream(e)||W.isFile(e)||W.isBlob(e))return e;if(W.isArrayBufferView(e))return e.buffer;if(W.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return X(e,new ae.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ae.isNode&&W.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=W.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return X(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(W.isString(e))try{return(0,JSON.parse)(e),W.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ce.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&W.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw G.from(e,G.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ae.classes.FormData,Blob:ae.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};W.forEach(["delete","get","head"],(function(e){ce.headers[e]={}})),W.forEach(["post","put","patch"],(function(e){ce.headers[e]=W.merge(le)}));const ue=ce,fe=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),he=Symbol("internals");function de(e){return e&&String(e).trim().toLowerCase()}function pe(e){return!1===e||null==e?e:W.isArray(e)?e.map(pe):String(e)}function me(e,t,n,r,i){return W.isFunction(r)?r.call(this,t,n):(i&&(t=n),W.isString(t)?W.isString(r)?-1!==t.indexOf(r):W.isRegExp(r)?r.test(t):void 0:void 0)}class ve{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=de(t);if(!i)throw new Error("header name must be a non-empty string");const o=W.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=pe(e))}const o=(e,t)=>W.forEach(e,((e,n)=>i(e,n,t)));return W.isPlainObject(e)||e instanceof this.constructor?o(e,t):W.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z]+$/.test(e.trim())?o((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&fe[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&i(t,e,n),this}get(e,t){if(e=de(e)){const n=W.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(W.isFunction(t))return t.call(this,e,n);if(W.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=de(e)){const n=W.findKey(this,e);return!(!n||void 0===this[n]||t&&!me(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=de(e)){const i=W.findKey(n,e);!i||t&&!me(0,n[i],i,t)||(delete n[i],r=!0)}}return W.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!me(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return W.forEach(this,((r,i)=>{const o=W.findKey(n,i);if(o)return t[o]=pe(r),void delete t[i];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();a!==i&&delete t[i],t[a]=pe(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return W.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&W.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[he]=this[he]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=de(e);t[r]||(function(e,t){const n=W.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return W.isArray(e)?e.forEach(r):r(e),this}}ve.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),W.freezeMethods(ve.prototype),W.freezeMethods(ve);const ge=ve;function ye(e,t){const n=this||ue,r=t||n,i=ge.from(r.headers);let o=r.data;return W.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function _e(e){return!(!e||!e.__CANCEL__)}function be(e,t,n){G.call(this,null==e?"canceled":e,G.ERR_CANCELED,t,n),this.name="CanceledError"}W.inherits(be,G,{__CANCEL__:!0});const we=be,Ee=ae.isStandardBrowserEnv?{write:function(e,t,n,r,i,o){const a=[];a.push(e+"="+encodeURIComponent(t)),W.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),W.isString(r)&&a.push("path="+r),W.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Se(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Re=ae.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=W.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},xe=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];i||(i=l),n[o]=s,r[o]=l;let u=a,f=0;for(;u!==o;)f+=n[u++],u%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),l-i{const o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-n,l=r(s);n=o;const c={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&o<=a?(a-o)/l:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const Oe={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const i=ge.from(e.headers).normalize(),o=e.responseType;let a;function s(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}W.isFormData(r)&&(ae.isStandardBrowserEnv||ae.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+n))}const c=Se(e.baseURL,e.url);function u(){if(!l)return;const r=ge.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new G("Request failed with status code "+n.status,[G.ERR_BAD_REQUEST,G.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),s()}),(function(e){n(e),s()}),{data:o&&"text"!==o&&"json"!==o?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),re(c,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=u:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(u)},l.onabort=function(){l&&(n(new G("Request aborted",G.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new G("Network Error",G.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||oe;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new G(t,r.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,e,l)),l=null},ae.isStandardBrowserEnv){const t=(e.withCredentials||Re(c))&&e.xsrfCookieName&&Ee.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===r&&i.setContentType(null),"setRequestHeader"in l&&W.forEach(i.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),W.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&"json"!==o&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",ke(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",ke(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{l&&(n(!t||t.type?new we(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const f=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(c);f&&-1===ae.protocols.indexOf(f)?n(new G("Unsupported protocol "+f+":",G.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};W.forEach(Oe,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ce={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;ie instanceof ge?e.toJSON():e;function Le(e,t){t=t||{};const n={};function r(e,t,n){return W.isPlainObject(e)&&W.isPlainObject(t)?W.merge.call({caseless:n},e,t):W.isPlainObject(t)?W.merge({},t):W.isArray(t)?t.slice():t}function i(e,t,n){return W.isUndefined(t)?W.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!W.isUndefined(t))return r(void 0,t)}function a(e,t){return W.isUndefined(t)?W.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>i(je(e),je(t),!0)};return W.forEach(Object.keys(e).concat(Object.keys(t)),(function(r){const o=l[r]||i,a=o(e[r],t[r],r);W.isUndefined(a)&&o!==s||(n[r]=a)})),n}const Ne={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ne[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Pe={};Ne.transitional=function(e,t,n){function r(e,t){return"[Axios v1.3.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new G(r(i," has been removed"+(t?" in "+t:"")),G.ERR_DEPRECATED);return t&&!Pe[i]&&(Pe[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};const ze={assertOptions:function(e,t,n){if("object"!=typeof e)throw new G("options must be an object",G.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const t=e[o],n=void 0===t||a(t,o,e);if(!0!==n)throw new G("option "+o+" must be "+n,G.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new G("Unknown option "+o,G.ERR_BAD_OPTION)}},validators:Ne},Ie=ze.validators;class Te{constructor(e){this.defaults=e,this.interceptors={request:new ie,response:new ie}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Le(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;let o;void 0!==n&&ze.assertOptions(n,{silentJSONParsing:Ie.transitional(Ie.boolean),forcedJSONParsing:Ie.transitional(Ie.boolean),clarifyTimeoutError:Ie.transitional(Ie.boolean)},!1),void 0!==r&&ze.assertOptions(r,{encode:Ie.function,serialize:Ie.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase(),o=i&&W.merge(i.common,i[t.method]),o&&W.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=ge.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,f=0;if(!s){const e=[Be.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);f{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new we(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Me((function(t){e=t})),cancel:e}}}const He=Me,Fe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Fe).forEach((([e,t])=>{Fe[t]=e}));const We=Fe,Ue=function e(t){const n=new De(t),r=c(De.prototype.request,n);return W.extend(r,De.prototype,n,{allOwnKeys:!0}),W.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Le(t,n))},r}(ue);Ue.Axios=De,Ue.CanceledError=we,Ue.CancelToken=He,Ue.isCancel=_e,Ue.VERSION="1.3.4",Ue.toFormData=X,Ue.AxiosError=G,Ue.Cancel=Ue.CanceledError,Ue.all=function(e){return Promise.all(e)},Ue.spread=function(e){return function(t){return e.apply(null,t)}},Ue.isAxiosError=function(e){return W.isObject(e)&&!0===e.isAxiosError},Ue.mergeConfig=Le,Ue.AxiosHeaders=ge,Ue.formToJSON=e=>se(W.isHTMLForm(e)?new FormData(e):e),Ue.HttpStatusCode=We,Ue.default=Ue;const qe=Ue;var Ve=n(4184),Ge=n.n(Ve),Je=n(8751),Ye=n.n(Je);const Ke=window.React,$e=new Map,Xe=new WeakMap;let Ze=0;function Qe(e,t,n={},r=undefined){if(void 0===window.IntersectionObserver&&void 0!==r){const i=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}const{id:i,observer:o,elements:a}=function(e){let t=function(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(n=e.root,n?(Xe.has(n)||(Ze+=1,Xe.set(n,Ze.toString())),Xe.get(n)):"0"):e[t]}`;var n})).toString()}(e),n=$e.get(t);if(!n){const r=new Map;let i;const o=new IntersectionObserver((t=>{t.forEach((t=>{var n;const o=t.isIntersecting&&i.some((e=>t.intersectionRatio>=e));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=r.get(t.target))||n.forEach((e=>{e(o,t)}))}))}),e);i=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},$e.set(t,n)}return n}(n);let s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),o.observe(e),function(){s.splice(s.indexOf(t),1),0===s.length&&(a.delete(e),o.unobserve(e)),0===a.size&&(o.disconnect(),$e.delete(i))}}class et extends Ke.Component{constructor(e){super(e),this.node=null,this._unobserveCb=null,this.handleNode=e=>{this.node&&(this.unobserve(),e||this.props.triggerOnce||this.props.skip||this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=e||null,this.observeNode()},this.handleChange=(e,t)=>{e&&this.props.triggerOnce&&this.unobserve(),isPlainChildren(this.props)||this.setState({inView:e,entry:t}),this.props.onChange&&this.props.onChange(e,t)},this.state={inView:!!e.initialInView,entry:void 0}}componentDidUpdate(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve(),this.node=null}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:i,fallbackInView:o}=this.props;this._unobserveCb=Qe(this.node,this.handleChange,{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:i},o)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){if(!isPlainChildren(this.props)){const{inView:e,entry:t}=this.state;return this.props.children({inView:e,entry:t,ref:this.handleNode})}const e=this.props,{children:t,as:n}=e,r=function(e,t){if(null==e)return{};for(var n,r,i={},o=Object.keys(e);r=0||(i[n]=e[n]);return i}(e);return React.createElement(n||"div",_extends({ref:this.handleNode},r),t)}}function tt({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:i,triggerOnce:o,skip:a,initialInView:s,fallbackInView:l,onChange:c}={}){var u;const[f,h]=Ke.useState(null),d=Ke.useRef(),[p,m]=Ke.useState({inView:!!s,entry:void 0});d.current=c,Ke.useEffect((()=>{if(a||!f)return;let s;return s=Qe(f,((e,t)=>{m({inView:e,entry:t}),d.current&&d.current(e,t),t.isIntersecting&&o&&s&&(s(),s=void 0)}),{root:i,rootMargin:r,threshold:e,trackVisibility:n,delay:t},l),()=>{s&&s()}}),[Array.isArray(e)?e.toString():e,f,i,r,o,a,n,l,t]);const v=null==(u=p.entry)?void 0:u.target,g=Ke.useRef();f||!v||o||a||g.current===v||(g.current=v,m({inView:!!s,entry:void 0}));const y=[h,p.inView,p.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}var nt=(0,i.createContext)();function rt(e){var t=e.value,n=e.children;return React.createElement(nt.Provider,{value:t},n)}function it(){return(0,i.useContext)(nt)}function ot(e){return e&&at[e.toLowerCase()].icon?at[e.toLowerCase()].icon():null}var at={proxy:"https://proxy.getinstantimages.com/api/",testmode:!1,defaults:{provider:"unsplash",order:"latest",per_page:"20",arr_key:"results"},providers:["Unsplash","Openverse","Pixabay","Pexels"],unsplash:{name:"Unsplash",requires_key:!0,new:!1,api_var:"client_id",collections_api:"https://api.unsplash.com/collections/",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M10 9V0H22V9H10ZM22 14H32V32H0V14H10V23H22V14Z",fill:"black"}))}},pixabay:{name:"Pixabay",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("g",{clipPath:"url(#clip0_307_143)"},React.createElement("path",{d:"M0 0V32H32V0H0Z",fill:"#48A947"}),React.createElement("path",{d:"M6.83734 22.3147V28C5.93067 28.0427 5.02401 28.032 4.11734 27.9787C4.09601 27.7014 4.06401 27.4667 4.06401 27.2427C4.06401 23.2427 4.05334 19.2534 4.06401 15.2534C4.07467 12.032 5.97334 9.32269 8.85334 8.37335C13.1307 6.95469 17.4507 10.048 17.8453 14.3894C18.144 17.6534 16.4267 20.5547 13.568 21.7814C12.6507 22.176 11.6907 22.304 10.7093 22.304C9.45067 22.3147 8.21334 22.3147 6.83734 22.3147ZM6.84801 19.4454C8.24534 19.4454 9.54667 19.424 10.848 19.4454C13.1627 19.488 14.816 17.76 15.104 15.712C15.424 13.3654 13.7813 11.2107 11.4453 10.88H11.4347C9.25867 10.592 7.06134 12.2774 6.88001 14.528C6.74134 16.128 6.84801 17.728 6.84801 19.4454Z",fill:"#F9FBF9"}),React.createElement("path",{d:"M25.4827 14.9334L30.656 22.2081H27.3067L23.4667 16.9494C22.0694 18.6881 20.9067 20.4907 19.584 22.2081H16.2454L21.408 14.9334L16.8107 8.04272H20.16L23.4454 12.9494L26.7307 8.04272H30.0694L25.4827 14.9334Z",fill:"#FAFCFA"}),React.createElement("path",{d:"M6.848 19.4453C6.848 17.7279 6.74134 16.1173 6.86934 14.5386C7.05067 12.2879 9.248 10.6026 11.424 10.8906C13.7707 11.2106 15.4133 13.3653 15.0933 15.7119C14.816 17.7599 13.152 19.4879 10.8373 19.4453C9.54667 19.4239 8.24534 19.4453 6.848 19.4453Z",fill:"#4AA949"})),React.createElement("defs",null,React.createElement("clipPath",{id:"clip0_307_143"},React.createElement("rect",{width:"32",height:"32",fill:"white"}))))}},pexels:{name:"Pexels",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32px",height:"32px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M2 0h28a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2z",fill:"#05A081"}),React.createElement("path",{d:"M13 21h3.863v-3.752h1.167a3.124 3.124 0 1 0 0-6.248H13v10zm5.863 2H11V9h7.03a5.124 5.124 0 0 1 .833 10.18V23z",fill:"#fff"}))}},openverse:{name:"Openverse",requires_key:!1,new:!1,api_var:"key",key:"",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M25.8578 14.32C29.6708 14.32 32.7618 11.1144 32.7618 7.16C32.7618 3.20564 29.6708 0 25.8578 0C22.0448 0 18.9539 3.20564 18.9539 7.16C18.9539 11.1144 22.0448 14.32 25.8578 14.32Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 7.16C0.761841 11.1 3.84742 14.32 7.66584 14.32V0C3.84742 0 0.761841 3.2 0.761841 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 7.16C9.85791 11.1 12.9435 14.32 16.7619 14.32V0C12.9628 0 9.85791 3.2 9.85791 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M25.8578 31.9399C29.6708 31.9399 32.7618 28.7343 32.7618 24.78C32.7618 20.8256 29.6708 17.62 25.8578 17.62C22.0448 17.62 18.9539 20.8256 18.9539 24.78C18.9539 28.7343 22.0448 31.9399 25.8578 31.9399Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 24.7801C9.85791 28.72 12.9435 31.9401 16.7619 31.9401V17.64C12.9628 17.64 9.85791 20.84 9.85791 24.7801Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 24.84C0.761841 28.8 3.84742 32 7.66584 32V17.7C3.84742 17.7 0.761841 20.9 0.761841 24.84Z",fill:"#000000"}))}}},st=[{label:(0,o.__)("WordPress","instant-images"),value:"wordpress"},{label:(0,o.__)("Flickr","instant-images"),value:"flickr"},{label:(0,o.__)("Nasa","instant-images"),value:"nasa"},{label:(0,o.__)("SpaceX","instant-images"),value:"spacex"},{label:(0,o.__)("Wikimedia","instant-images"),value:"wikimedia"}],lt=[{label:(0,o.__)("Square","instant-images"),value:"square"},{label:(0,o.__)("Tall","instant-images"),value:"tall"},{label:(0,o.__)("Wide","instant-images"),value:"wide"}],ct=[{label:(0,o.__)("Red","instant-images"),value:"red"},{label:(0,o.__)("Orange","instant-images"),value:"orange"},{label:(0,o.__)("Yellow","instant-images"),value:"yellow"},{label:(0,o.__)("Green","instant-images"),value:"green"},{label:(0,o.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,o.__)("Blue","instant-images"),value:"blue"},{label:(0,o.__)("Violet","instant-images"),value:"violet"},{label:(0,o.__)("Pink","instant-images"),value:"pink"},{label:(0,o.__)("Brown","instant-images"),value:"brown"},{label:(0,o.__)("Black","instant-images"),value:"black"},{label:(0,o.__)("Gray","instant-images"),value:"gray"},{label:(0,o.__)("White","instant-images"),value:"white"}],ut=[{label:(0,o.__)("Landscape","instant-images"),value:"landscape"},{label:(0,o.__)("Portrait","instant-images"),value:"portrait"},{label:(0,o.__)("Square","instant-images"),value:"squarish"}],ft=[{label:(0,o.__)("Grayscale","instant-images"),value:"grayscale"},{label:(0,o.__)("Red","instant-images"),value:"red"},{label:(0,o.__)("Orange","instant-images"),value:"orange"},{label:(0,o.__)("Yellow","instant-images"),value:"yellow"},{label:(0,o.__)("Green","instant-images"),value:"green"},{label:(0,o.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,o.__)("Blue","instant-images"),value:"blue"},{label:(0,o.__)("Lilac","instant-images"),value:"lilac"},{label:(0,o.__)("Pink","instant-images"),value:"pink"},{label:(0,o.__)("White","instant-images"),value:"white"},{label:(0,o.__)("Gray","instant-images"),value:"gray"},{label:(0,o.__)("Black","instant-images"),value:"black"},{label:(0,o.__)("Brown","instant-images"),value:"brown"},{label:(0,o.__)("Transparent","instant-images"),value:"transparent"}],ht=[{label:(0,o.__)("Backgrounds","instant-images"),value:"backgrounds"},{label:(0,o.__)("Fashion","instant-images"),value:"fashion"},{label:(0,o.__)("Nature","instant-images"),value:"nature"},{label:(0,o.__)("Science","instant-images"),value:"science"},{label:(0,o.__)("Education","instant-images"),value:"education"},{label:(0,o.__)("Feelings","instant-images"),value:"feelings"},{label:(0,o.__)("Health","instant-images"),value:"health"},{label:(0,o.__)("People","instant-images"),value:"people"},{label:(0,o.__)("Religion","instant-images"),value:"religion"},{label:(0,o.__)("Places","instant-images"),value:"places"},{label:(0,o.__)("Animals","instant-images"),value:"animals"},{label:(0,o.__)("Industry","instant-images"),value:"industry"},{label:(0,o.__)("Computer","instant-images"),value:"computer"},{label:(0,o.__)("Food","instant-images"),value:"food"},{label:(0,o.__)("Sports","instant-images"),value:"sports"},{label:(0,o.__)("Food","instant-images"),value:"food"},{label:(0,o.__)("Transportation","instant-images"),value:"transportation"},{label:(0,o.__)("Travel","instant-images"),value:"travel"},{label:(0,o.__)("Buildings","instant-images"),value:"buildings"},{label:(0,o.__)("Business","instant-images"),value:"business"},{label:(0,o.__)("Music","instant-images"),value:"music"}],dt=[{label:(0,o.__)("Horizontal","instant-images"),value:"horizontal"},{label:(0,o.__)("Vertical","instant-images"),value:"vertical"}],pt=[{label:(0,o.__)("Photo","instant-images"),value:"photo"},{label:(0,o.__)("Illustration","instant-images"),value:"illustration"},{label:(0,o.__)("Vector","instant-images"),value:"vector"}],mt=[{label:(0,o.__)("Black & White","instant-images"),value:"black_and_white"},{label:(0,o.__)("Black","instant-images"),value:"black"},{label:(0,o.__)("White","instant-images"),value:"white"},{label:(0,o.__)("Yellow","instant-images"),value:"yellow"},{label:(0,o.__)("Green","instant-images"),value:"green"},{label:(0,o.__)("Orange","instant-images"),value:"orange"},{label:(0,o.__)("Red","instant-images"),value:"red"},{label:(0,o.__)("Purple","instant-images"),value:"purple"},{label:(0,o.__)("Magenta","instant-images"),value:"magenta"},{label:(0,o.__)("Teal","instant-images"),value:"teal"},{label:(0,o.__)("Blue","instant-images"),value:"blue"}],vt=[{label:(0,o.__)("Landscape","instant-images"),value:"landscape"},{label:(0,o.__)("Portrait","instant-images"),value:"portrait"},{label:(0,o.__)("Square","instant-images"),value:"squarish"}];function gt(e){return function(e){if(Array.isArray(e))return yt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return yt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&parseInt(n)<2&&alert(instant_img_localize.api_ratelimit_msg)}}function Mt(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Ht="";function Ft(e){var t=e.currentTarget,n=t.getBoundingClientRect(),r=Math.round(n.left),i=Math.round(n.top),o=t.closest("#photo-listing").querySelector("#tooltip");o.classList.remove("over"),t.classList.contains("tooltip--above")?o.classList.add("above"):o.classList.remove("above"),Ht=setInterval((function(){clearInterval(Ht),o.innerHTML=t.dataset.title,r=r-o.offsetWidth+t.offsetWidth+5,o.style.left="".concat(r,"px"),o.style.top="".concat(i,"px"),setTimeout((function(){o.classList.add("over")}),25)}),750)}function Wt(e){clearInterval(Ht),e.currentTarget.closest("#photo-listing").querySelector("#tooltip").classList.remove("over")}function Ut(e){e&&window&&window.open(e,"_blank")}function qt(){var e=instant_img_localize;switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:200){case 400:case 401:return e.api_invalid_msg;case 403:return e.api_invalid_403_msg;case 404:return e.api_invalid_404_msg;case 429:return e.api_ratelimit_msg;case 500:case 503:return e.api_invalid_500_msg;case 501:return e.api_invalid_501_msg}}function Vt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=instant_img_localize,r=qt(t);switch(t){case 400:case 401:case 500:case 429:console.warn("[".concat(n.instant_images," - ").concat(t," Error] ").concat(Mt(e),": ").concat(r))}}function Gt(e){return e&&e[at.defaults.arr_key]||[]}function Jt(e){return void 0===e.total||null===e.total?0:e.total}function Yt(e){if(!e||at.testmode)return!1;var t=sessionStorage.getItem(Tt(e));if(!t)return!1;var n=JSON.parse(t),r=n.expires,i=void 0===r?0:r,o=n.error;if(void 0!==o&&o)return!1;var a=Date.now()>i;return a&&$t(e),!(!n||a)&&n}function Kt(e,t){if(!e||!t||null!=t&&t.error)return!1;t.expires=Date.now()+36e5,sessionStorage.setItem(Tt(e),JSON.stringify(t))}function $t(e){if(!e)return!1;sessionStorage.removeItem(Tt(e))}function Xt(e){return Xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xt(e)}function Zt(){Zt=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new x(i||[]);return r(a,"_invoke",{value:w(e,n,s)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function i(r,o,a,s){var l=u(e[r],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==Xt(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,s)}))}s(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function w(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=u(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function Qt(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function en(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,_x,o,a=[],_n=!0,s=!1;try{if(_x=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;_n=!1}else for(;!(_n=(r=_x.call(n)).done)&&(a.push(r.value),a.length!==t);_n=!0);}catch(e){s=!0,i=e}finally{try{if(!_n&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=1?null:React.createElement("div",{className:"instant-images-no-results"},React.createElement("div",null,React.createElement("h3",null,instant_img_localize.no_results," "),React.createElement("p",null,instant_img_localize.no_results_desc," ")))}var hn=at.providers;function dn(e){var t=e.switchProvider,n=it().provider;return React.createElement(i.Fragment,null,!(null==hn||!hn.length)&&React.createElement("nav",{className:"provider-nav"},hn.map((function(e,r){return React.createElement("div",{key:"provider-".concat(r)},React.createElement("button",{onClick:function(){return t(e.toLowerCase())},className:n===e.toLowerCase()?"provider-nav--btn active":"provider-nav--btn"},ot(e),React.createElement("span",null,e),at[e.toLowerCase()].new&&React.createElement("span",{className:"provider-nav--new"},instant_img_localize.new)))}))))}function pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=200&&t.status<400&&JSON.parse(t.response).success||o(!1)},t.onerror=function(e){console.warn(e),o(!1)}}),[]),React.createElement(i.Fragment,null,r?null:React.createElement("div",{className:"error-messaging"},React.createElement("strong",null,instant_img_localize.error_restapi),instant_img_localize.error_restapi_desc))}const vn=window.wp.data;function gn(e,n){var r=e.id,i=void 0===r?null:r,o=e.url,a=void 0===o?null:o,s=e.caption,l=void 0===s?"":s,c=e.alt,u=void 0===c?"":c;if(a&&i){var f=(0,t.createBlock)("core/image",{id:i,url:a,caption:l,alt:u});n?(0,vn.dispatch)("core/block-editor").replaceBlock(n,f):(0,vn.dispatch)("core/block-editor").insertBlocks(f)}}function yn(e){return yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yn(e)}function bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wn(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&React.createElement("img",{className:"user-wrap--photo",src:j,alt:""}),B)),React.createElement("div",{className:"photo-options"},h&&!Z?React.createElement(i.Fragment,null,React.createElement("button",{type:"button",className:"set-featured fade","data-title":instant_img_localize.set_as_featured,onMouseEnter:function(e){return Ft(e)},onMouseLeave:function(e){return Wt(e)},onClick:function(e){return function(e){Wt(e),te.current&&(ie=!0,te.current.click())}(e)}},React.createElement("i",{className:"fa fa-picture-o","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.set_as_featured)),React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(e){return Ft(e)},onMouseLeave:function(e){return Wt(e)},onClick:function(e){return ae(e)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post))):null,!!l&&React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(e){return Ft(e)},onMouseLeave:function(e){return Wt(e)},onClick:function(e){return ae(e)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post)),Z?React.createElement("button",{onClick:function(){Z&&(window.location=Z)},className:"edit-photo-admin fade","data-title":instant_img_localize.edit_upload,onMouseEnter:function(e){return Ft(e)},onMouseLeave:function(e){return Wt(e)}},React.createElement("i",{className:"fa fa-pencil","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_upload)):React.createElement("button",{onClick:function(e){return function(e){e.preventDefault(),Wt(e);var t=document.querySelectorAll(".edit-screen.editing");t&&t.forEach((function(e){e.classList.remove("editing")})),ne.current.classList.add("editing"),setTimeout((function(){ne.current.focus({preventScroll:!0})}),150)}(e)},className:"edit-photo fade","data-title":instant_img_localize.edit_details,onMouseEnter:function(e){return Ft(e)},onMouseLeave:function(e){return Wt(e)}},React.createElement("i",{className:"fa fa-cog","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_details)))),React.createElement("div",{className:"photo-meta"},S?React.createElement("span",{className:"likes tooltip--above","data-title":S+" "+P,onMouseEnter:function(e){return Ft(e)},onMouseLeave:function(e){return Wt(e)}},React.createElement("i",{className:"fa fa-heart heart-like","aria-hidden":"true"})," ",S):null,React.createElement("a",{className:"tooltip--above",href:v,"data-title":"".concat(instant_img_localize.open_external," ").concat(Mt(a)),onMouseEnter:function(e){return Ft(e)},onMouseLeave:function(e){return Wt(e)},rel:"noopener noreferrer",target:"_blank"},React.createElement("i",{className:"fa fa-external-link","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},"".concat(instant_img_localize.open_external," ").concat(Mt(a)))))),React.createElement("div",{className:"edit-screen",tabIndex:"0",ref:ne},React.createElement("div",{className:"edit-screen--title"},React.createElement("div",null,React.createElement("p",{className:"heading"},instant_img_localize.edit_details),R&&R.length>0&&React.createElement("p",{className:"dimensions"},R)),React.createElement("div",{className:"preview",style:{backgroundImage:"url(".concat(O,")")}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_filename,":"),React.createElement("input",{type:"text",name:"filename","data-original":m,placeholder:U.filename,value:U.filename,onChange:function(e){return ce(e)}}),React.createElement("em",null,".",E)),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_title,":"),React.createElement("input",{type:"text",name:"title","data-original":g,placeholder:g,value:U.title||"",onChange:function(e){return ce(e)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_alt,":"),React.createElement("input",{type:"text",name:"alt","data-original":y,value:U.alt||"",onChange:function(e){return ce(e)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_caption,":"),React.createElement("textarea",{rows:"4",name:"caption","data-original":F,onChange:function(e){return ce(e)},value:U.caption||"",ref:re})),H?React.createElement("div",{className:"add-attribution-row"},React.createElement("button",{onClick:function(e){return function(e){e.preventDefault(),re.current.value=H,q(wn(wn({},U),{},{caption:H}))}(e)},type:"button"},instant_img_localize.attribution)):null,React.createElement("div",{className:"edit-screen--controls"},React.createElement("button",{type:"button",className:"button button-secondary",onClick:function(e){return q({filename:m,title:g,alt:y,caption:F}),ne.current.classList.remove("editing"),void te.current.focus({preventScrol:!0})}},instant_img_localize.cancel)," "," ",React.createElement("button",{type:"button",className:"button button-primary",onClick:function(){return ne.current.classList.remove("editing"),void te.current.click()}},l?instant_img_localize.insert_into_post:instant_img_localize.upload_now))),React.createElement("div",{className:"photo-status"})))}function kn(e){var t=e.result.data,n=void 0===t?null:t,r=(null==n?void 0:n.url)||"",o=(null==n?void 0:n.title)||"",a=(null==n?void 0:n.description)||"",s=(null==n?void 0:n.avatar)||"",l=n.image,c=void 0===l?null:l,u=c.src,f=void 0===u?null:u,h=c.alt,d=void 0===h?null:h,p=(0,i.useRef)(),m=(0,i.useRef)();return React.createElement(i.Fragment,null,c&&r?React.createElement("article",{className:"photo feature",title:a,ref:p,onClick:function(){return m.current.click()}},React.createElement("div",{className:"photo--wrap"},React.createElement("span",{className:"flag",title:instant_img_localize.advertisement},instant_img_localize.ad),React.createElement("div",{className:"img-wrap"},React.createElement("a",{className:"loaded",href:r,target:"_blank",ref:m,rel:"noreferrer"},React.createElement("img",{src:f,alt:d}))),React.createElement("div",{className:"feature-title"},s&&React.createElement("img",{src:s,alt:o}),React.createElement("span",null,o)))):null)}function On(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&t.splice(n,1),t.length>=10&&(t.length=10),t.unshift(e),localStorage.setItem(In,JSON.stringify(t))}else localStorage.setItem(In,JSON.stringify([e]))}(r),g(Dn())))}(e)},autoComplete:"off"},React.createElement("label",{htmlFor:"search-input",className:"offscreen"},instant_img_localize.search_label),React.createElement("div",{ref:w},React.createElement("input",{ref:t,type:"text",id:"search-input",placeholder:instant_img_localize.search,disabled:h,onChange:function(e){return c&&p(e.target.value)},onFocus:function(){return b(!0)}}),c&&((null==v?void 0:v.length)||(null==d?void 0:d.length))?React.createElement(Vn,{show:_,history:v,setHistory:g,setSearchValue:function(e){var n=null==t?void 0:t.current;n.value=e,null==E||E.current.click(),n.focus()},container:w}):null,!s&&React.createElement(qn,{show:_})),React.createElement("button",{type:"submit",disabled:h,ref:E},React.createElement("i",{className:"fa fa-search"}),React.createElement("span",{className:"offscreen"},instant_img_localize.search)),React.createElement(Gn,{show:_})))}));function $n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tr(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==h[0]&&h[0],!D){e.next=3;break}return e.abrupt("return",!1);case 3:if(n||""===(null==pe||null===(t=pe.current)||void 0===t?void 0:t.value)){e.next=7;break}if(!v||!y){e.next=7;break}return Oe(pe.current.value),e.abrupt("return");case 7:if(I(!0),d=void 0,(null==pe||null===(d=pe.current)||void 0===d?void 0:d.value)&&(pe.current.value=""),X(w),ee([]),Pe(),ur=1,r=Ot(k,oe),i=Nt("photos",r),!(o=Yt(i))){e.next=18;break}Ae(Gt(o),!1,null),e.next=37;break;case 18:return e.next=20,fetch(i);case 20:return a=e.sent,l=a.status,Dt(a.headers),e.prev=23,e.next=26,a.json();case 26:c=e.sent,u=c.error,f=void 0===u?null:u,Ae(Gt(c),!1,f),Kt(i,c),e.next=37;break;case 32:e.prev=32,e.t0=e.catch(23),Vt(s,l),I(!1),$t(i);case 37:setTimeout((function(){I(!1)}),_);case 38:case"end":return e.stop()}var d}),e,null,[[23,32]])}))),Re.apply(this,arguments)}function xe(){return ke.apply(this,arguments)}function ke(){return(ke=or(Qn().mark((function e(){var t,n,r,i,o,a,l,c,u,f,h,d;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(L&&!z&&!D&&!F){e.next=2;break}return e.abrupt("return");case 2:if(M(!0),ur=parseInt(ur)+1,t=null!=$&&$.active&&null!=$&&$.term?{term:$.term}:{},n=null!=$&&$.active?"search":"photos",r=null!=$&&$.active?le:oe,i=tr(tr(tr({},{page:ur}),t),r),o=Ot(k,i),a=Nt(n,o),!(l=Yt(a))){e.next=15;break}Ae(Gt(l),!0,null),e.next=34;break;case 15:return e.next=17,fetch(a);case 17:return c=e.sent,u=c.status,Dt(c.headers),e.prev=20,e.next=23,c.json();case 23:f=e.sent,h=f.error,d=void 0===h?null:h,Ae(Gt(f),!0,d),Kt(a,f),e.next=34;break;case 29:e.prev=29,e.t0=e.catch(20),Vt(s,u),M(!1),$t(a);case 34:case"end":return e.stop()}}),e,null,[[20,29]])})))).apply(this,arguments)}function Oe(e){return Ce.apply(this,arguments)}function Ce(){return(Ce=or(Qn().mark((function e(t){var n,r,i,o,a,l,c,u,f,h,d;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(I(!0),Pe(),ur=1,n="id:"===t.substring(0,3)?"id":"term",r="id"===n?{id:t.replace("id:","").replace(/\s+/,"")}:{term:t},i=tr(tr(tr({},{page:ur}),r),le),o=Ot(k,i),a=Nt("search",o),!(l=Yt(a))){e.next=14;break}Ae(Gt(l),!1,null),X({active:!0,term:t,type:n,results:Jt(l)}),e.next=35;break;case 14:return e.next=16,fetch(a);case 16:return c=e.sent,u=c.status,Dt(c.headers),e.prev=19,e.next=22,c.json();case 22:f=e.sent,h=f.error,d=void 0===h?null:h,Ae(Gt(f),!1,d),X({active:!0,term:t,type:n,results:Jt(f)}),Kt(a,f),e.next=35;break;case 29:e.prev=29,e.t0=e.catch(19),W(!0),I(!1),Vt(s,u),$t(a);case 35:pe.current.classList.remove(b);case 36:case"end":return e.stop()}}),e,null,[[19,29]])})))).apply(this,arguments)}function Ae(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;e=null==t?void 0:t.length,W(0===parseInt(e)||void 0===e),R(n?function(e){return[].concat(rr(e),rr(t))}:t),V(r)}function Be(e,t){var n=tr({},oe);n[e]&&"#"===t||""===t||"all"===t?delete n[e]:n[e]=t,ae(tr({},n))}function je(e){return Le.apply(this,arguments)}function Le(){return(Le=or(Qn().mark((function e(t){var n,r;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(k!==t){e.next=2;break}return e.abrupt("return");case 2:if(I(!0),V(!1),Y(!1),be.classList.remove("overflow-hidden"),!at[t].requires_key||A.includes(t)){e.next=27;break}return e.prev=7,e.next=10,fetch(Pt(t));case 10:if(n=e.sent,r=n.status,Dt(n.headers),200===r){e.next=18;break}return Y(t),V(!0),be.classList.add("overflow-hidden"),e.abrupt("return");case 18:200===r&&B((function(e){return[].concat(rr(e),[t])})),e.next=27;break;case 21:return e.prev=21,e.t0=e.catch(7),Y(t),be.classList.add("overflow-hidden"),V(!0),e.abrupt("return");case 27:setTimeout((function(){re(bt[t].filters),O(t)}),_);case 28:case"end":return e.stop()}}),e,null,[[7,21]])})))).apply(this,arguments)}function Ne(){return(Ne=or(Qn().mark((function e(t){var n;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&!((null==t?void 0:t.length)<3)){e.next=2;break}return e.abrupt("return");case 2:return n=instant_img_localize.root+"instant-images-extended/suggestions/?term=".concat(t),e.next=5,qe.get(n).then((function(e){ee(e.data)})).catch((function(e){console.warn(e)}));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Pe(){ve&&null!=de&&de.current&&(null==de||de.current.scroll({top:0,left:0,behavior:"smooth"}))}function ze(e){if("Escape"===e.key){var t=de.current.querySelectorAll(".edit-screen.editing");t&&rr(t).forEach((function(e){null==e||e.classList.remove("editing")}))}}return(0,i.useEffect)((function(){null!=$&&$.active||ce({})}),[$]),(0,i.useEffect)((function(){L&&null!=$&&$.active&&Oe(null==$?void 0:$.term)}),[le]),(0,i.useEffect)((function(){L&&Se()}),[oe]),(0,i.useEffect)((function(){re(bt[k].filters),ae({})}),[k]),(0,i.useEffect)((function(){xe()}),[he]),(0,i.useEffect)((function(){cr(de.current,(function(){ye||(me.current=new(Ye())(de.current,{itemSelector:".photo"}),de.current.querySelectorAll(".photo").forEach((function(e){e.classList.add("in-view")}))),setTimeout((function(){I(!1),M(!1),L||N(!0)}),_)}))}),[S]),(0,i.useEffect)((function(){return I(!1),Ee.classList.add("loaded"),ye&&Se(),document.addEventListener("keydown",ze,!1),function(){document.removeEventListener("keydown",ze,!1)}}),[]),React.createElement(i.Fragment,null,React.createElement(rt,{value:{provider:k,wpBlock:ve,mediaModal:_e,blockSidebar:ge,clientId:d,search:$,apiError:q,getPhotos:Se,searchHandler:function(e){e.preventDefault();var t=pe.current.value;t.length>2?(pe.current.classList.add(b),Oe(t)):pe.current.focus()},filterSearch:function(e,t){var n=tr({},le);n[e]&&"#"===t||""===t||"all"===t?delete n[e]:n[e]=t,ce(tr({},n))},suggestions:Q,getSuggestions:function(e){return Ne.apply(this,arguments)}}},ve?React.createElement(Et,{switchProvider:je}):React.createElement(React.Fragment,null,React.createElement(dn,{switchProvider:je}),React.createElement(Un,null)),React.createElement(mn,null),React.createElement("div",{className:"control-nav"},React.createElement("div",{className:Ge()("control-nav--filters-wrap",q||null!=$&&$.active?"inactive":null)},ne&&null!==(r=Object.entries(ne))&&void 0!==r&&r.length?React.createElement("div",{className:"control-nav--filters"},Object.entries(ne).map((function(e,t){var n=ar(e,2),r=n[0],i=n[1];return React.createElement(cn,{key:"".concat(k,"-").concat(t,"-").concat(r),data:i,filterKey:r,handler:Be})}))):null),React.createElement(Kn,{ref:pe})),React.createElement("div",{id:"photo-listing",className:z?"loading":null},React.createElement(Xn,null),ve?React.createElement(Nn,{ref:de,data:S,done:F,loadMorePhotos:xe}):React.createElement(Cn,{ref:de,data:S}),React.createElement(fn,{total:null==$?void 0:$.results,is_search:null==$?void 0:$.active}),React.createElement(un,{ref:fe,loadMorePhotos:xe,loading:D,done:F}),React.createElement(nn,{provider:J,callback:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&O(e),Y(!1),I(!1),V(!1),be.classList.remove("overflow-hidden")}}),React.createElement(rn,null),React.createElement(Pn,null))))}const hr=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"connekthq/instant-images","version":"1.0.0","title":"Instant Images","category":"media","description":"One click photo uploads from Unsplash, Openverse, Pixabay and Pexels.","keywords":["image","instant images","photo","stock photos","Unsplash","Openverse","Pixabay","Pexels"],"attributes":{},"supports":{"customClassName":false,"anchor":false,"html":false},"textdomain":"instant-images","editorScript":"file:./index.js"}');function dr(){return React.createElement("div",{style:{width:"300px",padding:"0 10px"}},React.createElement("p",null,React.createElement("strong",null,(0,o.__)("Instant Images Help","instant-images"))),React.createElement("ol",null,React.createElement("li",null,(0,o.__)("Browse photos from the various stock image providers.","instant-images")),React.createElement("li",null,(0,o.__)("Select/click an image to immediately start the upload process.","instant-images")),React.createElement("li",null,(0,o.__)("Uploaded image will be inserted directly into the post using the WordPress core Image block.","instant-images"))))}function pr(e){return pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pr(e)}function mr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);npJdFE7h`I{IF)1A#Um5ut4eDm1GK0RjYM5fBtqV$|RUvIqo$u!IC; z4Pgx^2_%MSi--$IYa>Xr*ig8lcIyCbiy-c0kKNNX4%jtSQ#E{;s;TO^A8*~dw|?h; z&Z)XwUvEdJ7$(33-T}bJj~~N?XYT(vd-}rI$nB}Fp2w-uZ%gV1pG>`-efj>@*t9V1 z(w2R#z`vH+M`V*%=w^<4kk=X;HfS)nZ}tykPQvb(q}>8$N^Fvl8M7}Y^*~&Vz$W(4 zo;bklSBOHLJGFZLhWSSUXlluTZ)}WaW_XIvlUOu(qlQf(1b0Q~xz!}in$45eYq*_4Z+vi>~|l|D))^`;|!o&v$am4_Lrk>I$G%#NgH=w zdwKqxfJRD5<+?>e)V(w)H^qmaZ+ZlFcayUz;ZgNbG8YPg2sUf#Pq=9GN*`UJ`qb%$ zcGDX6#S2NSa-YP4V+oP2K3O)|cwfP#D#}$k|66>kF~2|1Yp*j@lf{jUw&`|z=>FHh z;QGY;r@%}UzgKAEH0zeQ_kGs!T}AJ9Pnu%)t+CR3`Fnt`Jm-}8PxhI4_Q>X$;ggZx z_Ou4?vODS!xK|O%r*kj+NxHgcPy6c|1QW)uS4tuerZS$DD0)#th#7^_Xd7#cF!9Va z!#XAzIt$s+e_t7r+a||-FzPx3yWsOb91Vw!SOgJtga&1;*vFPqOK1m*xO>ytnP7oy zwksuXn|hm6Se~j;aa$m2T8p~nWUI94V%4_e?CQ&mZ@A~n89HrHzNjAS7Y<%kU9Z_M z>cL`-s|U$xC5<vqryvguBb!+xC@S^j1ln|fV)>`rk=x>%4zF%4SMS0_v z<6m8J95)&;BP@jfat`0hZVrFSj%zQ7maM8&h4i0Ogsv%4?DNk{@4fBH#J7#wj|b4M zj#JsAMphCdD$~DXS+g%8|Mfx1u$QiXC+$2$jK?%#R3sbPzK6yl=WK5y4m>d>z{#i! zP7sL*8SK0W28CL%nGNnvF-?Q^yOQczloNqXO$8N{a;>OYpDzFUwEk#|zWHL4n$>Ai z*G0SH-5OhD*P~#|3dB(BeXu#!P-~(b5GSFz@~rx_V}KuaQ^Sl7=eg z-Nq1Uj3U%y$%E#__{7!t^_CYan|G7nTgYn7Wgsm|y28tjV{k}(y@ZxKm^pSA@H1My z?8nvaF_mP!aYIvOf!B9}~&UltdPrj{(cTm)>utk%LHiV8Q5w_UI!zAv?z$8y% z%np-8D9!YMr)5A*EsoST9HtZ|?W$?eAS!jO7U4Il*VMInf)!-}Ac{JhmR~UL>_kch zDjACaccXBYdL1j#3hC}DPtJvMz1Gq?&?X=~h}Rb@1l)+>0czU&Nk z3wz}+kQe^#%g8fY>U&{M)&6I}s-xmO%zh#nyNa%h{NPK=H84EYNPspi;%`Bu#p2|0 zslAf=@>)X9FO<`)G(O|A_1js5INO9HrU#rX{pA%nTvbhSS)MO-sy+cL>nj@JT1k^a z?*xij#U?}q0guHxwYS3!n2yOIlR6QSdA^4!hlQJ4mfY>$BUWLN}I z#?W;C#~XrxArw(41J?n_*l4%c?RU`6a%K2)3wp=Xp```_fZ#W}!U~i8B|dyDjuez&gm<;M9c6U5lV}YsIFV?iW#Bqh)W+$XRw_fomRlQfhZ3 zIQag;r>dHNzH{BDy3Uc}QSCxGciP;Ntgqkt!^5O2a=wX}w}NBIlNI1#Q86(kV}q<% z0hY^om0)SC$f2;&8BERLK`>0ra_8uDq!TMMoU%w~U{aDO%9MyiK^Jv;PkXvcDu^JR zI8oOYoGn;|-UBE%kT%{H>>i2@A#h=U$2bn(0A;@Cr!nZEEWqszM!M0=NW?!(c3g4v zj4{Y1s{Cj>H~Mp-g_`iypTW-+(dU3=rH&b*0(r3_vrx&3$m0<}(8)B{S*^=vXEd`Y zL>)++Cx>7Ua$EBO`YseS24R@wujU75!zkL1+yp3naG8uaf*RdKFk)YS0W#79Ji4W=#xD`XQysW_obSQz^ew7LF09cBMi~i}B z7VgA9B?xmyAR=g4d4b5DT3(G-D2hvK3Quq(&J=K72m~R15(3ui=Y=4(Bcw|VuQ?rB z^soa!?lay-BQJM@^qLMB)_`NcmeiG2cVMHjTfR;*(w)=5#Kt%d@eT=}3EjYZ{N40@ zT<`Ghie{Rsk(ujMh7x|^pxj8{?#48w>>I>&dv$w5AEg>)CMT#ktyDS7EJ@=C|rL&{2eO>KonniF2;EVCuT@L}hG zYzCFo+R8~5X9AZxNCn1T!uI`VT1gH71-t^xtFWWBEf)kGf?RFG$Pd6sA8+}D(*`V{ zhee&>-uQl+GqL|2a74#=@MgVD^luKdme*!dtHqxY!e#$W0>aQgT9DF9SNL`B`><(E zBF~|e+NMMW$9$KF2MnzcBkB_W`#xv4sJN&Dg)sCPFM_Vca%UUcgdQ#c7$H`O0^YSOK1I8KLDE%j~6 zYM1aTjx7}g#hngx2Dz)ZCe!)~X4y+DG!BSc-ho~2B8m@<^z)ZT^nlJ-X7m@~*24!4 ze};^BJH`WVCh&ka?VC2*05i&)f?t8mk;9|fC(H3{6UlA=}R-z-9g)@M--M D5X82S diff --git a/build/images/ajax-loader.7c5ec6b9.gif b/build/images/ajax-loader.7c5ec6b9.gif deleted file mode 100644 index 20c0f192ee42a3da1d2eb85f00679d349e23f85a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1849 zcmb8wdr(tX9tZI2z31lM+(&YVNJFGf2tkvOnD7cwta}qc5LgzdK+9uEz_5gd8c>97 z5y=A~$WvKetXAEn7R3i3I%`)DV`kLt(3PpPyKdWA?XWv)-4P%ZV;g9_*`^WzN zJaf*R&wPL9Hz#xJ7Q+S$L?H4ML0-OmSyX%e>9ZH(SMEK2^3*-(KQ(?gu+snDZTp@p zH|G{U{oA9eol{r+|0t=u(9(JB$OoSw|4&7~r1LViy`E;w&q!FW!&U^&M*k#9YqVN+ zS+`4@ZM$lvmO4v|eTQZHdfVGIJCNuXfKLT>se`u!kqF)_m7*v=`k$j{x{17L92m=r z^4`DYJ1e?)-7=1yN_Y9-zc}eHFNYf+z43e?e}r55gRIEyx>yjy|Kx$mS)O`)j=m9p zM#PBm9e>`KAeZdMI6%o;)rmkzQ!H>*#-Jn*VYh?!WWY;2ETeZO)3h}@lx26&V&kkE z`qGW$Z6oZN?Dj9s3c|Ewk!DA&T-=*xiRGkt&&@}UtkWcU434)AQ!EaVL0WW5>4(BCxC$Ns%XvSvE}*$@3y{k#BeO7EF~nR zB}lo)1SlY#%#e}&lieQoY(k@Y?3EJ@`Tp=uv>gc-*G>7%iw4Lez7qL3NE)glvP5dB zYW_=|SaXV9tlv^1{(51|>Rve>HulpkK?mC%QBOC~_vXLxA5n?SM&wp2E2AuWCfZ z@rRcj=g3%?kBfHXBvh7^e)~mFv3DxI?pGzi%I#{((rTN{KkM+; zw8b3o9?}mTj0p*73j(gF0|1wdbT3K#Dr#RU<0!lsi+aXmbi9!x=9AJ{$+{cW!-|mz zY$%)KqSjn{<@zO2xI`O&-G(K>E}wb2_?*NGFw>Va#X!h5?eWN}2?Dp|*|ZE%K`=^X zuZAFzT&sOApP=h)dk{dd_13bukfdJ+Nn2rngc6{i4@llwR@q81@odXbWK3l4kLXX3aDX9KV=iPICB-!w+NwqS9APU!3^B|uv z6GEj@!4Md+b8lt#0O;CWSuP;f2{P+b$R2rU&GJAmYfzPXzf|E@%_x2_C6|ff#VaPI zACyjhy46w}&C5J|#@Zr&XYxt5uFHB&KkMU)TZ_hUu$1)C<@EZ=j##;1?!B)ZVus?E z6L=x@TpP9L~%|L?u( z-(CJu01kRH$`y9^(bH>Flcl})VX`RQ>yK>LJzR4!(PcTS(}?!38n~p163oAPa#lP9 z`fj)#SxMm#FXqEo)`k(7P)Iq-3T3T)vxgE7=F$`|T!TWNE3v+95MX<4Jr8B)Et z>__*H>W()oO2q@epZi(u;;(Yo12W4b}ir0pIXxE+pv zo|Ru?3!7Q6Aq7LA-)+q29IIg(kBv=7*nA!Y!h$3{g9k9It=fh{GOte8%zBieN9w;_ zTF*4hj8f`Mls=ygkw(RZsO$j)Lw2SuE~vt~JNKEU)Wed#j>l`oo2U+F&(vp;qS^_j zq)h{_4w~oHe5Uizvk|fS$z}|Nyi|%c6y|MG(^v=G6u(UfD|jgN+iEa)cpcmDmYm{( Ln$+M&v|RrIrb!$l diff --git a/build/instant-images.asset.php b/build/instant-images.asset.php index 685be83..28fef95 100644 --- a/build/instant-images.asset.php +++ b/build/instant-images.asset.php @@ -1 +1 @@ - array('react', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'fc10c92482e3e4e883e3'); + array('react', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '691a8541be9b3066d724'); diff --git a/build/instant-images.js b/build/instant-images.js deleted file mode 100644 index 53c3fc1..0000000 --- a/build/instant-images.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{var t,e={7131:(t,e,n)=>{"use strict";const r=window.wp.element;function i(t,e){return function(){return t.apply(e,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:a}=Object,s=(c=Object.create(null),t=>{const e=o.call(t);return c[e]||(c[e]=e.slice(8,-1).toLowerCase())});var c;const l=t=>(t=t.toLowerCase(),e=>s(e)===t),u=t=>e=>typeof e===t,{isArray:f}=Array,h=u("undefined"),d=l("ArrayBuffer"),p=u("string"),m=u("function"),v=u("number"),g=t=>null!==t&&"object"==typeof t,y=t=>{if("object"!==s(t))return!1;const e=a(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},_=l("Date"),b=l("File"),w=l("Blob"),E=l("FileList"),S=l("URLSearchParams");function R(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,i;if("object"!=typeof t&&(t=[t]),f(t))for(r=0,i=t.length;r0;)if(r=n[i],e===r.toLowerCase())return r;return null}const k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,O=t=>!h(t)&&t!==k,C=(A="undefined"!=typeof Uint8Array&&a(Uint8Array),t=>A&&t instanceof A);var A;const L=l("HTMLFormElement"),B=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),j=l("RegExp"),N=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};R(n,((n,i)=>{!1!==e(n,i,t)&&(r[i]=n)})),Object.defineProperties(t,r)},P="abcdefghijklmnopqrstuvwxyz",z="0123456789",T={DIGIT:z,ALPHA:P,ALPHA_DIGIT:P+P.toUpperCase()+z},I={isArray:f,isArrayBuffer:d,isBuffer:function(t){return null!==t&&!h(t)&&null!==t.constructor&&!h(t.constructor)&&m(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||o.call(t)===e||m(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&d(t.buffer),e},isString:p,isNumber:v,isBoolean:t=>!0===t||!1===t,isObject:g,isPlainObject:y,isUndefined:h,isDate:_,isFile:b,isBlob:w,isRegExp:j,isFunction:m,isStream:t=>g(t)&&m(t.pipe),isURLSearchParams:S,isTypedArray:C,isFileList:E,forEach:R,merge:function t(){const{caseless:e}=O(this)&&this||{},n={},r=(r,i)=>{const o=e&&x(n,i)||i;y(n[o])&&y(r)?n[o]=t(n[o],r):y(r)?n[o]=t({},r):f(r)?n[o]=r.slice():n[o]=r};for(let t=0,e=arguments.length;t(R(e,((e,r)=>{n&&m(e)?t[r]=i(e,n):t[r]=e}),{allOwnKeys:r}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let i,o,s;const c={};if(e=e||{},null==t)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],r&&!r(s,t,e)||c[s]||(e[s]=t[s],c[s]=!0);t=!1!==n&&a(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:l,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(f(t))return t;let e=t.length;if(!v(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:L,hasOwnProperty:B,hasOwnProp:B,reduceDescriptors:N,freezeMethods:t=>{N(t,((e,n)=>{if(m(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];m(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return f(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:x,global:k,isContextDefined:O,ALPHABET:T,generateString:(t=16,e=T.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&m(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(g(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const i=f(t)?[]:{};return R(t,((t,e)=>{const o=n(t,r+1);!h(o)&&(i[e]=o)})),e[r]=void 0,i}}return t};return n(t,0)}};function D(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}I.inherits(D,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:I.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const M=D.prototype,F={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{F[t]={value:t}})),Object.defineProperties(D,F),Object.defineProperty(M,"isAxiosError",{value:!0}),D.from=(t,e,n,r,i,o)=>{const a=Object.create(M);return I.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),D.call(a,t.message,e,n,r,i),a.cause=t,a.name=t.name,o&&Object.assign(a,o),a};const H=D;function W(t){return I.isPlainObject(t)||I.isArray(t)}function U(t){return I.endsWith(t,"[]")?t.slice(0,-2):t}function q(t,e,n){return t?t.concat(e).map((function(t,e){return t=U(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const V=I.toFlatObject(I,{},null,(function(t){return/^is[A-Z]/.test(t)})),G=function(t,e,n){if(!I.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=I.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!I.isUndefined(e[t])}))).metaTokens,i=n.visitor||l,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&I.isSpecCompliantForm(e);if(!I.isFunction(i))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(I.isDate(t))return t.toISOString();if(!s&&I.isBlob(t))throw new H("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(t)||I.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function l(t,n,i){let s=t;if(t&&!i&&"object"==typeof t)if(I.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(I.isArray(t)&&function(t){return I.isArray(t)&&!t.some(W)}(t)||(I.isFileList(t)||I.endsWith(n,"[]"))&&(s=I.toArray(t)))return n=U(n),s.forEach((function(t,r){!I.isUndefined(t)&&null!==t&&e.append(!0===a?q([n],r,o):null===a?n:n+"[]",c(t))})),!1;return!!W(t)||(e.append(q(i,n,o),c(t)),!1)}const u=[],f=Object.assign(V,{defaultVisitor:l,convertValue:c,isVisitable:W});if(!I.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!I.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),I.forEach(n,(function(n,o){!0===(!(I.isUndefined(n)||null===n)&&i.call(e,n,I.isString(o)?o.trim():o,r,f))&&t(n,r?r.concat(o):[o])})),u.pop()}}(t),e};function Y(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function J(t,e){this._pairs=[],t&&G(t,this,e)}const K=J.prototype;K.append=function(t,e){this._pairs.push([t,e])},K.toString=function(t){const e=t?function(e){return t.call(this,e,Y)}:Y;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const X=J;function $(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Z(t,e,n){if(!e)return t;const r=n&&n.encode||$,i=n&&n.serialize;let o;if(o=i?i(e,n):I.isURLSearchParams(e)?e.toString():new X(e,n).toString(r),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}const Q=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){I.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},tt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},et={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:X,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]},nt=function(t){function e(t,n,r,i){let o=t[i++];const a=Number.isFinite(+o),s=i>=t.length;return o=!o&&I.isArray(r)?r.length:o,s?(I.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):(r[o]&&I.isObject(r[o])||(r[o]=[]),e(t,n,r[o],i)&&I.isArray(r[o])&&(r[o]=function(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r{e(function(t){return I.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null},rt={"Content-Type":void 0},it={transitional:tt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,i=I.isObject(t);if(i&&I.isHTMLForm(t)&&(t=new FormData(t)),I.isFormData(t))return r&&r?JSON.stringify(nt(t)):t;if(I.isArrayBuffer(t)||I.isBuffer(t)||I.isStream(t)||I.isFile(t)||I.isBlob(t))return t;if(I.isArrayBufferView(t))return t.buffer;if(I.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return G(t,new et.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return et.isNode&&I.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=I.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return G(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),function(t,e,n){if(I.isString(t))try{return(0,JSON.parse)(t),I.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||it.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&I.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw H.from(t,H.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:et.classes.FormData,Blob:et.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};I.forEach(["delete","get","head"],(function(t){it.headers[t]={}})),I.forEach(["post","put","patch"],(function(t){it.headers[t]=I.merge(rt)}));const ot=it,at=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),st=Symbol("internals");function ct(t){return t&&String(t).trim().toLowerCase()}function lt(t){return!1===t||null==t?t:I.isArray(t)?t.map(lt):String(t)}function ut(t,e,n,r,i){return I.isFunction(r)?r.call(this,e,n):(i&&(e=n),I.isString(e)?I.isString(r)?-1!==e.indexOf(r):I.isRegExp(r)?r.test(e):void 0:void 0)}class ft{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function i(t,e,n){const i=ct(e);if(!i)throw new Error("header name must be a non-empty string");const o=I.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||e]=lt(t))}const o=(t,e)=>I.forEach(t,((t,n)=>i(t,n,e)));return I.isPlainObject(t)||t instanceof this.constructor?o(t,e):I.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z]+$/.test(t.trim())?o((t=>{const e={};let n,r,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),n=t.substring(0,i).trim().toLowerCase(),r=t.substring(i+1).trim(),!n||e[n]&&at[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&i(e,t,n),this}get(t,e){if(t=ct(t)){const n=I.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(I.isFunction(e))return e.call(this,t,n);if(I.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ct(t)){const n=I.findKey(this,t);return!(!n||void 0===this[n]||e&&!ut(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function i(t){if(t=ct(t)){const i=I.findKey(n,t);!i||e&&!ut(0,n[i],i,e)||(delete n[i],r=!0)}}return I.isArray(t)?t.forEach(i):i(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const i=e[n];t&&!ut(0,this[i],i,t,!0)||(delete this[i],r=!0)}return r}normalize(t){const e=this,n={};return I.forEach(this,((r,i)=>{const o=I.findKey(n,i);if(o)return e[o]=lt(r),void delete e[i];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(i):String(i).trim();a!==i&&delete e[i],e[a]=lt(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return I.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&I.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[st]=this[st]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=ct(t);e[r]||(function(t,e){const n=I.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,i){return this[r].call(this,e,t,n,i)},configurable:!0})}))}(n,t),e[r]=!0)}return I.isArray(t)?t.forEach(r):r(t),this}}ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),I.freezeMethods(ft.prototype),I.freezeMethods(ft);const ht=ft;function dt(t,e){const n=this||ot,r=e||n,i=ht.from(r.headers);let o=r.data;return I.forEach(t,(function(t){o=t.call(n,o,i.normalize(),e?e.status:void 0)})),i.normalize(),o}function pt(t){return!(!t||!t.__CANCEL__)}function mt(t,e,n){H.call(this,null==t?"canceled":t,H.ERR_CANCELED,e,n),this.name="CanceledError"}I.inherits(mt,H,{__CANCEL__:!0});const vt=mt,gt=et.isStandardBrowserEnv?{write:function(t,e,n,r,i,o){const a=[];a.push(t+"="+encodeURIComponent(e)),I.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),I.isString(r)&&a.push("path="+r),I.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function yt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const _t=et.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=I.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0},bt=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i,o=0,a=0;return e=void 0!==e?e:1e3,function(s){const c=Date.now(),l=r[a];i||(i=c),n[o]=s,r[o]=c;let u=a,f=0;for(;u!==o;)f+=n[u++],u%=t;if(o=(o+1)%t,o===a&&(a=(a+1)%t),c-i{const o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-n,c=r(s);n=o;const l={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&o<=a?(a-o)/c:void 0,event:i};l[e?"download":"upload"]=!0,t(l)}}const Et={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const i=ht.from(t.headers).normalize(),o=t.responseType;let a;function s(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}I.isFormData(r)&&(et.isStandardBrowserEnv||et.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(e+":"+n))}const l=yt(t.baseURL,t.url);function u(){if(!c)return;const r=ht.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new H("Request failed with status code "+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),s()}),(function(t){n(t),s()}),{data:o&&"text"!==o&&"json"!==o?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),Z(l,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=u:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(u)},c.onabort=function(){c&&(n(new H("Request aborted",H.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new H("Network Error",H.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||tt;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new H(e,r.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,t,c)),c=null},et.isStandardBrowserEnv){const e=(t.withCredentials||_t(l))&&t.xsrfCookieName&>.read(t.xsrfCookieName);e&&i.set(t.xsrfHeaderName,e)}void 0===r&&i.setContentType(null),"setRequestHeader"in c&&I.forEach(i.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),I.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),o&&"json"!==o&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",wt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",wt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=e=>{c&&(n(!e||e.type?new vt(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(l);f&&-1===et.protocols.indexOf(f)?n(new H("Unsupported protocol "+f+":",H.ERR_BAD_REQUEST,t)):c.send(r||null)}))}};I.forEach(Et,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const St={getAdapter:t=>{t=I.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let i=0;it instanceof ht?t.toJSON():t;function Ot(t,e){e=e||{};const n={};function r(t,e,n){return I.isPlainObject(t)&&I.isPlainObject(e)?I.merge.call({caseless:n},t,e):I.isPlainObject(e)?I.merge({},e):I.isArray(e)?e.slice():e}function i(t,e,n){return I.isUndefined(e)?I.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function o(t,e){if(!I.isUndefined(e))return r(void 0,e)}function a(t,e){return I.isUndefined(e)?I.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function s(n,i,o){return o in e?r(n,i):o in t?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>i(kt(t),kt(e),!0)};return I.forEach(Object.keys(t).concat(Object.keys(e)),(function(r){const o=c[r]||i,a=o(t[r],e[r],r);I.isUndefined(a)&&o!==s||(n[r]=a)})),n}const Ct={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Ct[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const At={};Ct.transitional=function(t,e,n){function r(t,e){return"[Axios v1.3.4] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,i,o)=>{if(!1===t)throw new H(r(i," has been removed"+(e?" in "+e:"")),H.ERR_DEPRECATED);return e&&!At[i]&&(At[i]=!0,console.warn(r(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,i,o)}};const Lt={assertOptions:function(t,e,n){if("object"!=typeof t)throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],a=e[o];if(a){const e=t[o],n=void 0===e||a(e,o,t);if(!0!==n)throw new H("option "+o+" must be "+n,H.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new H("Unknown option "+o,H.ERR_BAD_OPTION)}},validators:Ct},Bt=Lt.validators;class jt{constructor(t){this.defaults=t,this.interceptors={request:new Q,response:new Q}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Ot(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:i}=e;let o;void 0!==n&&Lt.assertOptions(n,{silentJSONParsing:Bt.transitional(Bt.boolean),forcedJSONParsing:Bt.transitional(Bt.boolean),clarifyTimeoutError:Bt.transitional(Bt.boolean)},!1),void 0!==r&&Lt.assertOptions(r,{encode:Bt.function,serialize:Bt.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),o=i&&I.merge(i.common,i[e.method]),o&&I.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete i[t]})),e.headers=ht.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let u,f=0;if(!s){const t=[xt.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,c),u=t.length,l=Promise.resolve(e);f{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,i){n.reason||(n.reason=new vt(t,r,i),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Pt((function(e){t=e})),cancel:t}}}const zt=Pt,Tt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Tt).forEach((([t,e])=>{Tt[e]=t}));const It=Tt,Dt=function t(e){const n=new Nt(e),r=i(Nt.prototype.request,n);return I.extend(r,Nt.prototype,n,{allOwnKeys:!0}),I.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(Ot(e,n))},r}(ot);Dt.Axios=Nt,Dt.CanceledError=vt,Dt.CancelToken=zt,Dt.isCancel=pt,Dt.VERSION="1.3.4",Dt.toFormData=G,Dt.AxiosError=H,Dt.Cancel=Dt.CanceledError,Dt.all=function(t){return Promise.all(t)},Dt.spread=function(t){return function(e){return t.apply(null,e)}},Dt.isAxiosError=function(t){return I.isObject(t)&&!0===t.isAxiosError},Dt.mergeConfig=Ot,Dt.AxiosHeaders=ht,Dt.formToJSON=t=>nt(I.isHTMLForm(t)?new FormData(t):t),Dt.HttpStatusCode=It,Dt.default=Dt;const Mt=Dt;var Ft=n(4184),Ht=n.n(Ft),Wt=n(8751),Ut=n.n(Wt);const qt=window.React,Vt=new Map,Gt=new WeakMap;let Yt=0;function Jt(t,e,n={},r=undefined){if(void 0===window.IntersectionObserver&&void 0!==r){const i=t.getBoundingClientRect();return e(r,{isIntersecting:r,target:t,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}const{id:i,observer:o,elements:a}=function(t){let e=function(t){return Object.keys(t).sort().filter((e=>void 0!==t[e])).map((e=>{return`${e}_${"root"===e?(n=t.root,n?(Gt.has(n)||(Yt+=1,Gt.set(n,Yt.toString())),Gt.get(n)):"0"):t[e]}`;var n})).toString()}(t),n=Vt.get(e);if(!n){const r=new Map;let i;const o=new IntersectionObserver((e=>{e.forEach((e=>{var n;const o=e.isIntersecting&&i.some((t=>e.intersectionRatio>=t));t.trackVisibility&&void 0===e.isVisible&&(e.isVisible=o),null==(n=r.get(e.target))||n.forEach((t=>{t(o,e)}))}))}),t);i=o.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:o,elements:r},Vt.set(e,n)}return n}(n);let s=a.get(t)||[];return a.has(t)||a.set(t,s),s.push(e),o.observe(t),function(){s.splice(s.indexOf(e),1),0===s.length&&(a.delete(t),o.unobserve(t)),0===a.size&&(o.disconnect(),Vt.delete(i))}}class Kt extends qt.Component{constructor(t){super(t),this.node=null,this._unobserveCb=null,this.handleNode=t=>{this.node&&(this.unobserve(),t||this.props.triggerOnce||this.props.skip||this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=t||null,this.observeNode()},this.handleChange=(t,e)=>{t&&this.props.triggerOnce&&this.unobserve(),isPlainChildren(this.props)||this.setState({inView:t,entry:e}),this.props.onChange&&this.props.onChange(t,e)},this.state={inView:!!t.initialInView,entry:void 0}}componentDidUpdate(t){t.rootMargin===this.props.rootMargin&&t.root===this.props.root&&t.threshold===this.props.threshold&&t.skip===this.props.skip&&t.trackVisibility===this.props.trackVisibility&&t.delay===this.props.delay||(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve(),this.node=null}observeNode(){if(!this.node||this.props.skip)return;const{threshold:t,root:e,rootMargin:n,trackVisibility:r,delay:i,fallbackInView:o}=this.props;this._unobserveCb=Jt(this.node,this.handleChange,{threshold:t,root:e,rootMargin:n,trackVisibility:r,delay:i},o)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){if(!isPlainChildren(this.props)){const{inView:t,entry:e}=this.state;return this.props.children({inView:t,entry:e,ref:this.handleNode})}const t=this.props,{children:e,as:n}=t,r=function(t,e){if(null==t)return{};for(var n,r,i={},o=Object.keys(t);r=0||(i[n]=t[n]);return i}(t);return React.createElement(n||"div",_extends({ref:this.handleNode},r),e)}}function Xt({threshold:t,delay:e,trackVisibility:n,rootMargin:r,root:i,triggerOnce:o,skip:a,initialInView:s,fallbackInView:c,onChange:l}={}){var u;const[f,h]=qt.useState(null),d=qt.useRef(),[p,m]=qt.useState({inView:!!s,entry:void 0});d.current=l,qt.useEffect((()=>{if(a||!f)return;let s;return s=Jt(f,((t,e)=>{m({inView:t,entry:e}),d.current&&d.current(t,e),e.isIntersecting&&o&&s&&(s(),s=void 0)}),{root:i,rootMargin:r,threshold:t,trackVisibility:n,delay:e},c),()=>{s&&s()}}),[Array.isArray(t)?t.toString():t,f,i,r,o,a,n,c,e]);const v=null==(u=p.entry)?void 0:u.target,g=qt.useRef();f||!v||o||a||g.current===v||(g.current=v,m({inView:!!s,entry:void 0}));const y=[h,p.inView,p.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}var $t=(0,r.createContext)();function Zt(t){var e=t.value,n=t.children;return React.createElement($t.Provider,{value:e},n)}function Qt(){return(0,r.useContext)($t)}function te(t){return t&&ee[t.toLowerCase()].icon?ee[t.toLowerCase()].icon():null}var ee={proxy:"https://proxy.getinstantimages.com/api/",testmode:!1,defaults:{provider:"unsplash",order:"latest",per_page:"20",arr_key:"results"},providers:["Unsplash","Openverse","Pixabay","Pexels"],unsplash:{name:"Unsplash",requires_key:!0,new:!1,api_var:"client_id",collections_api:"https://api.unsplash.com/collections/",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M10 9V0H22V9H10ZM22 14H32V32H0V14H10V23H22V14Z",fill:"black"}))}},pixabay:{name:"Pixabay",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("g",{clipPath:"url(#clip0_307_143)"},React.createElement("path",{d:"M0 0V32H32V0H0Z",fill:"#48A947"}),React.createElement("path",{d:"M6.83734 22.3147V28C5.93067 28.0427 5.02401 28.032 4.11734 27.9787C4.09601 27.7014 4.06401 27.4667 4.06401 27.2427C4.06401 23.2427 4.05334 19.2534 4.06401 15.2534C4.07467 12.032 5.97334 9.32269 8.85334 8.37335C13.1307 6.95469 17.4507 10.048 17.8453 14.3894C18.144 17.6534 16.4267 20.5547 13.568 21.7814C12.6507 22.176 11.6907 22.304 10.7093 22.304C9.45067 22.3147 8.21334 22.3147 6.83734 22.3147ZM6.84801 19.4454C8.24534 19.4454 9.54667 19.424 10.848 19.4454C13.1627 19.488 14.816 17.76 15.104 15.712C15.424 13.3654 13.7813 11.2107 11.4453 10.88H11.4347C9.25867 10.592 7.06134 12.2774 6.88001 14.528C6.74134 16.128 6.84801 17.728 6.84801 19.4454Z",fill:"#F9FBF9"}),React.createElement("path",{d:"M25.4827 14.9334L30.656 22.2081H27.3067L23.4667 16.9494C22.0694 18.6881 20.9067 20.4907 19.584 22.2081H16.2454L21.408 14.9334L16.8107 8.04272H20.16L23.4454 12.9494L26.7307 8.04272H30.0694L25.4827 14.9334Z",fill:"#FAFCFA"}),React.createElement("path",{d:"M6.848 19.4453C6.848 17.7279 6.74134 16.1173 6.86934 14.5386C7.05067 12.2879 9.248 10.6026 11.424 10.8906C13.7707 11.2106 15.4133 13.3653 15.0933 15.7119C14.816 17.7599 13.152 19.4879 10.8373 19.4453C9.54667 19.4239 8.24534 19.4453 6.848 19.4453Z",fill:"#4AA949"})),React.createElement("defs",null,React.createElement("clipPath",{id:"clip0_307_143"},React.createElement("rect",{width:"32",height:"32",fill:"white"}))))}},pexels:{name:"Pexels",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32px",height:"32px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M2 0h28a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2z",fill:"#05A081"}),React.createElement("path",{d:"M13 21h3.863v-3.752h1.167a3.124 3.124 0 1 0 0-6.248H13v10zm5.863 2H11V9h7.03a5.124 5.124 0 0 1 .833 10.18V23z",fill:"#fff"}))}},openverse:{name:"Openverse",requires_key:!1,new:!1,api_var:"key",key:"",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M25.8578 14.32C29.6708 14.32 32.7618 11.1144 32.7618 7.16C32.7618 3.20564 29.6708 0 25.8578 0C22.0448 0 18.9539 3.20564 18.9539 7.16C18.9539 11.1144 22.0448 14.32 25.8578 14.32Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 7.16C0.761841 11.1 3.84742 14.32 7.66584 14.32V0C3.84742 0 0.761841 3.2 0.761841 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 7.16C9.85791 11.1 12.9435 14.32 16.7619 14.32V0C12.9628 0 9.85791 3.2 9.85791 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M25.8578 31.9399C29.6708 31.9399 32.7618 28.7343 32.7618 24.78C32.7618 20.8256 29.6708 17.62 25.8578 17.62C22.0448 17.62 18.9539 20.8256 18.9539 24.78C18.9539 28.7343 22.0448 31.9399 25.8578 31.9399Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 24.7801C9.85791 28.72 12.9435 31.9401 16.7619 31.9401V17.64C12.9628 17.64 9.85791 20.84 9.85791 24.7801Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 24.84C0.761841 28.8 3.84742 32 7.66584 32V17.7C3.84742 17.7 0.761841 20.9 0.761841 24.84Z",fill:"#000000"}))}}};const ne=window.wp.i18n;var re=[{label:(0,ne.__)("WordPress","instant-images"),value:"wordpress"},{label:(0,ne.__)("Flickr","instant-images"),value:"flickr"},{label:(0,ne.__)("Nasa","instant-images"),value:"nasa"},{label:(0,ne.__)("SpaceX","instant-images"),value:"spacex"},{label:(0,ne.__)("Wikimedia","instant-images"),value:"wikimedia"}],ie=[{label:(0,ne.__)("Square","instant-images"),value:"square"},{label:(0,ne.__)("Tall","instant-images"),value:"tall"},{label:(0,ne.__)("Wide","instant-images"),value:"wide"}],oe=[{label:(0,ne.__)("Red","instant-images"),value:"red"},{label:(0,ne.__)("Orange","instant-images"),value:"orange"},{label:(0,ne.__)("Yellow","instant-images"),value:"yellow"},{label:(0,ne.__)("Green","instant-images"),value:"green"},{label:(0,ne.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,ne.__)("Blue","instant-images"),value:"blue"},{label:(0,ne.__)("Violet","instant-images"),value:"violet"},{label:(0,ne.__)("Pink","instant-images"),value:"pink"},{label:(0,ne.__)("Brown","instant-images"),value:"brown"},{label:(0,ne.__)("Black","instant-images"),value:"black"},{label:(0,ne.__)("Gray","instant-images"),value:"gray"},{label:(0,ne.__)("White","instant-images"),value:"white"}],ae=[{label:(0,ne.__)("Landscape","instant-images"),value:"landscape"},{label:(0,ne.__)("Portrait","instant-images"),value:"portrait"},{label:(0,ne.__)("Square","instant-images"),value:"squarish"}],se=[{label:(0,ne.__)("Grayscale","instant-images"),value:"grayscale"},{label:(0,ne.__)("Red","instant-images"),value:"red"},{label:(0,ne.__)("Orange","instant-images"),value:"orange"},{label:(0,ne.__)("Yellow","instant-images"),value:"yellow"},{label:(0,ne.__)("Green","instant-images"),value:"green"},{label:(0,ne.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,ne.__)("Blue","instant-images"),value:"blue"},{label:(0,ne.__)("Lilac","instant-images"),value:"lilac"},{label:(0,ne.__)("Pink","instant-images"),value:"pink"},{label:(0,ne.__)("White","instant-images"),value:"white"},{label:(0,ne.__)("Gray","instant-images"),value:"gray"},{label:(0,ne.__)("Black","instant-images"),value:"black"},{label:(0,ne.__)("Brown","instant-images"),value:"brown"},{label:(0,ne.__)("Transparent","instant-images"),value:"transparent"}],ce=[{label:(0,ne.__)("Backgrounds","instant-images"),value:"backgrounds"},{label:(0,ne.__)("Fashion","instant-images"),value:"fashion"},{label:(0,ne.__)("Nature","instant-images"),value:"nature"},{label:(0,ne.__)("Science","instant-images"),value:"science"},{label:(0,ne.__)("Education","instant-images"),value:"education"},{label:(0,ne.__)("Feelings","instant-images"),value:"feelings"},{label:(0,ne.__)("Health","instant-images"),value:"health"},{label:(0,ne.__)("People","instant-images"),value:"people"},{label:(0,ne.__)("Religion","instant-images"),value:"religion"},{label:(0,ne.__)("Places","instant-images"),value:"places"},{label:(0,ne.__)("Animals","instant-images"),value:"animals"},{label:(0,ne.__)("Industry","instant-images"),value:"industry"},{label:(0,ne.__)("Computer","instant-images"),value:"computer"},{label:(0,ne.__)("Food","instant-images"),value:"food"},{label:(0,ne.__)("Sports","instant-images"),value:"sports"},{label:(0,ne.__)("Food","instant-images"),value:"food"},{label:(0,ne.__)("Transportation","instant-images"),value:"transportation"},{label:(0,ne.__)("Travel","instant-images"),value:"travel"},{label:(0,ne.__)("Buildings","instant-images"),value:"buildings"},{label:(0,ne.__)("Business","instant-images"),value:"business"},{label:(0,ne.__)("Music","instant-images"),value:"music"}],le=[{label:(0,ne.__)("Horizontal","instant-images"),value:"horizontal"},{label:(0,ne.__)("Vertical","instant-images"),value:"vertical"}],ue=[{label:(0,ne.__)("Photo","instant-images"),value:"photo"},{label:(0,ne.__)("Illustration","instant-images"),value:"illustration"},{label:(0,ne.__)("Vector","instant-images"),value:"vector"}],fe=[{label:(0,ne.__)("Black & White","instant-images"),value:"black_and_white"},{label:(0,ne.__)("Black","instant-images"),value:"black"},{label:(0,ne.__)("White","instant-images"),value:"white"},{label:(0,ne.__)("Yellow","instant-images"),value:"yellow"},{label:(0,ne.__)("Green","instant-images"),value:"green"},{label:(0,ne.__)("Orange","instant-images"),value:"orange"},{label:(0,ne.__)("Red","instant-images"),value:"red"},{label:(0,ne.__)("Purple","instant-images"),value:"purple"},{label:(0,ne.__)("Magenta","instant-images"),value:"magenta"},{label:(0,ne.__)("Teal","instant-images"),value:"teal"},{label:(0,ne.__)("Blue","instant-images"),value:"blue"}],he=[{label:(0,ne.__)("Landscape","instant-images"),value:"landscape"},{label:(0,ne.__)("Portrait","instant-images"),value:"portrait"},{label:(0,ne.__)("Square","instant-images"),value:"squarish"}];function de(t){return function(t){if(Array.isArray(t))return pe(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return pe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pe(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1&&parseInt(n)<2&&alert(instant_img_localize.api_ratelimit_msg)}}function Te(t){return t.charAt(0).toUpperCase()+t.slice(1)}var Ie="";function De(t){var e=t.currentTarget,n=e.getBoundingClientRect(),r=Math.round(n.left),i=Math.round(n.top),o=e.closest("#photo-listing").querySelector("#tooltip");o.classList.remove("over"),e.classList.contains("tooltip--above")?o.classList.add("above"):o.classList.remove("above"),Ie=setInterval((function(){clearInterval(Ie),o.innerHTML=e.dataset.title,r=r-o.offsetWidth+e.offsetWidth+5,o.style.left="".concat(r,"px"),o.style.top="".concat(i,"px"),setTimeout((function(){o.classList.add("over")}),25)}),750)}function Me(t){clearInterval(Ie),t.currentTarget.closest("#photo-listing").querySelector("#tooltip").classList.remove("over")}function Fe(t){t&&window&&window.open(t,"_blank")}function He(){var t=instant_img_localize;switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:200){case 400:case 401:return t.api_invalid_msg;case 403:return t.api_invalid_403_msg;case 404:return t.api_invalid_404_msg;case 429:return t.api_ratelimit_msg;case 500:case 503:return t.api_invalid_500_msg;case 501:return t.api_invalid_501_msg}}function We(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=instant_img_localize,r=He(e);switch(e){case 400:case 401:case 500:case 429:console.warn("[".concat(n.instant_images," - ").concat(e," Error] ").concat(Te(t),": ").concat(r))}}function Ue(t){return t&&t[ee.defaults.arr_key]||[]}function qe(t){return void 0===t.total||null===t.total?0:t.total}function Ve(t){if(!t||ee.testmode)return!1;var e=sessionStorage.getItem(Pe(t));if(!e)return!1;var n=JSON.parse(e),r=n.expires,i=void 0===r?0:r,o=n.error;if(void 0!==o&&o)return!1;var a=Date.now()>i;return a&&Ye(t),!(!n||a)&&n}function Ge(t,e){if(!t||!e||null!=e&&e.error)return!1;e.expires=Date.now()+36e5,sessionStorage.setItem(Pe(t),JSON.stringify(e))}function Ye(t){if(!t)return!1;sessionStorage.removeItem(Pe(t))}function Je(t){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Je(t)}function Ke(){Ke=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,i){var o=e&&e.prototype instanceof h?e:h,a=Object.create(o.prototype),s=new x(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function h(){}function d(){}function p(){}var m={};c(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==e&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(r,o,a,s){var c=u(t[r],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==Je(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,s)}))}s(c.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function E(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=u(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),R(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Xe(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function $e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,_x,o,a=[],_n=!0,s=!1;try{if(_x=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;_n=!1}else for(;!(_n=(r=_x.call(n)).done)&&(a.push(r.value),a.length!==e);_n=!0);}catch(t){s=!0,i=t}finally{try{if(!_n&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ze(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ze(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ze(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=1?null:React.createElement("div",{className:"instant-images-no-results"},React.createElement("div",null,React.createElement("h3",null,instant_img_localize.no_results," "),React.createElement("p",null,instant_img_localize.no_results_desc," ")))}var ln=ee.providers;function un(t){var e=t.switchProvider,n=Qt().provider;return React.createElement(r.Fragment,null,!(null==ln||!ln.length)&&React.createElement("nav",{className:"provider-nav"},ln.map((function(t,r){return React.createElement("div",{key:"provider-".concat(r)},React.createElement("button",{onClick:function(){return e(t.toLowerCase())},className:n===t.toLowerCase()?"provider-nav--btn active":"provider-nav--btn"},te(t),React.createElement("span",null,t),ee[t.toLowerCase()].new&&React.createElement("span",{className:"provider-nav--new"},instant_img_localize.new)))}))))}function fn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=200&&e.status<400&&JSON.parse(e.response).success||o(!1)},e.onerror=function(t){console.warn(t),o(!1)}}),[]),React.createElement(r.Fragment,null,i?null:React.createElement("div",{className:"error-messaging"},React.createElement("strong",null,instant_img_localize.error_restapi),instant_img_localize.error_restapi_desc))}const dn=window.wp.blocks,pn=window.wp.data;function mn(t,e){var n=t.id,r=void 0===n?null:n,i=t.url,o=void 0===i?null:i,a=t.caption,s=void 0===a?"":a,c=t.alt,l=void 0===c?"":c;if(o&&r){var u=(0,dn.createBlock)("core/image",{id:r,url:o,caption:s,alt:l});e?(0,pn.dispatch)("core/block-editor").replaceBlock(e,u):(0,pn.dispatch)("core/block-editor").insertBlocks(u)}}function vn(t){return vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vn(t)}function gn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function yn(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&React.createElement("img",{className:"user-wrap--photo",src:L,alt:""}),A)),React.createElement("div",{className:"photo-options"},f&&!$?React.createElement(r.Fragment,null,React.createElement("button",{type:"button",className:"set-featured fade","data-title":instant_img_localize.set_as_featured,onMouseEnter:function(t){return De(t)},onMouseLeave:function(t){return Me(t)},onClick:function(t){return function(t){Me(t),tt.current&&(rt=!0,tt.current.click())}(t)}},React.createElement("i",{className:"fa fa-picture-o","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.set_as_featured)),React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(t){return De(t)},onMouseLeave:function(t){return Me(t)},onClick:function(t){return ot(t)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post))):null,!!s&&React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(t){return De(t)},onMouseLeave:function(t){return Me(t)},onClick:function(t){return ot(t)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post)),$?React.createElement("button",{onClick:function(){$&&(window.location=$)},className:"edit-photo-admin fade","data-title":instant_img_localize.edit_upload,onMouseEnter:function(t){return De(t)},onMouseLeave:function(t){return Me(t)}},React.createElement("i",{className:"fa fa-pencil","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_upload)):React.createElement("button",{onClick:function(t){return function(t){t.preventDefault(),Me(t);var e=document.querySelectorAll(".edit-screen.editing");e&&e.forEach((function(t){t.classList.remove("editing")})),et.current.classList.add("editing"),setTimeout((function(){et.current.focus({preventScroll:!0})}),150)}(t)},className:"edit-photo fade","data-title":instant_img_localize.edit_details,onMouseEnter:function(t){return De(t)},onMouseLeave:function(t){return Me(t)}},React.createElement("i",{className:"fa fa-cog","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_details)))),React.createElement("div",{className:"photo-meta"},E?React.createElement("span",{className:"likes tooltip--above","data-title":E+" "+N,onMouseEnter:function(t){return De(t)},onMouseLeave:function(t){return Me(t)}},React.createElement("i",{className:"fa fa-heart heart-like","aria-hidden":"true"})," ",E):null,React.createElement("a",{className:"tooltip--above",href:m,"data-title":"".concat(instant_img_localize.open_external," ").concat(Te(o)),onMouseEnter:function(t){return De(t)},onMouseLeave:function(t){return Me(t)},rel:"noopener noreferrer",target:"_blank"},React.createElement("i",{className:"fa fa-external-link","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},"".concat(instant_img_localize.open_external," ").concat(Te(o)))))),React.createElement("div",{className:"edit-screen",tabIndex:"0",ref:et},React.createElement("div",{className:"edit-screen--title"},React.createElement("div",null,React.createElement("p",{className:"heading"},instant_img_localize.edit_details),S&&S.length>0&&React.createElement("p",{className:"dimensions"},S)),React.createElement("div",{className:"preview",style:{backgroundImage:"url(".concat(k,")")}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_filename,":"),React.createElement("input",{type:"text",name:"filename","data-original":p,placeholder:W.filename,value:W.filename,onChange:function(t){return ct(t)}}),React.createElement("em",null,".",w)),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_title,":"),React.createElement("input",{type:"text",name:"title","data-original":v,placeholder:v,value:W.title||"",onChange:function(t){return ct(t)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_alt,":"),React.createElement("input",{type:"text",name:"alt","data-original":g,value:W.alt||"",onChange:function(t){return ct(t)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_caption,":"),React.createElement("textarea",{rows:"4",name:"caption","data-original":F,onChange:function(t){return ct(t)},value:W.caption||"",ref:nt})),M?React.createElement("div",{className:"add-attribution-row"},React.createElement("button",{onClick:function(t){return function(t){t.preventDefault(),nt.current.value=M,U(yn(yn({},W),{},{caption:M}))}(t)},type:"button"},instant_img_localize.attribution)):null,React.createElement("div",{className:"edit-screen--controls"},React.createElement("button",{type:"button",className:"button button-secondary",onClick:function(t){return U({filename:p,title:v,alt:g,caption:F}),et.current.classList.remove("editing"),void tt.current.focus({preventScrol:!0})}},instant_img_localize.cancel)," "," ",React.createElement("button",{type:"button",className:"button button-primary",onClick:function(){return et.current.classList.remove("editing"),void tt.current.click()}},s?instant_img_localize.insert_into_post:instant_img_localize.upload_now))),React.createElement("div",{className:"photo-status"})))}function Rn(t){var e=t.result.data,n=void 0===e?null:e,i=(null==n?void 0:n.url)||"",o=(null==n?void 0:n.title)||"",a=(null==n?void 0:n.description)||"",s=(null==n?void 0:n.avatar)||"",c=n.image,l=void 0===c?null:c,u=l.src,f=void 0===u?null:u,h=l.alt,d=void 0===h?null:h,p=(0,r.useRef)(),m=(0,r.useRef)();return React.createElement(r.Fragment,null,l&&i?React.createElement("article",{className:"photo feature",title:a,ref:p,onClick:function(){return m.current.click()}},React.createElement("div",{className:"photo--wrap"},React.createElement("span",{className:"flag",title:instant_img_localize.advertisement},instant_img_localize.ad),React.createElement("div",{className:"img-wrap"},React.createElement("a",{className:"loaded",href:i,target:"_blank",ref:m,rel:"noreferrer"},React.createElement("img",{src:f,alt:d}))),React.createElement("div",{className:"feature-title"},s&&React.createElement("img",{src:s,alt:o}),React.createElement("span",null,o)))):null)}function xn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1&&e.splice(n,1),e.length>=10&&(e.length=10),e.unshift(t),localStorage.setItem(Pn,JSON.stringify(e))}else localStorage.setItem(Pn,JSON.stringify([t]))}(r),g(Tn())))}(t)},autoComplete:"off"},React.createElement("label",{htmlFor:"search-input",className:"offscreen"},instant_img_localize.search_label),React.createElement("div",{ref:w},React.createElement("input",{ref:e,type:"text",id:"search-input",placeholder:instant_img_localize.search,disabled:h,onChange:function(t){return l&&p(t.target.value)},onFocus:function(){return b(!0)}}),l&&((null==v?void 0:v.length)||(null==d?void 0:d.length))?React.createElement(Un,{show:_,history:v,setHistory:g,setSearchValue:function(t){var n=null==e?void 0:e.current;n.value=t,null==E||E.current.click(),n.focus()},container:w}):null,!s&&React.createElement(Wn,{show:_})),React.createElement("button",{type:"submit",disabled:h,ref:E},React.createElement("i",{className:"fa fa-search"}),React.createElement("span",{className:"offscreen"},instant_img_localize.search)),React.createElement(qn,{show:_})))}));function Jn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),R(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Zn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Qn(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==h[0]&&h[0],!D){t.next=3;break}return t.abrupt("return",!1);case 3:if(n||""===(null==pt||null===(e=pt.current)||void 0===e?void 0:e.value)){t.next=7;break}if(!v||!y){t.next=7;break}return Ot(pt.current.value),t.abrupt("return");case 7:if(T(!0),d=void 0,(null==pt||null===(d=pt.current)||void 0===d?void 0:d.value)&&(pt.current.value=""),$(w),tt([]),Pt(),cr=1,r=Re(k,ot),i=Le("photos",r),!(o=Ve(i))){t.next=18;break}At(Ue(o),!1,null),t.next=37;break;case 18:return t.next=20,fetch(i);case 20:return a=t.sent,c=a.status,ze(a.headers),t.prev=23,t.next=26,a.json();case 26:l=t.sent,u=l.error,f=void 0===u?null:u,At(Ue(l),!1,f),Ge(i,l),t.next=37;break;case 32:t.prev=32,t.t0=t.catch(23),We(s,c),T(!1),Ye(i);case 37:setTimeout((function(){T(!1)}),_);case 38:case"end":return t.stop()}var d}),t,null,[[23,32]])}))),Rt.apply(this,arguments)}function xt(){return kt.apply(this,arguments)}function kt(){return(kt=rr($n().mark((function t(){var e,n,r,i,o,a,c,l,u,f,h,d;return $n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(j&&!z&&!D&&!H){t.next=2;break}return t.abrupt("return");case 2:if(M(!0),cr=parseInt(cr)+1,e=null!=X&&X.active&&null!=X&&X.term?{term:X.term}:{},n=null!=X&&X.active?"search":"photos",r=null!=X&&X.active?ct:ot,i=Qn(Qn(Qn({},{page:cr}),e),r),o=Re(k,i),a=Le(n,o),!(c=Ve(a))){t.next=15;break}At(Ue(c),!0,null),t.next=34;break;case 15:return t.next=17,fetch(a);case 17:return l=t.sent,u=l.status,ze(l.headers),t.prev=20,t.next=23,l.json();case 23:f=t.sent,h=f.error,d=void 0===h?null:h,At(Ue(f),!0,d),Ge(a,f),t.next=34;break;case 29:t.prev=29,t.t0=t.catch(20),We(s,u),M(!1),Ye(a);case 34:case"end":return t.stop()}}),t,null,[[20,29]])})))).apply(this,arguments)}function Ot(t){return Ct.apply(this,arguments)}function Ct(){return(Ct=rr($n().mark((function t(e){var n,r,i,o,a,c,l,u,f,h,d;return $n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(T(!0),Pt(),cr=1,n="id:"===e.substring(0,3)?"id":"term",r="id"===n?{id:e.replace("id:","").replace(/\s+/,"")}:{term:e},i=Qn(Qn(Qn({},{page:cr}),r),ct),o=Re(k,i),a=Le("search",o),!(c=Ve(a))){t.next=14;break}At(Ue(c),!1,null),$({active:!0,term:e,type:n,results:qe(c)}),t.next=35;break;case 14:return t.next=16,fetch(a);case 16:return l=t.sent,u=l.status,ze(l.headers),t.prev=19,t.next=22,l.json();case 22:f=t.sent,h=f.error,d=void 0===h?null:h,At(Ue(f),!1,d),$({active:!0,term:e,type:n,results:qe(f)}),Ge(a,f),t.next=35;break;case 29:t.prev=29,t.t0=t.catch(19),W(!0),T(!1),We(s,u),Ye(a);case 35:pt.current.classList.remove(b);case 36:case"end":return t.stop()}}),t,null,[[19,29]])})))).apply(this,arguments)}function At(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;t=null==e?void 0:e.length,W(0===parseInt(t)||void 0===t),R(n?function(t){return[].concat(er(t),er(e))}:e),V(r)}function Lt(t,e){var n=Qn({},ot);n[t]&&"#"===e||""===e||"all"===e?delete n[t]:n[t]=e,at(Qn({},n))}function Bt(t){return jt.apply(this,arguments)}function jt(){return(jt=rr($n().mark((function t(e){var n,r;return $n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k!==e){t.next=2;break}return t.abrupt("return");case 2:if(T(!0),V(!1),J(!1),bt.classList.remove("overflow-hidden"),!ee[e].requires_key||A.includes(e)){t.next=27;break}return t.prev=7,t.next=10,fetch(Be(e));case 10:if(n=t.sent,r=n.status,ze(n.headers),200===r){t.next=18;break}return J(e),V(!0),bt.classList.add("overflow-hidden"),t.abrupt("return");case 18:200===r&&L((function(t){return[].concat(er(t),[e])})),t.next=27;break;case 21:return t.prev=21,t.t0=t.catch(7),J(e),bt.classList.add("overflow-hidden"),V(!0),t.abrupt("return");case 27:setTimeout((function(){rt(ve[e].filters),O(e)}),_);case 28:case"end":return t.stop()}}),t,null,[[7,21]])})))).apply(this,arguments)}function Nt(){return(Nt=rr($n().mark((function t(e){var n;return $n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&!((null==e?void 0:e.length)<3)){t.next=2;break}return t.abrupt("return");case 2:return n=instant_img_localize.root+"instant-images-extended/suggestions/?term=".concat(e),t.next=5,Mt.get(n).then((function(t){tt(t.data)})).catch((function(t){console.warn(t)}));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Pt(){vt&&null!=dt&&dt.current&&(null==dt||dt.current.scroll({top:0,left:0,behavior:"smooth"}))}function zt(t){if("Escape"===t.key){var e=dt.current.querySelectorAll(".edit-screen.editing");e&&er(e).forEach((function(t){null==t||t.classList.remove("editing")}))}}return(0,r.useEffect)((function(){null!=X&&X.active||lt({})}),[X]),(0,r.useEffect)((function(){j&&null!=X&&X.active&&Ot(null==X?void 0:X.term)}),[ct]),(0,r.useEffect)((function(){j&&St()}),[ot]),(0,r.useEffect)((function(){rt(ve[k].filters),at({})}),[k]),(0,r.useEffect)((function(){xt()}),[ht]),(0,r.useEffect)((function(){sr(dt.current,(function(){yt||(mt.current=new(Ut())(dt.current,{itemSelector:".photo"}),dt.current.querySelectorAll(".photo").forEach((function(t){t.classList.add("in-view")}))),setTimeout((function(){T(!1),M(!1),j||N(!0)}),_)}))}),[S]),(0,r.useEffect)((function(){return T(!1),Et.classList.add("loaded"),yt&&St(),document.addEventListener("keydown",zt,!1),function(){document.removeEventListener("keydown",zt,!1)}}),[]),React.createElement(r.Fragment,null,React.createElement(Zt,{value:{provider:k,wpBlock:vt,mediaModal:_t,blockSidebar:gt,clientId:d,search:X,apiError:q,getPhotos:St,searchHandler:function(t){t.preventDefault();var e=pt.current.value;e.length>2?(pt.current.classList.add(b),Ot(e)):pt.current.focus()},filterSearch:function(t,e){var n=Qn({},ct);n[t]&&"#"===e||""===e||"all"===e?delete n[t]:n[t]=e,lt(Qn({},n))},suggestions:Q,getSuggestions:function(t){return Nt.apply(this,arguments)}}},vt?React.createElement(_e,{switchProvider:Bt}):React.createElement(React.Fragment,null,React.createElement(un,{switchProvider:Bt}),React.createElement(Hn,null)),React.createElement(hn,null),React.createElement("div",{className:"control-nav"},React.createElement("div",{className:Ht()("control-nav--filters-wrap",q||null!=X&&X.active?"inactive":null)},nt&&null!==(i=Object.entries(nt))&&void 0!==i&&i.length?React.createElement("div",{className:"control-nav--filters"},Object.entries(nt).map((function(t,e){var n=ir(t,2),r=n[0],i=n[1];return React.createElement(an,{key:"".concat(k,"-").concat(e,"-").concat(r),data:i,filterKey:r,handler:Lt})}))):null),React.createElement(Yn,{ref:pt})),React.createElement("div",{id:"photo-listing",className:z?"loading":null},React.createElement(Kn,null),vt?React.createElement(Bn,{ref:dt,data:S,done:H,loadMorePhotos:xt}):React.createElement(kn,{ref:dt,data:S}),React.createElement(cn,{total:null==X?void 0:X.results,is_search:null==X?void 0:X.active}),React.createElement(sn,{ref:ft,loadMorePhotos:xt,loading:D,done:H}),React.createElement(Qe,{provider:Y,callback:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t&&O(t),J(!1),T(!1),V(!1),bt.classList.remove("overflow-hidden")}}),React.createElement(tn,null),React.createElement(jn,null))))}function ur(t){return ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ur(t)}function fr(){fr=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,i){var o=e&&e.prototype instanceof h?e:h,a=Object.create(o.prototype),s=new x(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function h(){}function d(){}function p(){}var m={};c(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==e&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(r,o,a,s){var c=u(t[r],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==ur(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,s)}))}s(c.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function E(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=u(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),R(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function hr(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function dr(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){hr(o,r,i,a,s,"next",t)}function s(t){hr(o,r,i,a,s,"throw",t)}a(void 0)}))}}var pr=instant_img_localize&&instant_img_localize.default_provider?instant_img_localize.default_provider:ee.defaults.provider;function mr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ee.defaults.provider,e=Le("photos",Re(t));function n(){return(n=dr(fr().mark((function n(){var i,o,a,s,c,l,u;return fr().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(i=document.getElementById("app"))){n.next=25;break}if(!(o=Ve(e))){n.next=7;break}r.createRoot?(0,r.createRoot)(i).render(React.createElement(lr,{editor:"classic",data:o,container:i,provider:t,api_error:null})):(0,r.render)(React.createElement(lr,{editor:"classic",data:o,container:i,provider:t,api_error:null}),i),n.next=25;break;case 7:return n.next=9,fetch(e);case 9:return a=n.sent,s=a.status,ze(a.headers),n.prev=12,n.next=15,a.json();case 15:c=n.sent,l=c.error,u=void 0===l?null:l,r.createRoot?(0,r.createRoot)(i).render(React.createElement(lr,{editor:"classic",data:c,container:i,provider:t,api_error:u})):(0,r.render)(React.createElement(lr,{editor:"classic",data:c,container:i,provider:t,api_error:u}),i),Ge(e,c),n.next=25;break;case 21:n.prev=21,n.t0=n.catch(12),We(t,s),Ye(e);case 25:case"end":return n.stop()}}),n,null,[[12,21]])})))).apply(this,arguments)}!function(){n.apply(this,arguments)}()}dr(fr().mark((function t(){return fr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:mr(pr);case 1:case"end":return t.stop()}}),t)})))()},4184:(t,e)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var t=[],e=0;e>>8^255&p^99,i[n]=p,o[p]=n;var m=t[n],v=t[m],g=t[v],y=257*t[p]^16843008*p;a[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,c[n]=y<<8|y>>>24,l[n]=y,y=16843009*g^65537*v^257*m^16843008*n,u[p]=y<<24|y>>>8,f[p]=y<<16|y>>>16,h[p]=y<<8|y>>>24,d[p]=y,n?(n=m^t[t[t[g^m]]],r^=t[t[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a6&&a%n==4&&(l=i[l>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l]):(l=i[(l=l<<8|l>>>24)>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l],l^=p[a/n|0]<<24),o[a]=o[a-n]^l);for(var s=this._invKeySchedule=[],c=0;c>>24]]^f[i[l>>>16&255]]^h[i[l>>>8&255]]^d[i[255&l]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,a,s,c,l,i)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,u,f,h,d,o),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,o,a,s){for(var c=this._nRounds,l=t[e]^n[0],u=t[e+1]^n[1],f=t[e+2]^n[2],h=t[e+3]^n[3],d=4,p=1;p>>24]^i[u>>>16&255]^o[f>>>8&255]^a[255&h]^n[d++],v=r[u>>>24]^i[f>>>16&255]^o[h>>>8&255]^a[255&l]^n[d++],g=r[f>>>24]^i[h>>>16&255]^o[l>>>8&255]^a[255&u]^n[d++],y=r[h>>>24]^i[l>>>16&255]^o[u>>>8&255]^a[255&f]^n[d++];l=m,u=v,f=g,h=y}m=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^n[d++],v=(s[u>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&l])^n[d++],g=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^n[d++],y=(s[h>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&f])^n[d++],t[e]=m,t[e+1]=v,t[e+2]=g,t[e+3]=y},keySize:8});t.AES=e._createHelper(m)}(),r.AES)},5109:function(t,e,n){var r,i,o,a,s,c,l,u,f,h,d,p,m,v,g,y,_,b,w;t.exports=(r=n(8249),n(888),void(r.lib.Cipher||(i=r,o=i.lib,a=o.Base,s=o.WordArray,c=o.BufferedBlockAlgorithm,l=i.enc,l.Utf8,u=l.Base64,f=i.algo.EvpKDF,h=o.Cipher=c.extend({cfg:a.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){c.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?w:_}return function(e){return{encrypt:function(n,r,i){return t(r).encrypt(e,n,r,i)},decrypt:function(n,r,i){return t(r).decrypt(e,n,r,i)}}}}()}),o.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),d=i.mode={},p=o.BlockCipherMode=a.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),m=d.CBC=function(){var t=p.extend();function e(t,e,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var o=0;o>>2];t.sigBytes-=e}},o.BlockCipher=h.extend({cfg:h.cfg.extend({mode:m,padding:v}),reset:function(){var t;h.reset.call(this);var e=this.cfg,n=e.iv,r=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=r.createEncryptor:(t=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,n&&n.words):(this._mode=t.call(r,this,n&&n.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),g=o.CipherParams=a.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),y=(i.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;return(n?s.create([1398893684,1701076831]).concat(n).concat(e):e).toString(u)},parse:function(t){var e,n=u.parse(t),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(e=s.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:e})}},_=o.SerializableCipher=a.extend({cfg:a.extend({format:y}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r),o=i.finalize(e),a=i.cfg;return g.create({ciphertext:o,key:n,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),b=(i.kdf={}).OpenSSL={execute:function(t,e,n,r){r||(r=s.random(8));var i=f.create({keySize:e+n}).compute(t,r),o=s.create(i.words.slice(e),4*n);return i.sigBytes=4*e,g.create({key:i,iv:o,salt:r})}},w=o.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:b}),encrypt:function(t,e,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,t.keySize,t.ivSize);r.iv=i.iv;var o=_.encrypt.call(this,t,e,i.key,r);return o.mixIn(i),o},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var i=r.kdf.execute(n,t.keySize,t.ivSize,e.salt);return r.iv=i.iv,_.decrypt.call(this,t,e,i.key,r)}}))))},8249:function(t,e,n){var r;t.exports=(r=r||function(t,e){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==n.g&&n.g.crypto&&(r=n.g.crypto),!r)try{r=n(2480)}catch(t){}var i=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),a={},s=a.lib={},c=s.Base={extend:function(t){var e=o(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},l=s.WordArray=c.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||f).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o>>2]>>>24-o%4*8&255;e[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new l.init(n,e/2)}},h=u.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new l.init(n,e)}},d=u.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},p=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),c=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*a,u=t.min(4*c,o);if(c){for(var f=0;f>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var c=r.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(t){var e=t.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i>>6-a%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return o.create(r,i)}(t,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},r.enc.Base64)},3786:function(t,e,n){var r,i,o;t.exports=(r=n(8249),o=(i=r).lib.WordArray,i.enc.Base64url={stringify:function(t,e=!0){var n=t.words,r=t.sigBytes,i=e?this._safe_map:this._map;t.clamp();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,c=0;c<4&&a+.75*c>>6*(3-c)&63));var l=i.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("")},parse:function(t,e=!0){var n=t.length,r=e?this._safe_map:this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var a=0;a>>6-a%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return o.create(r,i)}(t,n,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},r.enc.Base64url)},298:function(t,e,n){var r;t.exports=(r=n(8249),function(){var t=r,e=t.lib.WordArray,n=t.enc;function i(t){return t<<8&4278255360|t>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var n=t.length,r=[],i=0;i>>1]|=t.charCodeAt(i)<<16-i%2*16;return e.create(r,2*n)}},n.Utf16LE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(a))}return r.join("")},parse:function(t){for(var n=t.length,r=[],o=0;o>>1]|=i(t.charCodeAt(o)<<16-o%2*16);return e.create(r,2*n)}}}(),r.enc.Utf16)},888:function(t,e,n){var r,i,o,a,s,c,l,u;t.exports=(u=n(8249),n(2783),n(9824),o=(i=(r=u).lib).Base,a=i.WordArray,c=(s=r.algo).MD5,l=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n,r=this.cfg,i=r.hasher.create(),o=a.create(),s=o.words,c=r.keySize,l=r.iterations;s.lengthr&&(e=t.finalize(e)),e.clamp();for(var i=this._oKey=e.clone(),a=this._iKey=e.clone(),s=i.words,c=a.words,l=0;l>>2]|=t[i]<<24-i%4*8;e.call(this,r,n)}else e.apply(this,arguments)};n.prototype=t}}(),r.lib.WordArray)},8214:function(t,e,n){var r;t.exports=(r=n(8249),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var c=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=t[e+0],c=t[e+1],d=t[e+2],p=t[e+3],m=t[e+4],v=t[e+5],g=t[e+6],y=t[e+7],_=t[e+8],b=t[e+9],w=t[e+10],E=t[e+11],S=t[e+12],R=t[e+13],x=t[e+14],k=t[e+15],O=o[0],C=o[1],A=o[2],L=o[3];O=l(O,C,A,L,a,7,s[0]),L=l(L,O,C,A,c,12,s[1]),A=l(A,L,O,C,d,17,s[2]),C=l(C,A,L,O,p,22,s[3]),O=l(O,C,A,L,m,7,s[4]),L=l(L,O,C,A,v,12,s[5]),A=l(A,L,O,C,g,17,s[6]),C=l(C,A,L,O,y,22,s[7]),O=l(O,C,A,L,_,7,s[8]),L=l(L,O,C,A,b,12,s[9]),A=l(A,L,O,C,w,17,s[10]),C=l(C,A,L,O,E,22,s[11]),O=l(O,C,A,L,S,7,s[12]),L=l(L,O,C,A,R,12,s[13]),A=l(A,L,O,C,x,17,s[14]),O=u(O,C=l(C,A,L,O,k,22,s[15]),A,L,c,5,s[16]),L=u(L,O,C,A,g,9,s[17]),A=u(A,L,O,C,E,14,s[18]),C=u(C,A,L,O,a,20,s[19]),O=u(O,C,A,L,v,5,s[20]),L=u(L,O,C,A,w,9,s[21]),A=u(A,L,O,C,k,14,s[22]),C=u(C,A,L,O,m,20,s[23]),O=u(O,C,A,L,b,5,s[24]),L=u(L,O,C,A,x,9,s[25]),A=u(A,L,O,C,p,14,s[26]),C=u(C,A,L,O,_,20,s[27]),O=u(O,C,A,L,R,5,s[28]),L=u(L,O,C,A,d,9,s[29]),A=u(A,L,O,C,y,14,s[30]),O=f(O,C=u(C,A,L,O,S,20,s[31]),A,L,v,4,s[32]),L=f(L,O,C,A,_,11,s[33]),A=f(A,L,O,C,E,16,s[34]),C=f(C,A,L,O,x,23,s[35]),O=f(O,C,A,L,c,4,s[36]),L=f(L,O,C,A,m,11,s[37]),A=f(A,L,O,C,y,16,s[38]),C=f(C,A,L,O,w,23,s[39]),O=f(O,C,A,L,R,4,s[40]),L=f(L,O,C,A,a,11,s[41]),A=f(A,L,O,C,p,16,s[42]),C=f(C,A,L,O,g,23,s[43]),O=f(O,C,A,L,b,4,s[44]),L=f(L,O,C,A,S,11,s[45]),A=f(A,L,O,C,k,16,s[46]),O=h(O,C=f(C,A,L,O,d,23,s[47]),A,L,a,6,s[48]),L=h(L,O,C,A,y,10,s[49]),A=h(A,L,O,C,x,15,s[50]),C=h(C,A,L,O,v,21,s[51]),O=h(O,C,A,L,S,6,s[52]),L=h(L,O,C,A,p,10,s[53]),A=h(A,L,O,C,w,15,s[54]),C=h(C,A,L,O,c,21,s[55]),O=h(O,C,A,L,_,6,s[56]),L=h(L,O,C,A,k,10,s[57]),A=h(A,L,O,C,g,15,s[58]),C=h(C,A,L,O,R,21,s[59]),O=h(O,C,A,L,m,6,s[60]),L=h(L,O,C,A,E,10,s[61]),A=h(A,L,O,C,d,15,s[62]),C=h(C,A,L,O,b,21,s[63]),o[0]=o[0]+O|0,o[1]=o[1]+C|0,o[2]=o[2]+A|0,o[3]=o[3]+L|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function l(t,e,n,r,i,o,a){var s=t+(e&n|~e&r)+i+a;return(s<>>32-o)+e}function u(t,e,n,r,i,o,a){var s=t+(e&r|n&~r)+i+a;return(s<>>32-o)+e}function f(t,e,n,r,i,o,a){var s=t+(e^n^r)+i+a;return(s<>>32-o)+e}function h(t,e,n,r,i,o,a){var s=t+(n^(e|~r))+i+a;return(s<>>32-o)+e}e.MD5=o._createHelper(c),e.HmacMD5=o._createHmacHelper(c)}(Math),r.MD5)},8568:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.mode.CFB=function(){var t=r.lib.BlockCipherMode.extend();function e(t,e,n,r){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var a=0;a>24&255)){var e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}var n=t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),function(t){0===(t[0]=e(t[0]))&&(t[1]=e(t[1]))}(a);var s=a.slice(0);r.encryptBlock(s,0);for(var c=0;c>>2]|=i<<24-o%4*8,t.sigBytes+=i},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Ansix923)},2807:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.pad.Iso10126={pad:function(t,e){var n=4*e,i=n-t.sigBytes%n;t.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Iso10126)},1077:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.pad.Iso97971={pad:function(t,e){t.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(t,e)},unpad:function(t){r.pad.ZeroPadding.unpad(t),t.sigBytes--}},r.pad.Iso97971)},6991:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},6475:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.pad.ZeroPadding={pad:function(t,e){var n=4*e;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){var e=t.words,n=t.sigBytes-1;for(n=t.sigBytes-1;n>=0;n--)if(e[n>>>2]>>>24-n%4*8&255){t.sigBytes=n+1;break}}},r.pad.ZeroPadding)},2112:function(t,e,n){var r,i,o,a,s,c,l,u,f;t.exports=(f=n(8249),n(2783),n(9824),o=(i=(r=f).lib).Base,a=i.WordArray,c=(s=r.algo).SHA1,l=s.HMAC,u=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,r=l.create(n.hasher,t),i=a.create(),o=a.create([1]),s=i.words,c=o.words,u=n.keySize,f=n.iterations;s.length>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(e){var o=e.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=l>>>16|4294901760&u,h=u<<16|65535&l;for(r[0]^=l,r[1]^=f,r[2]^=u,r[3]^=h,r[4]^=l,r[5]^=f,r[6]^=u,r[7]^=h,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(t,e){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,s=r>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=c^l}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=e._createHelper(s)}(),r.RabbitLegacy)},4454:function(t,e,n){var r;t.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.Rabbit=e.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,n=0;n<4;n++)t[n]=16711935&(t[n]<<8|t[n]>>>24)|4278255360&(t[n]<<24|t[n]>>>8);var r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(this._b=0,n=0;n<4;n++)c.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=l>>>16|4294901760&u,h=u<<16|65535&l;for(i[0]^=l,i[1]^=f,i[2]^=u,i[3]^=h,i[4]^=l,i[5]^=f,i[6]^=u,i[7]^=h,n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(t,e){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,s=r>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=c^l}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=e._createHelper(s)}(),r.Rabbit)},1857:function(t,e,n){var r;t.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=n.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var a=i%n,s=e[a>>>2]>>>24-a%4*8&255;o=(o+r[i]+s)%256;var c=r[i];r[i]=r[o],r[o]=c}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[n],t[n]=o,r|=t[(t[e]+t[n])%256]<<24-8*i}return this._i=e,this._j=n,r}t.RC4=e._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});t.RC4Drop=e._createHelper(a)}(),r.RC4)},706:function(t,e,n){var r;t.exports=(r=n(8249),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=i.create([0,1518500249,1859775393,2400959708,2840853838]),h=i.create([1352829926,1548603684,1836072691,2053994217,0]),d=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,d,b,w,E,S,R,x,k,O,C=this._hash.words,A=f.words,L=h.words,B=s.words,j=c.words,N=l.words,P=u.words;for(E=o=C[0],S=a=C[1],R=d=C[2],x=b=C[3],k=w=C[4],n=0;n<80;n+=1)O=o+t[e+B[n]]|0,O+=n<16?p(a,d,b)+A[0]:n<32?m(a,d,b)+A[1]:n<48?v(a,d,b)+A[2]:n<64?g(a,d,b)+A[3]:y(a,d,b)+A[4],O=(O=_(O|=0,N[n]))+w|0,o=w,w=b,b=_(d,10),d=a,a=O,O=E+t[e+j[n]]|0,O+=n<16?y(S,R,x)+L[0]:n<32?g(S,R,x)+L[1]:n<48?v(S,R,x)+L[2]:n<64?m(S,R,x)+L[3]:p(S,R,x)+L[4],O=(O=_(O|=0,P[n]))+k|0,E=k,k=x,x=_(R,10),R=S,S=O;O=C[1]+d+x|0,C[1]=C[2]+b+k|0,C[2]=C[3]+w+E|0,C[3]=C[4]+o+S|0,C[4]=C[0]+a+R|0,C[0]=O},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function p(t,e,n){return t^e^n}function m(t,e,n){return t&e|~t&n}function v(t,e,n){return(t|~e)^n}function g(t,e,n){return t&n|e&~n}function y(t,e,n){return t^(e|~n)}function _(t,e){return t<>>32-e}e.RIPEMD160=o._createHelper(d),e.HmacRIPEMD160=o._createHmacHelper(d)}(Math),r.RIPEMD160)},2783:function(t,e,n){var r,i,o,a,s,c,l,u;t.exports=(i=(r=u=n(8249)).lib,o=i.WordArray,a=i.Hasher,s=r.algo,c=[],l=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=0;l<80;l++){if(l<16)c[l]=0|t[e+l];else{var u=c[l-3]^c[l-8]^c[l-14]^c[l-16];c[l]=u<<1|u>>>31}var f=(r<<5|r>>>27)+s+c[l];f+=l<20?1518500249+(i&o|~i&a):l<40?1859775393+(i^o^a):l<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(r+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}}),r.SHA1=a._createHelper(l),r.HmacSHA1=a._createHmacHelper(l),u.SHA1)},7792:function(t,e,n){var r,i,o,a,s,c;t.exports=(c=n(8249),n(2153),i=(r=c).lib.WordArray,o=r.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=4,t}}),r.SHA224=a._createHelper(s),r.HmacSHA224=a._createHmacHelper(s),c.SHA224)},2153:function(t,e,n){var r;t.exports=(r=n(8249),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.algo,s=[],c=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(s[i]=n(t.pow(r,.5))),c[i]=n(t.pow(r,1/3)),i++),r++}();var l=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=0;d<64;d++){if(d<16)l[d]=0|t[e+d];else{var p=l[d-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=l[d-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;l[d]=m+l[d-7]+g+l[d-16]}var y=r&i^r&o^i&o,_=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),b=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&f)+c[d]+l[d];h=f,f=u,u=s,s=a+b|0,a=o,o=i,i=r,r=b+(_+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+f|0,n[7]=n[7]+h|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(u),e.HmacSHA256=o._createHmacHelper(u)}(Math),r.SHA256)},3327:function(t,e,n){var r;t.exports=(r=n(8249),n(4938),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.x64.Word,s=e.algo,c=[],l=[],u=[];!function(){for(var t=1,e=0,n=0;n<24;n++){c[t+5*e]=(n+1)*(n+2)/2%64;var r=(2*t+3*e)%5;t=e%5,e=r}for(t=0;t<5;t++)for(e=0;e<5;e++)l[t+5*e]=e+(2*t+3*e)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,f=0,h=0;h<7;h++){if(1&i){var d=(1<>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(C=n[i]).high^=a,C.low^=o}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var d=0,p=0,m=0;m<5;m++)d^=(C=n[h+5*m]).high,p^=C.low;var v=f[h];v.high=d,v.low=p}for(h=0;h<5;h++){var g=f[(h+4)%5],y=f[(h+1)%5],_=y.high,b=y.low;for(d=g.high^(_<<1|b>>>31),p=g.low^(b<<1|_>>>31),m=0;m<5;m++)(C=n[h+5*m]).high^=d,C.low^=p}for(var w=1;w<25;w++){var E=(C=n[w]).high,S=C.low,R=c[w];R<32?(d=E<>>32-R,p=S<>>32-R):(d=S<>>64-R,p=E<>>64-R);var x=f[l[w]];x.high=d,x.low=p}var k=f[0],O=n[0];for(k.high=O.high,k.low=O.low,h=0;h<5;h++)for(m=0;m<5;m++){var C=n[w=h+5*m],A=f[w],L=f[(h+1)%5+5*m],B=f[(h+2)%5+5*m];C.high=A.high^~L.high&B.high,C.low=A.low^~L.low&B.low}C=n[0];var j=u[s];C.high^=j.high,C.low^=j.low}},_doFinalize:function(){var e=this._data,n=e.words,r=(this._nDataBytes,8*e.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(t.ceil((r+1)/o)*o>>>5)-1]|=128,e.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,c=s/8,l=[],u=0;u>>24)|4278255360&(h<<24|h>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),l.push(d),l.push(h)}return new i.init(l,s)},clone:function(){for(var t=o.clone.call(this),e=t._state=this._state.slice(0),n=0;n<25;n++)e[n]=e[n].clone();return t}});e.SHA3=o._createHelper(h),e.HmacSHA3=o._createHmacHelper(h)}(Math),r.SHA3)},7460:function(t,e,n){var r,i,o,a,s,c,l,u;t.exports=(u=n(8249),n(4938),n(34),i=(r=u).x64,o=i.Word,a=i.WordArray,s=r.algo,c=s.SHA512,l=s.SHA384=c.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var t=c._doFinalize.call(this);return t.sigBytes-=16,t}}),r.SHA384=c._createHelper(l),r.HmacSHA384=c._createHmacHelper(l),u.SHA384)},34:function(t,e,n){var r;t.exports=(r=n(8249),n(4938),function(){var t=r,e=t.lib.Hasher,n=t.x64,i=n.Word,o=n.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],l=[];!function(){for(var t=0;t<80;t++)l[t]=s()}();var u=a.SHA512=e.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=r.high,p=r.low,m=i.high,v=i.low,g=o.high,y=o.low,_=a.high,b=a.low,w=s.high,E=s.low,S=u.high,R=u.low,x=f.high,k=f.low,O=h.high,C=h.low,A=d,L=p,B=m,j=v,N=g,P=y,z=_,T=b,I=w,D=E,M=S,F=R,H=x,W=k,U=O,q=C,V=0;V<80;V++){var G,Y,J=l[V];if(V<16)Y=J.high=0|t[e+2*V],G=J.low=0|t[e+2*V+1];else{var K=l[V-15],X=K.high,$=K.low,Z=(X>>>1|$<<31)^(X>>>8|$<<24)^X>>>7,Q=($>>>1|X<<31)^($>>>8|X<<24)^($>>>7|X<<25),tt=l[V-2],et=tt.high,nt=tt.low,rt=(et>>>19|nt<<13)^(et<<3|nt>>>29)^et>>>6,it=(nt>>>19|et<<13)^(nt<<3|et>>>29)^(nt>>>6|et<<26),ot=l[V-7],at=ot.high,st=ot.low,ct=l[V-16],lt=ct.high,ut=ct.low;Y=(Y=(Y=Z+at+((G=Q+st)>>>0>>0?1:0))+rt+((G+=it)>>>0>>0?1:0))+lt+((G+=ut)>>>0>>0?1:0),J.high=Y,J.low=G}var ft,ht=I&M^~I&H,dt=D&F^~D&W,pt=A&B^A&N^B&N,mt=L&j^L&P^j&P,vt=(A>>>28|L<<4)^(A<<30|L>>>2)^(A<<25|L>>>7),gt=(L>>>28|A<<4)^(L<<30|A>>>2)^(L<<25|A>>>7),yt=(I>>>14|D<<18)^(I>>>18|D<<14)^(I<<23|D>>>9),_t=(D>>>14|I<<18)^(D>>>18|I<<14)^(D<<23|I>>>9),bt=c[V],wt=bt.high,Et=bt.low,St=U+yt+((ft=q+_t)>>>0>>0?1:0),Rt=gt+mt;U=H,q=W,H=M,W=F,M=I,F=D,I=z+(St=(St=(St=St+ht+((ft+=dt)>>>0

>>0?1:0))+wt+((ft+=Et)>>>0>>0?1:0))+Y+((ft+=G)>>>0>>0?1:0))+((D=T+ft|0)>>>0>>0?1:0)|0,z=N,T=P,N=B,P=j,B=A,j=L,A=St+(vt+pt+(Rt>>>0>>0?1:0))+((L=ft+Rt|0)>>>0>>0?1:0)|0}p=r.low=p+L,r.high=d+A+(p>>>0>>0?1:0),v=i.low=v+j,i.high=m+B+(v>>>0>>0?1:0),y=o.low=y+P,o.high=g+N+(y>>>0

>>0?1:0),b=a.low=b+T,a.high=_+z+(b>>>0>>0?1:0),E=s.low=E+D,s.high=w+I+(E>>>0>>0?1:0),R=u.low=R+F,u.high=S+M+(R>>>0>>0?1:0),k=f.low=k+W,f.high=x+H+(k>>>0>>0?1:0),C=h.low=C+q,h.high=O+U+(C>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),e[31+(r+128>>>10<<5)]=n,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(u),t.HmacSHA512=e._createHmacHelper(u)}(),r.SHA512)},4253:function(t,e,n){var r;t.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var t=r,e=t.lib,n=e.WordArray,i=e.BlockCipher,o=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],n=0;n<56;n++){var r=a[n]-1;e[n]=t[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var l=i[o]=[],u=c[o];for(n=0;n<24;n++)l[n/6|0]|=e[(s[n]-1+u)%28]<<31-n%6,l[4+(n/6|0)]|=e[28+(s[n+24]-1+u)%28]<<31-n%6;for(l[0]=l[0]<<1|l[0]>>>31,n=1;n<7;n++)l[n]=l[n]>>>4*(n-1)+3;l[7]=l[7]<<5|l[7]>>>27}var f=this._invSubKeys=[];for(n=0;n<16;n++)f[n]=i[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,n){this._lBlock=t[e],this._rBlock=t[e+1],h.call(this,4,252645135),h.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,a=this._rBlock,s=0,c=0;c<8;c++)s|=l[c][((a^i[c])&u[c])>>>0];this._lBlock=a,this._rBlock=o^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,h.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(t,e){var n=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=n,this._lBlock^=n<>>t^this._lBlock)&e;this._lBlock^=n,this._rBlock^=n<192.");var e=t.slice(0,2),r=t.length<4?t.slice(0,2):t.slice(2,4),i=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=f.createEncryptor(n.create(e)),this._des2=f.createEncryptor(n.create(r)),this._des3=f.createEncryptor(n.create(i))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(p)}(),r.TripleDES)},4938:function(t,e,n){var r,i,o,a,s,c;t.exports=(r=n(8249),o=(i=r).lib,a=o.Base,s=o.WordArray,(c=i.x64={}).Word=a.extend({init:function(t,e){this.high=t,this.low=e}}),c.WordArray=a.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:8*t.length},toX32:function(){for(var t=this.words,e=t.length,n=[],r=0;r{var r,i;!function(o,a){"use strict";void 0===(i="function"==typeof(r=a)?r.call(e,n,e,t):r)||(t.exports=i)}(window,(function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],n=0;n{var r,i;!function(o,a){r=[n(9741)],i=function(t){return function(t,e){"use strict";var n={extend:function(t,e){for(var n in e)t[n]=e[n];return t},modulo:function(t,e){return(t%e+e)%e}},r=Array.prototype.slice;n.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?r.call(t):[t]},n.removeFrom=function(t,e){var n=t.indexOf(e);-1!=n&&t.splice(n,1)},n.getParent=function(t,n){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,n))return t},n.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.filterFindElements=function(t,r){t=n.makeArray(t);var i=[];return t.forEach((function(t){if(t instanceof HTMLElement)if(r){e(t,r)&&i.push(t);for(var n=t.querySelectorAll(r),o=0;o{var r,i;window,void 0===(i="function"==typeof(r=function(){"use strict";function t(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}var e="undefined"==typeof console?function(){}:function(t){console.error(t)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],r=n.length;function i(t){var n=getComputedStyle(t);return n||e("Style returned "+n+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),n}var o,a=!1;function s(e){if(function(){if(!a){a=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(e);var r=i(e);o=200==Math.round(t(r.width)),s.isBoxSizeOuter=o,n.removeChild(e)}}(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var c=i(e);if("none"==c.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e{setTimeout((()=>{this.progress(t,e,n)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},i.prototype.progress=function(t,e,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&r&&r.log(`progress: ${n}`,t,e)},i.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},s.prototype=Object.create(e.prototype),s.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},s.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},s.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:n}=this.img,r="PICTURE"===n.nodeName?n:this.img;this.emitEvent("progress",[this,r,e])},s.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},s.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},s.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},s.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype=Object.create(s.prototype),c.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},c.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},i.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(n=e,n.fn.imagesLoaded=function(t,e){return new i(this,t,e).jqDeferred.promise(n(this))})},i.makeJQueryPlugin(),i}))},8751:(t,e,n)=>{var r,i,o;window,i=[n(1794),n(6131)],void 0===(o="function"==typeof(r=function(t,e){"use strict";var n=t.create("masonry");n.compatOptions.fitWidth="isFitWidth";var r=n.prototype;return r._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t1&&n+t>this.cols?0:n;var r=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=r?n+t:this.horizontalColIndex,{col:n,y:this._getColGroupY(n,t)}},r._manageStamp=function(t){var n=e(t),r=this._getElementOffset(t),i=this._getOption("originLeft")?r.left:r.right,o=i+n.outerWidth,a=Math.floor(i/this.columnWidth);a=Math.max(0,a);var s=Math.floor(o/this.columnWidth);s-=o%this.columnWidth?0:1,s=Math.min(this.cols-1,s);for(var c=(this._getOption("originTop")?r.top:r.bottom)+n.outerHeight,l=a;l<=s;l++)this.colYs[l]=Math.max(c,this.colYs[l])},r._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},r._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},r.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},n})?r.apply(e,i):r)||(t.exports=o)},652:(t,e,n)=>{var r,i,o;window,i=[n(1206),n(6131)],void 0===(o="function"==typeof(r=function(t,e){"use strict";var n=document.documentElement.style,r="string"==typeof n.transition?"transition":"WebkitTransition",i="string"==typeof n.transform?"transform":"WebkitTransform",o={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],a={transform:i,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"};function s(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var c=s.prototype=Object.create(t.prototype);c.constructor=s,c._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},c.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},c.getSize=function(){this.size=e(this.element)},c.css=function(t){var e=this.element.style;for(var n in t)e[a[n]||n]=t[n]},c.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),r=t[e?"left":"right"],i=t[n?"top":"bottom"],o=parseFloat(r),a=parseFloat(i),s=this.layout.size;-1!=r.indexOf("%")&&(o=o/100*s.width),-1!=i.indexOf("%")&&(a=a/100*s.height),o=isNaN(o)?0:o,a=isNaN(a)?0:a,o-=e?s.paddingLeft:s.paddingRight,a-=n?s.paddingTop:s.paddingBottom,this.position.x=o,this.position.y=a},c.layoutPosition=function(){var t=this.layout.size,e={},n=this.layout._getOption("originLeft"),r=this.layout._getOption("originTop"),i=n?"paddingLeft":"paddingRight",o=n?"left":"right",a=n?"right":"left",s=this.position.x+t[i];e[o]=this.getXValue(s),e[a]="";var c=r?"paddingTop":"paddingBottom",l=r?"top":"bottom",u=r?"bottom":"top",f=this.position.y+t[c];e[l]=this.getYValue(f),e[u]="",this.css(e),this.emitEvent("layout",[this])},c.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},c.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},c._transitionTo=function(t,e){this.getPosition();var n=this.position.x,r=this.position.y,i=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),!i||this.isTransitioning){var o=t-n,a=e-r,s={};s.transform=this.getTranslate(o,a),this.transition({to:s,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},c.getTranslate=function(t,e){return"translate3d("+(t=this.layout._getOption("originLeft")?t:-t)+"px, "+(e=this.layout._getOption("originTop")?e:-e)+"px, 0)"},c.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},c.moveTo=c._transitionTo,c.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},c._nonTransition=function(t){for(var e in this.css(t.to),t.isCleaning&&this._removeStyles(t.to),t.onTransitionEnd)t.onTransitionEnd[e].call(this)},c.transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e=this._transn;for(var n in t.onTransitionEnd)e.onEnd[n]=t.onTransitionEnd[n];for(n in t.to)e.ingProperties[n]=!0,t.isCleaning&&(e.clean[n]=!0);t.from&&(this.css(t.from),this.element.offsetHeight),this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var l="opacity,"+i.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}));c.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(o,this,!1)}},c.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},c.onotransitionend=function(t){this.ontransitionend(t)};var u={"-webkit-transform":"transform"};c.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=u[t.propertyName]||t.propertyName;delete e.ingProperties[n],function(t){for(var e in t)return!1;return!0}(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd&&(e.onEnd[n].call(this),delete e.onEnd[n]),this.emitEvent("transitionEnd",[this])}},c.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},c._removeStyles=function(t){var e={};for(var n in t)e[n]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return c.removeTransitionStyles=function(){this.css(f)},c.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},c.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},c.remove=function(){r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",(function(){this.removeElem()})),this.hide()):this.removeElem()},c.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},c.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},c.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var n in e)return n},c.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},c.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},c.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},s})?r.apply(e,i):r)||(t.exports=o)},1206:function(t,e,n){var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){"use strict";function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},r=n[t]=n[t]||[];return-1==r.indexOf(e)&&r.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var r=n.indexOf(e);return-1!=r&&n.splice(r,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){n=n.slice(0),e=e||[];for(var r=this._onceEvents&&this._onceEvents[t],i=0;i{var r,i;!function(o,a){"use strict";r=[n(1206),n(6131),n(9047),n(652)],i=function(t,e,n,r){return function(t,e,n,r,i){var o=t.console,a=t.jQuery,s=function(){},c=0,l={};function u(t,e){var n=r.getQueryElement(t);if(n){this.element=n,a&&(this.$element=a(this.element)),this.options=r.extend({},this.constructor.defaults),this.option(e);var i=++c;this.element.outlayerGUID=i,l[i]=this,this._create(),this._getOption("initLayout")&&this.layout()}else o&&o.error("Bad element for "+this.constructor.namespace+": "+(n||t))}u.namespace="outlayer",u.Item=i,u.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=u.prototype;function h(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}r.extend(f,e.prototype),f.option=function(t){r.extend(this.options,t)},f._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},u.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),r.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(t){for(var e=this._filterFindItemElements(t),n=this.constructor.Item,r=[],i=0;i{}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return e[t].call(o.exports,o,o.exports,r),o.exports}r.m=e,t=[],r.O=(e,n,i,o)=>{if(!n){var a=1/0;for(u=0;u=o)&&Object.keys(r.O).every((t=>r.O[t](n[c])))?n.splice(c--,1):(s=!1,o0&&t[u-1][2]>o;u--)t[u]=t[u-1];t[u]=[n,i,o]},r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t={245:0,228:0};r.O.j=e=>0===t[e];var e=(e,n)=>{var i,o,a=n[0],s=n[1],c=n[2],l=0;if(a.some((e=>0!==t[e]))){for(i in s)r.o(s,i)&&(r.m[i]=s[i]);if(c)var u=c(r)}for(e&&e(n);lr(7131)));i=r.O(i)})(); \ No newline at end of file diff --git a/build/media-modal/index.asset.php b/build/media-modal/index.asset.php index 191f6c0..b2124e8 100644 --- a/build/media-modal/index.asset.php +++ b/build/media-modal/index.asset.php @@ -1 +1 @@ - array('react', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'd7cfb89cc06c9b2ad5e3'); + array('react', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '641a2f3fb81812d19232'); diff --git a/build/media-modal/index.js b/build/media-modal/index.js deleted file mode 100644 index f172959..0000000 --- a/build/media-modal/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{var t={4184:(t,e)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var t=[],e=0;e>>8^255&p^99,i[n]=p,o[p]=n;var m=t[n],v=t[m],g=t[v],y=257*t[p]^16843008*p;a[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,c[n]=y<<8|y>>>24,l[n]=y,y=16843009*g^65537*v^257*m^16843008*n,u[p]=y<<24|y>>>8,f[p]=y<<16|y>>>16,h[p]=y<<8|y>>>24,d[p]=y,n?(n=m^t[t[t[g^m]]],r^=t[t[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a6&&a%n==4&&(l=i[l>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l]):(l=i[(l=l<<8|l>>>24)>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l],l^=p[a/n|0]<<24),o[a]=o[a-n]^l);for(var s=this._invKeySchedule=[],c=0;c>>24]]^f[i[l>>>16&255]]^h[i[l>>>8&255]]^d[i[255&l]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,a,s,c,l,i)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,u,f,h,d,o),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,o,a,s){for(var c=this._nRounds,l=t[e]^n[0],u=t[e+1]^n[1],f=t[e+2]^n[2],h=t[e+3]^n[3],d=4,p=1;p>>24]^i[u>>>16&255]^o[f>>>8&255]^a[255&h]^n[d++],v=r[u>>>24]^i[f>>>16&255]^o[h>>>8&255]^a[255&l]^n[d++],g=r[f>>>24]^i[h>>>16&255]^o[l>>>8&255]^a[255&u]^n[d++],y=r[h>>>24]^i[l>>>16&255]^o[u>>>8&255]^a[255&f]^n[d++];l=m,u=v,f=g,h=y}m=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^n[d++],v=(s[u>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&l])^n[d++],g=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^n[d++],y=(s[h>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&f])^n[d++],t[e]=m,t[e+1]=v,t[e+2]=g,t[e+3]=y},keySize:8});t.AES=e._createHelper(m)}(),r.AES)},5109:function(t,e,n){var r,i,o,a,s,c,l,u,f,h,d,p,m,v,g,y,_,b,w;t.exports=(r=n(8249),n(888),void(r.lib.Cipher||(i=r,o=i.lib,a=o.Base,s=o.WordArray,c=o.BufferedBlockAlgorithm,l=i.enc,l.Utf8,u=l.Base64,f=i.algo.EvpKDF,h=o.Cipher=c.extend({cfg:a.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){c.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?w:_}return function(e){return{encrypt:function(n,r,i){return t(r).encrypt(e,n,r,i)},decrypt:function(n,r,i){return t(r).decrypt(e,n,r,i)}}}}()}),o.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),d=i.mode={},p=o.BlockCipherMode=a.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),m=d.CBC=function(){var t=p.extend();function e(t,e,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var o=0;o>>2];t.sigBytes-=e}},o.BlockCipher=h.extend({cfg:h.cfg.extend({mode:m,padding:v}),reset:function(){var t;h.reset.call(this);var e=this.cfg,n=e.iv,r=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=r.createEncryptor:(t=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,n&&n.words):(this._mode=t.call(r,this,n&&n.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),g=o.CipherParams=a.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),y=(i.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;return(n?s.create([1398893684,1701076831]).concat(n).concat(e):e).toString(u)},parse:function(t){var e,n=u.parse(t),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(e=s.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:e})}},_=o.SerializableCipher=a.extend({cfg:a.extend({format:y}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r),o=i.finalize(e),a=i.cfg;return g.create({ciphertext:o,key:n,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),b=(i.kdf={}).OpenSSL={execute:function(t,e,n,r){r||(r=s.random(8));var i=f.create({keySize:e+n}).compute(t,r),o=s.create(i.words.slice(e),4*n);return i.sigBytes=4*e,g.create({key:i,iv:o,salt:r})}},w=o.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:b}),encrypt:function(t,e,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,t.keySize,t.ivSize);r.iv=i.iv;var o=_.encrypt.call(this,t,e,i.key,r);return o.mixIn(i),o},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var i=r.kdf.execute(n,t.keySize,t.ivSize,e.salt);return r.iv=i.iv,_.decrypt.call(this,t,e,i.key,r)}}))))},8249:function(t,e,n){var r;t.exports=(r=r||function(t,e){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==n.g&&n.g.crypto&&(r=n.g.crypto),!r)try{r=n(2480)}catch(t){}var i=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),a={},s=a.lib={},c=s.Base={extend:function(t){var e=o(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},l=s.WordArray=c.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||f).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o>>2]>>>24-o%4*8&255;e[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new l.init(n,e/2)}},h=u.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new l.init(n,e)}},d=u.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},p=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),c=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*a,u=t.min(4*c,o);if(c){for(var f=0;f>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var c=r.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(t){var e=t.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i>>6-a%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return o.create(r,i)}(t,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},r.enc.Base64)},3786:function(t,e,n){var r,i,o;t.exports=(r=n(8249),o=(i=r).lib.WordArray,i.enc.Base64url={stringify:function(t,e=!0){var n=t.words,r=t.sigBytes,i=e?this._safe_map:this._map;t.clamp();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,c=0;c<4&&a+.75*c>>6*(3-c)&63));var l=i.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("")},parse:function(t,e=!0){var n=t.length,r=e?this._safe_map:this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var a=0;a>>6-a%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return o.create(r,i)}(t,n,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},r.enc.Base64url)},298:function(t,e,n){var r;t.exports=(r=n(8249),function(){var t=r,e=t.lib.WordArray,n=t.enc;function i(t){return t<<8&4278255360|t>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var n=t.length,r=[],i=0;i>>1]|=t.charCodeAt(i)<<16-i%2*16;return e.create(r,2*n)}},n.Utf16LE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(a))}return r.join("")},parse:function(t){for(var n=t.length,r=[],o=0;o>>1]|=i(t.charCodeAt(o)<<16-o%2*16);return e.create(r,2*n)}}}(),r.enc.Utf16)},888:function(t,e,n){var r,i,o,a,s,c,l,u;t.exports=(u=n(8249),n(2783),n(9824),o=(i=(r=u).lib).Base,a=i.WordArray,c=(s=r.algo).MD5,l=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n,r=this.cfg,i=r.hasher.create(),o=a.create(),s=o.words,c=r.keySize,l=r.iterations;s.lengthr&&(e=t.finalize(e)),e.clamp();for(var i=this._oKey=e.clone(),a=this._iKey=e.clone(),s=i.words,c=a.words,l=0;l>>2]|=t[i]<<24-i%4*8;e.call(this,r,n)}else e.apply(this,arguments)};n.prototype=t}}(),r.lib.WordArray)},8214:function(t,e,n){var r;t.exports=(r=n(8249),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var c=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=t[e+0],c=t[e+1],d=t[e+2],p=t[e+3],m=t[e+4],v=t[e+5],g=t[e+6],y=t[e+7],_=t[e+8],b=t[e+9],w=t[e+10],E=t[e+11],S=t[e+12],R=t[e+13],x=t[e+14],k=t[e+15],O=o[0],C=o[1],A=o[2],L=o[3];O=l(O,C,A,L,a,7,s[0]),L=l(L,O,C,A,c,12,s[1]),A=l(A,L,O,C,d,17,s[2]),C=l(C,A,L,O,p,22,s[3]),O=l(O,C,A,L,m,7,s[4]),L=l(L,O,C,A,v,12,s[5]),A=l(A,L,O,C,g,17,s[6]),C=l(C,A,L,O,y,22,s[7]),O=l(O,C,A,L,_,7,s[8]),L=l(L,O,C,A,b,12,s[9]),A=l(A,L,O,C,w,17,s[10]),C=l(C,A,L,O,E,22,s[11]),O=l(O,C,A,L,S,7,s[12]),L=l(L,O,C,A,R,12,s[13]),A=l(A,L,O,C,x,17,s[14]),O=u(O,C=l(C,A,L,O,k,22,s[15]),A,L,c,5,s[16]),L=u(L,O,C,A,g,9,s[17]),A=u(A,L,O,C,E,14,s[18]),C=u(C,A,L,O,a,20,s[19]),O=u(O,C,A,L,v,5,s[20]),L=u(L,O,C,A,w,9,s[21]),A=u(A,L,O,C,k,14,s[22]),C=u(C,A,L,O,m,20,s[23]),O=u(O,C,A,L,b,5,s[24]),L=u(L,O,C,A,x,9,s[25]),A=u(A,L,O,C,p,14,s[26]),C=u(C,A,L,O,_,20,s[27]),O=u(O,C,A,L,R,5,s[28]),L=u(L,O,C,A,d,9,s[29]),A=u(A,L,O,C,y,14,s[30]),O=f(O,C=u(C,A,L,O,S,20,s[31]),A,L,v,4,s[32]),L=f(L,O,C,A,_,11,s[33]),A=f(A,L,O,C,E,16,s[34]),C=f(C,A,L,O,x,23,s[35]),O=f(O,C,A,L,c,4,s[36]),L=f(L,O,C,A,m,11,s[37]),A=f(A,L,O,C,y,16,s[38]),C=f(C,A,L,O,w,23,s[39]),O=f(O,C,A,L,R,4,s[40]),L=f(L,O,C,A,a,11,s[41]),A=f(A,L,O,C,p,16,s[42]),C=f(C,A,L,O,g,23,s[43]),O=f(O,C,A,L,b,4,s[44]),L=f(L,O,C,A,S,11,s[45]),A=f(A,L,O,C,k,16,s[46]),O=h(O,C=f(C,A,L,O,d,23,s[47]),A,L,a,6,s[48]),L=h(L,O,C,A,y,10,s[49]),A=h(A,L,O,C,x,15,s[50]),C=h(C,A,L,O,v,21,s[51]),O=h(O,C,A,L,S,6,s[52]),L=h(L,O,C,A,p,10,s[53]),A=h(A,L,O,C,w,15,s[54]),C=h(C,A,L,O,c,21,s[55]),O=h(O,C,A,L,_,6,s[56]),L=h(L,O,C,A,k,10,s[57]),A=h(A,L,O,C,g,15,s[58]),C=h(C,A,L,O,R,21,s[59]),O=h(O,C,A,L,m,6,s[60]),L=h(L,O,C,A,E,10,s[61]),A=h(A,L,O,C,d,15,s[62]),C=h(C,A,L,O,b,21,s[63]),o[0]=o[0]+O|0,o[1]=o[1]+C|0,o[2]=o[2]+A|0,o[3]=o[3]+L|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function l(t,e,n,r,i,o,a){var s=t+(e&n|~e&r)+i+a;return(s<>>32-o)+e}function u(t,e,n,r,i,o,a){var s=t+(e&r|n&~r)+i+a;return(s<>>32-o)+e}function f(t,e,n,r,i,o,a){var s=t+(e^n^r)+i+a;return(s<>>32-o)+e}function h(t,e,n,r,i,o,a){var s=t+(n^(e|~r))+i+a;return(s<>>32-o)+e}e.MD5=o._createHelper(c),e.HmacMD5=o._createHmacHelper(c)}(Math),r.MD5)},8568:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.mode.CFB=function(){var t=r.lib.BlockCipherMode.extend();function e(t,e,n,r){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var a=0;a>24&255)){var e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}var n=t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),function(t){0===(t[0]=e(t[0]))&&(t[1]=e(t[1]))}(a);var s=a.slice(0);r.encryptBlock(s,0);for(var c=0;c>>2]|=i<<24-o%4*8,t.sigBytes+=i},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Ansix923)},2807:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.pad.Iso10126={pad:function(t,e){var n=4*e,i=n-t.sigBytes%n;t.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Iso10126)},1077:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.pad.Iso97971={pad:function(t,e){t.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(t,e)},unpad:function(t){r.pad.ZeroPadding.unpad(t),t.sigBytes--}},r.pad.Iso97971)},6991:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},6475:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.pad.ZeroPadding={pad:function(t,e){var n=4*e;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){var e=t.words,n=t.sigBytes-1;for(n=t.sigBytes-1;n>=0;n--)if(e[n>>>2]>>>24-n%4*8&255){t.sigBytes=n+1;break}}},r.pad.ZeroPadding)},2112:function(t,e,n){var r,i,o,a,s,c,l,u,f;t.exports=(f=n(8249),n(2783),n(9824),o=(i=(r=f).lib).Base,a=i.WordArray,c=(s=r.algo).SHA1,l=s.HMAC,u=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,r=l.create(n.hasher,t),i=a.create(),o=a.create([1]),s=i.words,c=o.words,u=n.keySize,f=n.iterations;s.length>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(e){var o=e.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=l>>>16|4294901760&u,h=u<<16|65535&l;for(r[0]^=l,r[1]^=f,r[2]^=u,r[3]^=h,r[4]^=l,r[5]^=f,r[6]^=u,r[7]^=h,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(t,e){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,s=r>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=c^l}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=e._createHelper(s)}(),r.RabbitLegacy)},4454:function(t,e,n){var r;t.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.Rabbit=e.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,n=0;n<4;n++)t[n]=16711935&(t[n]<<8|t[n]>>>24)|4278255360&(t[n]<<24|t[n]>>>8);var r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(this._b=0,n=0;n<4;n++)c.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=l>>>16|4294901760&u,h=u<<16|65535&l;for(i[0]^=l,i[1]^=f,i[2]^=u,i[3]^=h,i[4]^=l,i[5]^=f,i[6]^=u,i[7]^=h,n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(t,e){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,s=r>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=c^l}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=e._createHelper(s)}(),r.Rabbit)},1857:function(t,e,n){var r;t.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=n.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var a=i%n,s=e[a>>>2]>>>24-a%4*8&255;o=(o+r[i]+s)%256;var c=r[i];r[i]=r[o],r[o]=c}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[n],t[n]=o,r|=t[(t[e]+t[n])%256]<<24-8*i}return this._i=e,this._j=n,r}t.RC4=e._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});t.RC4Drop=e._createHelper(a)}(),r.RC4)},706:function(t,e,n){var r;t.exports=(r=n(8249),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=i.create([0,1518500249,1859775393,2400959708,2840853838]),h=i.create([1352829926,1548603684,1836072691,2053994217,0]),d=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,d,b,w,E,S,R,x,k,O,C=this._hash.words,A=f.words,L=h.words,B=s.words,j=c.words,N=l.words,P=u.words;for(E=o=C[0],S=a=C[1],R=d=C[2],x=b=C[3],k=w=C[4],n=0;n<80;n+=1)O=o+t[e+B[n]]|0,O+=n<16?p(a,d,b)+A[0]:n<32?m(a,d,b)+A[1]:n<48?v(a,d,b)+A[2]:n<64?g(a,d,b)+A[3]:y(a,d,b)+A[4],O=(O=_(O|=0,N[n]))+w|0,o=w,w=b,b=_(d,10),d=a,a=O,O=E+t[e+j[n]]|0,O+=n<16?y(S,R,x)+L[0]:n<32?g(S,R,x)+L[1]:n<48?v(S,R,x)+L[2]:n<64?m(S,R,x)+L[3]:p(S,R,x)+L[4],O=(O=_(O|=0,P[n]))+k|0,E=k,k=x,x=_(R,10),R=S,S=O;O=C[1]+d+x|0,C[1]=C[2]+b+k|0,C[2]=C[3]+w+E|0,C[3]=C[4]+o+S|0,C[4]=C[0]+a+R|0,C[0]=O},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function p(t,e,n){return t^e^n}function m(t,e,n){return t&e|~t&n}function v(t,e,n){return(t|~e)^n}function g(t,e,n){return t&n|e&~n}function y(t,e,n){return t^(e|~n)}function _(t,e){return t<>>32-e}e.RIPEMD160=o._createHelper(d),e.HmacRIPEMD160=o._createHmacHelper(d)}(Math),r.RIPEMD160)},2783:function(t,e,n){var r,i,o,a,s,c,l,u;t.exports=(i=(r=u=n(8249)).lib,o=i.WordArray,a=i.Hasher,s=r.algo,c=[],l=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=0;l<80;l++){if(l<16)c[l]=0|t[e+l];else{var u=c[l-3]^c[l-8]^c[l-14]^c[l-16];c[l]=u<<1|u>>>31}var f=(r<<5|r>>>27)+s+c[l];f+=l<20?1518500249+(i&o|~i&a):l<40?1859775393+(i^o^a):l<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(r+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}}),r.SHA1=a._createHelper(l),r.HmacSHA1=a._createHmacHelper(l),u.SHA1)},7792:function(t,e,n){var r,i,o,a,s,c;t.exports=(c=n(8249),n(2153),i=(r=c).lib.WordArray,o=r.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=4,t}}),r.SHA224=a._createHelper(s),r.HmacSHA224=a._createHmacHelper(s),c.SHA224)},2153:function(t,e,n){var r;t.exports=(r=n(8249),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.algo,s=[],c=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(s[i]=n(t.pow(r,.5))),c[i]=n(t.pow(r,1/3)),i++),r++}();var l=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=0;d<64;d++){if(d<16)l[d]=0|t[e+d];else{var p=l[d-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=l[d-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;l[d]=m+l[d-7]+g+l[d-16]}var y=r&i^r&o^i&o,_=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),b=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&f)+c[d]+l[d];h=f,f=u,u=s,s=a+b|0,a=o,o=i,i=r,r=b+(_+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+f|0,n[7]=n[7]+h|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(u),e.HmacSHA256=o._createHmacHelper(u)}(Math),r.SHA256)},3327:function(t,e,n){var r;t.exports=(r=n(8249),n(4938),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.x64.Word,s=e.algo,c=[],l=[],u=[];!function(){for(var t=1,e=0,n=0;n<24;n++){c[t+5*e]=(n+1)*(n+2)/2%64;var r=(2*t+3*e)%5;t=e%5,e=r}for(t=0;t<5;t++)for(e=0;e<5;e++)l[t+5*e]=e+(2*t+3*e)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,f=0,h=0;h<7;h++){if(1&i){var d=(1<>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(C=n[i]).high^=a,C.low^=o}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var d=0,p=0,m=0;m<5;m++)d^=(C=n[h+5*m]).high,p^=C.low;var v=f[h];v.high=d,v.low=p}for(h=0;h<5;h++){var g=f[(h+4)%5],y=f[(h+1)%5],_=y.high,b=y.low;for(d=g.high^(_<<1|b>>>31),p=g.low^(b<<1|_>>>31),m=0;m<5;m++)(C=n[h+5*m]).high^=d,C.low^=p}for(var w=1;w<25;w++){var E=(C=n[w]).high,S=C.low,R=c[w];R<32?(d=E<>>32-R,p=S<>>32-R):(d=S<>>64-R,p=E<>>64-R);var x=f[l[w]];x.high=d,x.low=p}var k=f[0],O=n[0];for(k.high=O.high,k.low=O.low,h=0;h<5;h++)for(m=0;m<5;m++){var C=n[w=h+5*m],A=f[w],L=f[(h+1)%5+5*m],B=f[(h+2)%5+5*m];C.high=A.high^~L.high&B.high,C.low=A.low^~L.low&B.low}C=n[0];var j=u[s];C.high^=j.high,C.low^=j.low}},_doFinalize:function(){var e=this._data,n=e.words,r=(this._nDataBytes,8*e.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(t.ceil((r+1)/o)*o>>>5)-1]|=128,e.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,c=s/8,l=[],u=0;u>>24)|4278255360&(h<<24|h>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),l.push(d),l.push(h)}return new i.init(l,s)},clone:function(){for(var t=o.clone.call(this),e=t._state=this._state.slice(0),n=0;n<25;n++)e[n]=e[n].clone();return t}});e.SHA3=o._createHelper(h),e.HmacSHA3=o._createHmacHelper(h)}(Math),r.SHA3)},7460:function(t,e,n){var r,i,o,a,s,c,l,u;t.exports=(u=n(8249),n(4938),n(34),i=(r=u).x64,o=i.Word,a=i.WordArray,s=r.algo,c=s.SHA512,l=s.SHA384=c.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var t=c._doFinalize.call(this);return t.sigBytes-=16,t}}),r.SHA384=c._createHelper(l),r.HmacSHA384=c._createHmacHelper(l),u.SHA384)},34:function(t,e,n){var r;t.exports=(r=n(8249),n(4938),function(){var t=r,e=t.lib.Hasher,n=t.x64,i=n.Word,o=n.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],l=[];!function(){for(var t=0;t<80;t++)l[t]=s()}();var u=a.SHA512=e.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=r.high,p=r.low,m=i.high,v=i.low,g=o.high,y=o.low,_=a.high,b=a.low,w=s.high,E=s.low,S=u.high,R=u.low,x=f.high,k=f.low,O=h.high,C=h.low,A=d,L=p,B=m,j=v,N=g,P=y,z=_,T=b,I=w,M=E,D=S,F=R,H=x,W=k,U=O,q=C,V=0;V<80;V++){var G,Y,J=l[V];if(V<16)Y=J.high=0|t[e+2*V],G=J.low=0|t[e+2*V+1];else{var K=l[V-15],X=K.high,$=K.low,Z=(X>>>1|$<<31)^(X>>>8|$<<24)^X>>>7,Q=($>>>1|X<<31)^($>>>8|X<<24)^($>>>7|X<<25),tt=l[V-2],et=tt.high,nt=tt.low,rt=(et>>>19|nt<<13)^(et<<3|nt>>>29)^et>>>6,it=(nt>>>19|et<<13)^(nt<<3|et>>>29)^(nt>>>6|et<<26),ot=l[V-7],at=ot.high,st=ot.low,ct=l[V-16],lt=ct.high,ut=ct.low;Y=(Y=(Y=Z+at+((G=Q+st)>>>0>>0?1:0))+rt+((G+=it)>>>0>>0?1:0))+lt+((G+=ut)>>>0>>0?1:0),J.high=Y,J.low=G}var ft,ht=I&D^~I&H,dt=M&F^~M&W,pt=A&B^A&N^B&N,mt=L&j^L&P^j&P,vt=(A>>>28|L<<4)^(A<<30|L>>>2)^(A<<25|L>>>7),gt=(L>>>28|A<<4)^(L<<30|A>>>2)^(L<<25|A>>>7),yt=(I>>>14|M<<18)^(I>>>18|M<<14)^(I<<23|M>>>9),_t=(M>>>14|I<<18)^(M>>>18|I<<14)^(M<<23|I>>>9),bt=c[V],wt=bt.high,Et=bt.low,St=U+yt+((ft=q+_t)>>>0>>0?1:0),Rt=gt+mt;U=H,q=W,H=D,W=F,D=I,F=M,I=z+(St=(St=(St=St+ht+((ft+=dt)>>>0

>>0?1:0))+wt+((ft+=Et)>>>0>>0?1:0))+Y+((ft+=G)>>>0>>0?1:0))+((M=T+ft|0)>>>0>>0?1:0)|0,z=N,T=P,N=B,P=j,B=A,j=L,A=St+(vt+pt+(Rt>>>0>>0?1:0))+((L=ft+Rt|0)>>>0>>0?1:0)|0}p=r.low=p+L,r.high=d+A+(p>>>0>>0?1:0),v=i.low=v+j,i.high=m+B+(v>>>0>>0?1:0),y=o.low=y+P,o.high=g+N+(y>>>0

>>0?1:0),b=a.low=b+T,a.high=_+z+(b>>>0>>0?1:0),E=s.low=E+M,s.high=w+I+(E>>>0>>0?1:0),R=u.low=R+F,u.high=S+D+(R>>>0>>0?1:0),k=f.low=k+W,f.high=x+H+(k>>>0>>0?1:0),C=h.low=C+q,h.high=O+U+(C>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),e[31+(r+128>>>10<<5)]=n,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(u),t.HmacSHA512=e._createHmacHelper(u)}(),r.SHA512)},4253:function(t,e,n){var r;t.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var t=r,e=t.lib,n=e.WordArray,i=e.BlockCipher,o=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],n=0;n<56;n++){var r=a[n]-1;e[n]=t[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var l=i[o]=[],u=c[o];for(n=0;n<24;n++)l[n/6|0]|=e[(s[n]-1+u)%28]<<31-n%6,l[4+(n/6|0)]|=e[28+(s[n+24]-1+u)%28]<<31-n%6;for(l[0]=l[0]<<1|l[0]>>>31,n=1;n<7;n++)l[n]=l[n]>>>4*(n-1)+3;l[7]=l[7]<<5|l[7]>>>27}var f=this._invSubKeys=[];for(n=0;n<16;n++)f[n]=i[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,n){this._lBlock=t[e],this._rBlock=t[e+1],h.call(this,4,252645135),h.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,a=this._rBlock,s=0,c=0;c<8;c++)s|=l[c][((a^i[c])&u[c])>>>0];this._lBlock=a,this._rBlock=o^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,h.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(t,e){var n=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=n,this._lBlock^=n<>>t^this._lBlock)&e;this._lBlock^=n,this._rBlock^=n<192.");var e=t.slice(0,2),r=t.length<4?t.slice(0,2):t.slice(2,4),i=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=f.createEncryptor(n.create(e)),this._des2=f.createEncryptor(n.create(r)),this._des3=f.createEncryptor(n.create(i))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(p)}(),r.TripleDES)},4938:function(t,e,n){var r,i,o,a,s,c;t.exports=(r=n(8249),o=(i=r).lib,a=o.Base,s=o.WordArray,(c=i.x64={}).Word=a.extend({init:function(t,e){this.high=t,this.low=e}}),c.WordArray=a.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:8*t.length},toX32:function(){for(var t=this.words,e=t.length,n=[],r=0;r{var r,i;!function(o,a){"use strict";void 0===(i="function"==typeof(r=a)?r.call(e,n,e,t):r)||(t.exports=i)}(window,(function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],n=0;n{var r,i;!function(o,a){r=[n(9741)],i=function(t){return function(t,e){"use strict";var n={extend:function(t,e){for(var n in e)t[n]=e[n];return t},modulo:function(t,e){return(t%e+e)%e}},r=Array.prototype.slice;n.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?r.call(t):[t]},n.removeFrom=function(t,e){var n=t.indexOf(e);-1!=n&&t.splice(n,1)},n.getParent=function(t,n){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,n))return t},n.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.filterFindElements=function(t,r){t=n.makeArray(t);var i=[];return t.forEach((function(t){if(t instanceof HTMLElement)if(r){e(t,r)&&i.push(t);for(var n=t.querySelectorAll(r),o=0;o{var r,i;window,void 0===(i="function"==typeof(r=function(){"use strict";function t(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}var e="undefined"==typeof console?function(){}:function(t){console.error(t)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],r=n.length;function i(t){var n=getComputedStyle(t);return n||e("Style returned "+n+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),n}var o,a=!1;function s(e){if(function(){if(!a){a=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(e);var r=i(e);o=200==Math.round(t(r.width)),s.isBoxSizeOuter=o,n.removeChild(e)}}(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var c=i(e);if("none"==c.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e{setTimeout((()=>{this.progress(t,e,n)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},i.prototype.progress=function(t,e,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&r&&r.log(`progress: ${n}`,t,e)},i.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},s.prototype=Object.create(e.prototype),s.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},s.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},s.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:n}=this.img,r="PICTURE"===n.nodeName?n:this.img;this.emitEvent("progress",[this,r,e])},s.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},s.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},s.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},s.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype=Object.create(s.prototype),c.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},c.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},i.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(n=e,n.fn.imagesLoaded=function(t,e){return new i(this,t,e).jqDeferred.promise(n(this))})},i.makeJQueryPlugin(),i}))},8751:(t,e,n)=>{var r,i,o;window,i=[n(1794),n(6131)],void 0===(o="function"==typeof(r=function(t,e){"use strict";var n=t.create("masonry");n.compatOptions.fitWidth="isFitWidth";var r=n.prototype;return r._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t1&&n+t>this.cols?0:n;var r=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=r?n+t:this.horizontalColIndex,{col:n,y:this._getColGroupY(n,t)}},r._manageStamp=function(t){var n=e(t),r=this._getElementOffset(t),i=this._getOption("originLeft")?r.left:r.right,o=i+n.outerWidth,a=Math.floor(i/this.columnWidth);a=Math.max(0,a);var s=Math.floor(o/this.columnWidth);s-=o%this.columnWidth?0:1,s=Math.min(this.cols-1,s);for(var c=(this._getOption("originTop")?r.top:r.bottom)+n.outerHeight,l=a;l<=s;l++)this.colYs[l]=Math.max(c,this.colYs[l])},r._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},r._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},r.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},n})?r.apply(e,i):r)||(t.exports=o)},652:(t,e,n)=>{var r,i,o;window,i=[n(1206),n(6131)],void 0===(o="function"==typeof(r=function(t,e){"use strict";var n=document.documentElement.style,r="string"==typeof n.transition?"transition":"WebkitTransition",i="string"==typeof n.transform?"transform":"WebkitTransform",o={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],a={transform:i,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"};function s(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var c=s.prototype=Object.create(t.prototype);c.constructor=s,c._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},c.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},c.getSize=function(){this.size=e(this.element)},c.css=function(t){var e=this.element.style;for(var n in t)e[a[n]||n]=t[n]},c.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),r=t[e?"left":"right"],i=t[n?"top":"bottom"],o=parseFloat(r),a=parseFloat(i),s=this.layout.size;-1!=r.indexOf("%")&&(o=o/100*s.width),-1!=i.indexOf("%")&&(a=a/100*s.height),o=isNaN(o)?0:o,a=isNaN(a)?0:a,o-=e?s.paddingLeft:s.paddingRight,a-=n?s.paddingTop:s.paddingBottom,this.position.x=o,this.position.y=a},c.layoutPosition=function(){var t=this.layout.size,e={},n=this.layout._getOption("originLeft"),r=this.layout._getOption("originTop"),i=n?"paddingLeft":"paddingRight",o=n?"left":"right",a=n?"right":"left",s=this.position.x+t[i];e[o]=this.getXValue(s),e[a]="";var c=r?"paddingTop":"paddingBottom",l=r?"top":"bottom",u=r?"bottom":"top",f=this.position.y+t[c];e[l]=this.getYValue(f),e[u]="",this.css(e),this.emitEvent("layout",[this])},c.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},c.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},c._transitionTo=function(t,e){this.getPosition();var n=this.position.x,r=this.position.y,i=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),!i||this.isTransitioning){var o=t-n,a=e-r,s={};s.transform=this.getTranslate(o,a),this.transition({to:s,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},c.getTranslate=function(t,e){return"translate3d("+(t=this.layout._getOption("originLeft")?t:-t)+"px, "+(e=this.layout._getOption("originTop")?e:-e)+"px, 0)"},c.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},c.moveTo=c._transitionTo,c.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},c._nonTransition=function(t){for(var e in this.css(t.to),t.isCleaning&&this._removeStyles(t.to),t.onTransitionEnd)t.onTransitionEnd[e].call(this)},c.transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e=this._transn;for(var n in t.onTransitionEnd)e.onEnd[n]=t.onTransitionEnd[n];for(n in t.to)e.ingProperties[n]=!0,t.isCleaning&&(e.clean[n]=!0);t.from&&(this.css(t.from),this.element.offsetHeight),this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var l="opacity,"+i.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}));c.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(o,this,!1)}},c.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},c.onotransitionend=function(t){this.ontransitionend(t)};var u={"-webkit-transform":"transform"};c.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=u[t.propertyName]||t.propertyName;delete e.ingProperties[n],function(t){for(var e in t)return!1;return!0}(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd&&(e.onEnd[n].call(this),delete e.onEnd[n]),this.emitEvent("transitionEnd",[this])}},c.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},c._removeStyles=function(t){var e={};for(var n in t)e[n]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return c.removeTransitionStyles=function(){this.css(f)},c.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},c.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},c.remove=function(){r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",(function(){this.removeElem()})),this.hide()):this.removeElem()},c.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},c.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},c.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var n in e)return n},c.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},c.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},c.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},s})?r.apply(e,i):r)||(t.exports=o)},1206:function(t,e,n){var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){"use strict";function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},r=n[t]=n[t]||[];return-1==r.indexOf(e)&&r.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var r=n.indexOf(e);return-1!=r&&n.splice(r,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){n=n.slice(0),e=e||[];for(var r=this._onceEvents&&this._onceEvents[t],i=0;i{var r,i;!function(o,a){"use strict";r=[n(1206),n(6131),n(9047),n(652)],i=function(t,e,n,r){return function(t,e,n,r,i){var o=t.console,a=t.jQuery,s=function(){},c=0,l={};function u(t,e){var n=r.getQueryElement(t);if(n){this.element=n,a&&(this.$element=a(this.element)),this.options=r.extend({},this.constructor.defaults),this.option(e);var i=++c;this.element.outlayerGUID=i,l[i]=this,this._create(),this._getOption("initLayout")&&this.layout()}else o&&o.error("Bad element for "+this.constructor.namespace+": "+(n||t))}u.namespace="outlayer",u.Item=i,u.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=u.prototype;function h(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}r.extend(f,e.prototype),f.option=function(t){r.extend(this.options,t)},f._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},u.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),r.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(t){for(var e=this._filterFindItemElements(t),n=this.constructor.Item,r=[],i=0;i{}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";const t=window.wp.element;function e(t,e){return function(){return t.apply(e,arguments)}}const{toString:r}=Object.prototype,{getPrototypeOf:i}=Object,o=(a=Object.create(null),t=>{const e=r.call(t);return a[e]||(a[e]=e.slice(8,-1).toLowerCase())});var a;const s=t=>(t=t.toLowerCase(),e=>o(e)===t),c=t=>e=>typeof e===t,{isArray:l}=Array,u=c("undefined"),f=s("ArrayBuffer"),h=c("string"),d=c("function"),p=c("number"),m=t=>null!==t&&"object"==typeof t,v=t=>{if("object"!==o(t))return!1;const e=i(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},g=s("Date"),y=s("File"),_=s("Blob"),b=s("FileList"),w=s("URLSearchParams");function E(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,i;if("object"!=typeof t&&(t=[t]),l(t))for(r=0,i=t.length;r0;)if(r=n[i],e===r.toLowerCase())return r;return null}const R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,x=t=>!u(t)&&t!==R,k=(O="undefined"!=typeof Uint8Array&&i(Uint8Array),t=>O&&t instanceof O);var O;const C=s("HTMLFormElement"),A=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),L=s("RegExp"),B=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};E(n,((n,i)=>{!1!==e(n,i,t)&&(r[i]=n)})),Object.defineProperties(t,r)},j="abcdefghijklmnopqrstuvwxyz",N="0123456789",P={DIGIT:N,ALPHA:j,ALPHA_DIGIT:j+j.toUpperCase()+N},z={isArray:l,isArrayBuffer:f,isBuffer:function(t){return null!==t&&!u(t)&&null!==t.constructor&&!u(t.constructor)&&d(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||r.call(t)===e||d(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&f(t.buffer),e},isString:h,isNumber:p,isBoolean:t=>!0===t||!1===t,isObject:m,isPlainObject:v,isUndefined:u,isDate:g,isFile:y,isBlob:_,isRegExp:L,isFunction:d,isStream:t=>m(t)&&d(t.pipe),isURLSearchParams:w,isTypedArray:k,isFileList:b,forEach:E,merge:function t(){const{caseless:e}=x(this)&&this||{},n={},r=(r,i)=>{const o=e&&S(n,i)||i;v(n[o])&&v(r)?n[o]=t(n[o],r):v(r)?n[o]=t({},r):l(r)?n[o]=r.slice():n[o]=r};for(let t=0,e=arguments.length;t(E(n,((n,i)=>{r&&d(n)?t[i]=e(n,r):t[i]=n}),{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,a,s;const c={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),a=o.length;a-- >0;)s=o[a],r&&!r(s,t,e)||c[s]||(e[s]=t[s],c[s]=!0);t=!1!==n&&i(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:o,kindOfTest:s,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(l(t))return t;let e=t.length;if(!p(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:C,hasOwnProperty:A,hasOwnProp:A,reduceDescriptors:B,freezeMethods:t=>{B(t,((e,n)=>{if(d(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];d(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return l(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:S,global:R,isContextDefined:x,ALPHABET:P,generateString:(t=16,e=P.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&d(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(m(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const i=l(t)?[]:{};return E(t,((t,e)=>{const o=n(t,r+1);!u(o)&&(i[e]=o)})),e[r]=void 0,i}}return t};return n(t,0)}};function T(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}z.inherits(T,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const I=T.prototype,M={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{M[t]={value:t}})),Object.defineProperties(T,M),Object.defineProperty(I,"isAxiosError",{value:!0}),T.from=(t,e,n,r,i,o)=>{const a=Object.create(I);return z.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),T.call(a,t.message,e,n,r,i),a.cause=t,a.name=t.name,o&&Object.assign(a,o),a};const D=T;function F(t){return z.isPlainObject(t)||z.isArray(t)}function H(t){return z.endsWith(t,"[]")?t.slice(0,-2):t}function W(t,e,n){return t?t.concat(e).map((function(t,e){return t=H(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const U=z.toFlatObject(z,{},null,(function(t){return/^is[A-Z]/.test(t)})),q=function(t,e,n){if(!z.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!z.isUndefined(e[t])}))).metaTokens,i=n.visitor||l,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&z.isSpecCompliantForm(e);if(!z.isFunction(i))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(z.isDate(t))return t.toISOString();if(!s&&z.isBlob(t))throw new D("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(t)||z.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function l(t,n,i){let s=t;if(t&&!i&&"object"==typeof t)if(z.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(z.isArray(t)&&function(t){return z.isArray(t)&&!t.some(F)}(t)||(z.isFileList(t)||z.endsWith(n,"[]"))&&(s=z.toArray(t)))return n=H(n),s.forEach((function(t,r){!z.isUndefined(t)&&null!==t&&e.append(!0===a?W([n],r,o):null===a?n:n+"[]",c(t))})),!1;return!!F(t)||(e.append(W(i,n,o),c(t)),!1)}const u=[],f=Object.assign(U,{defaultVisitor:l,convertValue:c,isVisitable:F});if(!z.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!z.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),z.forEach(n,(function(n,o){!0===(!(z.isUndefined(n)||null===n)&&i.call(e,n,z.isString(o)?o.trim():o,r,f))&&t(n,r?r.concat(o):[o])})),u.pop()}}(t),e};function V(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function G(t,e){this._pairs=[],t&&q(t,this,e)}const Y=G.prototype;Y.append=function(t,e){this._pairs.push([t,e])},Y.toString=function(t){const e=t?function(e){return t.call(this,e,V)}:V;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const J=G;function K(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(t,e,n){if(!e)return t;const r=n&&n.encode||K,i=n&&n.serialize;let o;if(o=i?i(e,n):z.isURLSearchParams(e)?e.toString():new J(e,n).toString(r),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}const $=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},Z={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Q={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:J,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]},tt=function(t){function e(t,n,r,i){let o=t[i++];const a=Number.isFinite(+o),s=i>=t.length;return o=!o&&z.isArray(r)?r.length:o,s?(z.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):(r[o]&&z.isObject(r[o])||(r[o]=[]),e(t,n,r[o],i)&&z.isArray(r[o])&&(r[o]=function(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r{e(function(t){return z.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null},et={"Content-Type":void 0},nt={transitional:Z,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,i=z.isObject(t);if(i&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return r&&r?JSON.stringify(tt(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return q(t,new Q.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return Q.isNode&&z.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=z.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return q(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),function(t,e,n){if(z.isString(t))try{return(0,JSON.parse)(t),z.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||nt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&z.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw D.from(t,D.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Q.classes.FormData,Blob:Q.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};z.forEach(["delete","get","head"],(function(t){nt.headers[t]={}})),z.forEach(["post","put","patch"],(function(t){nt.headers[t]=z.merge(et)}));const rt=nt,it=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ot=Symbol("internals");function at(t){return t&&String(t).trim().toLowerCase()}function st(t){return!1===t||null==t?t:z.isArray(t)?t.map(st):String(t)}function ct(t,e,n,r,i){return z.isFunction(r)?r.call(this,e,n):(i&&(e=n),z.isString(e)?z.isString(r)?-1!==e.indexOf(r):z.isRegExp(r)?r.test(e):void 0:void 0)}class lt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function i(t,e,n){const i=at(e);if(!i)throw new Error("header name must be a non-empty string");const o=z.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||e]=st(t))}const o=(t,e)=>z.forEach(t,((t,n)=>i(t,n,e)));return z.isPlainObject(t)||t instanceof this.constructor?o(t,e):z.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z]+$/.test(t.trim())?o((t=>{const e={};let n,r,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),n=t.substring(0,i).trim().toLowerCase(),r=t.substring(i+1).trim(),!n||e[n]&&it[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&i(e,t,n),this}get(t,e){if(t=at(t)){const n=z.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(z.isFunction(e))return e.call(this,t,n);if(z.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=at(t)){const n=z.findKey(this,t);return!(!n||void 0===this[n]||e&&!ct(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function i(t){if(t=at(t)){const i=z.findKey(n,t);!i||e&&!ct(0,n[i],i,e)||(delete n[i],r=!0)}}return z.isArray(t)?t.forEach(i):i(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const i=e[n];t&&!ct(0,this[i],i,t,!0)||(delete this[i],r=!0)}return r}normalize(t){const e=this,n={};return z.forEach(this,((r,i)=>{const o=z.findKey(n,i);if(o)return e[o]=st(r),void delete e[i];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(i):String(i).trim();a!==i&&delete e[i],e[a]=st(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return z.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&z.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[ot]=this[ot]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=at(t);e[r]||(function(t,e){const n=z.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,i){return this[r].call(this,e,t,n,i)},configurable:!0})}))}(n,t),e[r]=!0)}return z.isArray(t)?t.forEach(r):r(t),this}}lt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.freezeMethods(lt.prototype),z.freezeMethods(lt);const ut=lt;function ft(t,e){const n=this||rt,r=e||n,i=ut.from(r.headers);let o=r.data;return z.forEach(t,(function(t){o=t.call(n,o,i.normalize(),e?e.status:void 0)})),i.normalize(),o}function ht(t){return!(!t||!t.__CANCEL__)}function dt(t,e,n){D.call(this,null==t?"canceled":t,D.ERR_CANCELED,e,n),this.name="CanceledError"}z.inherits(dt,D,{__CANCEL__:!0});const pt=dt,mt=Q.isStandardBrowserEnv?{write:function(t,e,n,r,i,o){const a=[];a.push(t+"="+encodeURIComponent(e)),z.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),z.isString(r)&&a.push("path="+r),z.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function vt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const gt=Q.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=z.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0},yt=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i,o=0,a=0;return e=void 0!==e?e:1e3,function(s){const c=Date.now(),l=r[a];i||(i=c),n[o]=s,r[o]=c;let u=a,f=0;for(;u!==o;)f+=n[u++],u%=t;if(o=(o+1)%t,o===a&&(a=(a+1)%t),c-i{const o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-n,c=r(s);n=o;const l={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&o<=a?(a-o)/c:void 0,event:i};l[e?"download":"upload"]=!0,t(l)}}const bt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const i=ut.from(t.headers).normalize(),o=t.responseType;let a;function s(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}z.isFormData(r)&&(Q.isStandardBrowserEnv||Q.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(e+":"+n))}const l=vt(t.baseURL,t.url);function u(){if(!c)return;const r=ut.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),s()}),(function(t){n(t),s()}),{data:o&&"text"!==o&&"json"!==o?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),X(l,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=u:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(u)},c.onabort=function(){c&&(n(new D("Request aborted",D.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new D("Network Error",D.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||Z;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new D(e,r.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,t,c)),c=null},Q.isStandardBrowserEnv){const e=(t.withCredentials||gt(l))&&t.xsrfCookieName&&mt.read(t.xsrfCookieName);e&&i.set(t.xsrfHeaderName,e)}void 0===r&&i.setContentType(null),"setRequestHeader"in c&&z.forEach(i.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),z.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),o&&"json"!==o&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",_t(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",_t(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=e=>{c&&(n(!e||e.type?new pt(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(l);f&&-1===Q.protocols.indexOf(f)?n(new D("Unsupported protocol "+f+":",D.ERR_BAD_REQUEST,t)):c.send(r||null)}))}};z.forEach(bt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const wt={getAdapter:t=>{t=z.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let i=0;it instanceof ut?t.toJSON():t;function xt(t,e){e=e||{};const n={};function r(t,e,n){return z.isPlainObject(t)&&z.isPlainObject(e)?z.merge.call({caseless:n},t,e):z.isPlainObject(e)?z.merge({},e):z.isArray(e)?e.slice():e}function i(t,e,n){return z.isUndefined(e)?z.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function o(t,e){if(!z.isUndefined(e))return r(void 0,e)}function a(t,e){return z.isUndefined(e)?z.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function s(n,i,o){return o in e?r(n,i):o in t?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>i(Rt(t),Rt(e),!0)};return z.forEach(Object.keys(t).concat(Object.keys(e)),(function(r){const o=c[r]||i,a=o(t[r],e[r],r);z.isUndefined(a)&&o!==s||(n[r]=a)})),n}const kt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{kt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Ot={};kt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.3.4] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,i,o)=>{if(!1===t)throw new D(r(i," has been removed"+(e?" in "+e:"")),D.ERR_DEPRECATED);return e&&!Ot[i]&&(Ot[i]=!0,console.warn(r(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,i,o)}};const Ct={assertOptions:function(t,e,n){if("object"!=typeof t)throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],a=e[o];if(a){const e=t[o],n=void 0===e||a(e,o,t);if(!0!==n)throw new D("option "+o+" must be "+n,D.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new D("Unknown option "+o,D.ERR_BAD_OPTION)}},validators:kt},At=Ct.validators;class Lt{constructor(t){this.defaults=t,this.interceptors={request:new $,response:new $}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=xt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:i}=e;let o;void 0!==n&&Ct.assertOptions(n,{silentJSONParsing:At.transitional(At.boolean),forcedJSONParsing:At.transitional(At.boolean),clarifyTimeoutError:At.transitional(At.boolean)},!1),void 0!==r&&Ct.assertOptions(r,{encode:At.function,serialize:At.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),o=i&&z.merge(i.common,i[e.method]),o&&z.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete i[t]})),e.headers=ut.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let u,f=0;if(!s){const t=[St.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,c),u=t.length,l=Promise.resolve(e);f{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,i){n.reason||(n.reason=new pt(t,r,i),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new jt((function(e){t=e})),cancel:t}}}const Nt=jt,Pt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pt).forEach((([t,e])=>{Pt[e]=t}));const zt=Pt,Tt=function t(n){const r=new Bt(n),i=e(Bt.prototype.request,r);return z.extend(i,Bt.prototype,r,{allOwnKeys:!0}),z.extend(i,r,null,{allOwnKeys:!0}),i.create=function(e){return t(xt(n,e))},i}(rt);Tt.Axios=Bt,Tt.CanceledError=pt,Tt.CancelToken=Nt,Tt.isCancel=ht,Tt.VERSION="1.3.4",Tt.toFormData=q,Tt.AxiosError=D,Tt.Cancel=Tt.CanceledError,Tt.all=function(t){return Promise.all(t)},Tt.spread=function(t){return function(e){return t.apply(null,e)}},Tt.isAxiosError=function(t){return z.isObject(t)&&!0===t.isAxiosError},Tt.mergeConfig=xt,Tt.AxiosHeaders=ut,Tt.formToJSON=t=>tt(z.isHTMLForm(t)?new FormData(t):t),Tt.HttpStatusCode=zt,Tt.default=Tt;const It=Tt;var Mt=n(4184),Dt=n.n(Mt),Ft=n(8751),Ht=n.n(Ft);const Wt=window.React,Ut=new Map,qt=new WeakMap;let Vt=0;function Gt(t,e,n={},r=undefined){if(void 0===window.IntersectionObserver&&void 0!==r){const i=t.getBoundingClientRect();return e(r,{isIntersecting:r,target:t,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}const{id:i,observer:o,elements:a}=function(t){let e=function(t){return Object.keys(t).sort().filter((e=>void 0!==t[e])).map((e=>{return`${e}_${"root"===e?(n=t.root,n?(qt.has(n)||(Vt+=1,qt.set(n,Vt.toString())),qt.get(n)):"0"):t[e]}`;var n})).toString()}(t),n=Ut.get(e);if(!n){const r=new Map;let i;const o=new IntersectionObserver((e=>{e.forEach((e=>{var n;const o=e.isIntersecting&&i.some((t=>e.intersectionRatio>=t));t.trackVisibility&&void 0===e.isVisible&&(e.isVisible=o),null==(n=r.get(e.target))||n.forEach((t=>{t(o,e)}))}))}),t);i=o.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:o,elements:r},Ut.set(e,n)}return n}(n);let s=a.get(t)||[];return a.has(t)||a.set(t,s),s.push(e),o.observe(t),function(){s.splice(s.indexOf(e),1),0===s.length&&(a.delete(t),o.unobserve(t)),0===a.size&&(o.disconnect(),Ut.delete(i))}}class Yt extends Wt.Component{constructor(t){super(t),this.node=null,this._unobserveCb=null,this.handleNode=t=>{this.node&&(this.unobserve(),t||this.props.triggerOnce||this.props.skip||this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=t||null,this.observeNode()},this.handleChange=(t,e)=>{t&&this.props.triggerOnce&&this.unobserve(),isPlainChildren(this.props)||this.setState({inView:t,entry:e}),this.props.onChange&&this.props.onChange(t,e)},this.state={inView:!!t.initialInView,entry:void 0}}componentDidUpdate(t){t.rootMargin===this.props.rootMargin&&t.root===this.props.root&&t.threshold===this.props.threshold&&t.skip===this.props.skip&&t.trackVisibility===this.props.trackVisibility&&t.delay===this.props.delay||(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve(),this.node=null}observeNode(){if(!this.node||this.props.skip)return;const{threshold:t,root:e,rootMargin:n,trackVisibility:r,delay:i,fallbackInView:o}=this.props;this._unobserveCb=Gt(this.node,this.handleChange,{threshold:t,root:e,rootMargin:n,trackVisibility:r,delay:i},o)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){if(!isPlainChildren(this.props)){const{inView:t,entry:e}=this.state;return this.props.children({inView:t,entry:e,ref:this.handleNode})}const t=this.props,{children:e,as:n}=t,r=function(t,e){if(null==t)return{};for(var n,r,i={},o=Object.keys(t);r=0||(i[n]=t[n]);return i}(t);return React.createElement(n||"div",_extends({ref:this.handleNode},r),e)}}function Jt({threshold:t,delay:e,trackVisibility:n,rootMargin:r,root:i,triggerOnce:o,skip:a,initialInView:s,fallbackInView:c,onChange:l}={}){var u;const[f,h]=Wt.useState(null),d=Wt.useRef(),[p,m]=Wt.useState({inView:!!s,entry:void 0});d.current=l,Wt.useEffect((()=>{if(a||!f)return;let s;return s=Gt(f,((t,e)=>{m({inView:t,entry:e}),d.current&&d.current(t,e),e.isIntersecting&&o&&s&&(s(),s=void 0)}),{root:i,rootMargin:r,threshold:t,trackVisibility:n,delay:e},c),()=>{s&&s()}}),[Array.isArray(t)?t.toString():t,f,i,r,o,a,n,c,e]);const v=null==(u=p.entry)?void 0:u.target,g=Wt.useRef();f||!v||o||a||g.current===v||(g.current=v,m({inView:!!s,entry:void 0}));const y=[h,p.inView,p.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}var Kt=(0,t.createContext)();function Xt(t){var e=t.value,n=t.children;return React.createElement(Kt.Provider,{value:e},n)}function $t(){return(0,t.useContext)(Kt)}function Zt(t){return t&&Qt[t.toLowerCase()].icon?Qt[t.toLowerCase()].icon():null}var Qt={proxy:"https://proxy.getinstantimages.com/api/",testmode:!1,defaults:{provider:"unsplash",order:"latest",per_page:"20",arr_key:"results"},providers:["Unsplash","Openverse","Pixabay","Pexels"],unsplash:{name:"Unsplash",requires_key:!0,new:!1,api_var:"client_id",collections_api:"https://api.unsplash.com/collections/",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M10 9V0H22V9H10ZM22 14H32V32H0V14H10V23H22V14Z",fill:"black"}))}},pixabay:{name:"Pixabay",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("g",{clipPath:"url(#clip0_307_143)"},React.createElement("path",{d:"M0 0V32H32V0H0Z",fill:"#48A947"}),React.createElement("path",{d:"M6.83734 22.3147V28C5.93067 28.0427 5.02401 28.032 4.11734 27.9787C4.09601 27.7014 4.06401 27.4667 4.06401 27.2427C4.06401 23.2427 4.05334 19.2534 4.06401 15.2534C4.07467 12.032 5.97334 9.32269 8.85334 8.37335C13.1307 6.95469 17.4507 10.048 17.8453 14.3894C18.144 17.6534 16.4267 20.5547 13.568 21.7814C12.6507 22.176 11.6907 22.304 10.7093 22.304C9.45067 22.3147 8.21334 22.3147 6.83734 22.3147ZM6.84801 19.4454C8.24534 19.4454 9.54667 19.424 10.848 19.4454C13.1627 19.488 14.816 17.76 15.104 15.712C15.424 13.3654 13.7813 11.2107 11.4453 10.88H11.4347C9.25867 10.592 7.06134 12.2774 6.88001 14.528C6.74134 16.128 6.84801 17.728 6.84801 19.4454Z",fill:"#F9FBF9"}),React.createElement("path",{d:"M25.4827 14.9334L30.656 22.2081H27.3067L23.4667 16.9494C22.0694 18.6881 20.9067 20.4907 19.584 22.2081H16.2454L21.408 14.9334L16.8107 8.04272H20.16L23.4454 12.9494L26.7307 8.04272H30.0694L25.4827 14.9334Z",fill:"#FAFCFA"}),React.createElement("path",{d:"M6.848 19.4453C6.848 17.7279 6.74134 16.1173 6.86934 14.5386C7.05067 12.2879 9.248 10.6026 11.424 10.8906C13.7707 11.2106 15.4133 13.3653 15.0933 15.7119C14.816 17.7599 13.152 19.4879 10.8373 19.4453C9.54667 19.4239 8.24534 19.4453 6.848 19.4453Z",fill:"#4AA949"})),React.createElement("defs",null,React.createElement("clipPath",{id:"clip0_307_143"},React.createElement("rect",{width:"32",height:"32",fill:"white"}))))}},pexels:{name:"Pexels",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32px",height:"32px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M2 0h28a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2z",fill:"#05A081"}),React.createElement("path",{d:"M13 21h3.863v-3.752h1.167a3.124 3.124 0 1 0 0-6.248H13v10zm5.863 2H11V9h7.03a5.124 5.124 0 0 1 .833 10.18V23z",fill:"#fff"}))}},openverse:{name:"Openverse",requires_key:!1,new:!1,api_var:"key",key:"",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M25.8578 14.32C29.6708 14.32 32.7618 11.1144 32.7618 7.16C32.7618 3.20564 29.6708 0 25.8578 0C22.0448 0 18.9539 3.20564 18.9539 7.16C18.9539 11.1144 22.0448 14.32 25.8578 14.32Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 7.16C0.761841 11.1 3.84742 14.32 7.66584 14.32V0C3.84742 0 0.761841 3.2 0.761841 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 7.16C9.85791 11.1 12.9435 14.32 16.7619 14.32V0C12.9628 0 9.85791 3.2 9.85791 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M25.8578 31.9399C29.6708 31.9399 32.7618 28.7343 32.7618 24.78C32.7618 20.8256 29.6708 17.62 25.8578 17.62C22.0448 17.62 18.9539 20.8256 18.9539 24.78C18.9539 28.7343 22.0448 31.9399 25.8578 31.9399Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 24.7801C9.85791 28.72 12.9435 31.9401 16.7619 31.9401V17.64C12.9628 17.64 9.85791 20.84 9.85791 24.7801Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 24.84C0.761841 28.8 3.84742 32 7.66584 32V17.7C3.84742 17.7 0.761841 20.9 0.761841 24.84Z",fill:"#000000"}))}}};const te=window.wp.i18n;var ee=[{label:(0,te.__)("WordPress","instant-images"),value:"wordpress"},{label:(0,te.__)("Flickr","instant-images"),value:"flickr"},{label:(0,te.__)("Nasa","instant-images"),value:"nasa"},{label:(0,te.__)("SpaceX","instant-images"),value:"spacex"},{label:(0,te.__)("Wikimedia","instant-images"),value:"wikimedia"}],ne=[{label:(0,te.__)("Square","instant-images"),value:"square"},{label:(0,te.__)("Tall","instant-images"),value:"tall"},{label:(0,te.__)("Wide","instant-images"),value:"wide"}],re=[{label:(0,te.__)("Red","instant-images"),value:"red"},{label:(0,te.__)("Orange","instant-images"),value:"orange"},{label:(0,te.__)("Yellow","instant-images"),value:"yellow"},{label:(0,te.__)("Green","instant-images"),value:"green"},{label:(0,te.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,te.__)("Blue","instant-images"),value:"blue"},{label:(0,te.__)("Violet","instant-images"),value:"violet"},{label:(0,te.__)("Pink","instant-images"),value:"pink"},{label:(0,te.__)("Brown","instant-images"),value:"brown"},{label:(0,te.__)("Black","instant-images"),value:"black"},{label:(0,te.__)("Gray","instant-images"),value:"gray"},{label:(0,te.__)("White","instant-images"),value:"white"}],ie=[{label:(0,te.__)("Landscape","instant-images"),value:"landscape"},{label:(0,te.__)("Portrait","instant-images"),value:"portrait"},{label:(0,te.__)("Square","instant-images"),value:"squarish"}],oe=[{label:(0,te.__)("Grayscale","instant-images"),value:"grayscale"},{label:(0,te.__)("Red","instant-images"),value:"red"},{label:(0,te.__)("Orange","instant-images"),value:"orange"},{label:(0,te.__)("Yellow","instant-images"),value:"yellow"},{label:(0,te.__)("Green","instant-images"),value:"green"},{label:(0,te.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,te.__)("Blue","instant-images"),value:"blue"},{label:(0,te.__)("Lilac","instant-images"),value:"lilac"},{label:(0,te.__)("Pink","instant-images"),value:"pink"},{label:(0,te.__)("White","instant-images"),value:"white"},{label:(0,te.__)("Gray","instant-images"),value:"gray"},{label:(0,te.__)("Black","instant-images"),value:"black"},{label:(0,te.__)("Brown","instant-images"),value:"brown"},{label:(0,te.__)("Transparent","instant-images"),value:"transparent"}],ae=[{label:(0,te.__)("Backgrounds","instant-images"),value:"backgrounds"},{label:(0,te.__)("Fashion","instant-images"),value:"fashion"},{label:(0,te.__)("Nature","instant-images"),value:"nature"},{label:(0,te.__)("Science","instant-images"),value:"science"},{label:(0,te.__)("Education","instant-images"),value:"education"},{label:(0,te.__)("Feelings","instant-images"),value:"feelings"},{label:(0,te.__)("Health","instant-images"),value:"health"},{label:(0,te.__)("People","instant-images"),value:"people"},{label:(0,te.__)("Religion","instant-images"),value:"religion"},{label:(0,te.__)("Places","instant-images"),value:"places"},{label:(0,te.__)("Animals","instant-images"),value:"animals"},{label:(0,te.__)("Industry","instant-images"),value:"industry"},{label:(0,te.__)("Computer","instant-images"),value:"computer"},{label:(0,te.__)("Food","instant-images"),value:"food"},{label:(0,te.__)("Sports","instant-images"),value:"sports"},{label:(0,te.__)("Food","instant-images"),value:"food"},{label:(0,te.__)("Transportation","instant-images"),value:"transportation"},{label:(0,te.__)("Travel","instant-images"),value:"travel"},{label:(0,te.__)("Buildings","instant-images"),value:"buildings"},{label:(0,te.__)("Business","instant-images"),value:"business"},{label:(0,te.__)("Music","instant-images"),value:"music"}],se=[{label:(0,te.__)("Horizontal","instant-images"),value:"horizontal"},{label:(0,te.__)("Vertical","instant-images"),value:"vertical"}],ce=[{label:(0,te.__)("Photo","instant-images"),value:"photo"},{label:(0,te.__)("Illustration","instant-images"),value:"illustration"},{label:(0,te.__)("Vector","instant-images"),value:"vector"}],le=[{label:(0,te.__)("Black & White","instant-images"),value:"black_and_white"},{label:(0,te.__)("Black","instant-images"),value:"black"},{label:(0,te.__)("White","instant-images"),value:"white"},{label:(0,te.__)("Yellow","instant-images"),value:"yellow"},{label:(0,te.__)("Green","instant-images"),value:"green"},{label:(0,te.__)("Orange","instant-images"),value:"orange"},{label:(0,te.__)("Red","instant-images"),value:"red"},{label:(0,te.__)("Purple","instant-images"),value:"purple"},{label:(0,te.__)("Magenta","instant-images"),value:"magenta"},{label:(0,te.__)("Teal","instant-images"),value:"teal"},{label:(0,te.__)("Blue","instant-images"),value:"blue"}],ue=[{label:(0,te.__)("Landscape","instant-images"),value:"landscape"},{label:(0,te.__)("Portrait","instant-images"),value:"portrait"},{label:(0,te.__)("Square","instant-images"),value:"squarish"}];function fe(t){return function(t){if(Array.isArray(t))return he(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return he(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?he(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function he(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1&&parseInt(n)<2&&alert(instant_img_localize.api_ratelimit_msg)}}function Pe(t){return t.charAt(0).toUpperCase()+t.slice(1)}var ze="";function Te(t){var e=t.currentTarget,n=e.getBoundingClientRect(),r=Math.round(n.left),i=Math.round(n.top),o=e.closest("#photo-listing").querySelector("#tooltip");o.classList.remove("over"),e.classList.contains("tooltip--above")?o.classList.add("above"):o.classList.remove("above"),ze=setInterval((function(){clearInterval(ze),o.innerHTML=e.dataset.title,r=r-o.offsetWidth+e.offsetWidth+5,o.style.left="".concat(r,"px"),o.style.top="".concat(i,"px"),setTimeout((function(){o.classList.add("over")}),25)}),750)}function Ie(t){clearInterval(ze),t.currentTarget.closest("#photo-listing").querySelector("#tooltip").classList.remove("over")}function Me(t){t&&window&&window.open(t,"_blank")}function De(){var t=instant_img_localize;switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:200){case 400:case 401:return t.api_invalid_msg;case 403:return t.api_invalid_403_msg;case 404:return t.api_invalid_404_msg;case 429:return t.api_ratelimit_msg;case 500:case 503:return t.api_invalid_500_msg;case 501:return t.api_invalid_501_msg}}function Fe(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=instant_img_localize,r=De(e);switch(e){case 400:case 401:case 500:case 429:console.warn("[".concat(n.instant_images," - ").concat(e," Error] ").concat(Pe(t),": ").concat(r))}}function He(t){return t&&t[Qt.defaults.arr_key]||[]}function We(t){return void 0===t.total||null===t.total?0:t.total}function Ue(t){if(!t||Qt.testmode)return!1;var e=sessionStorage.getItem(je(t));if(!e)return!1;var n=JSON.parse(e),r=n.expires,i=void 0===r?0:r,o=n.error;if(void 0!==o&&o)return!1;var a=Date.now()>i;return a&&Ve(t),!(!n||a)&&n}function qe(t,e){if(!t||!e||null!=e&&e.error)return!1;e.expires=Date.now()+36e5,sessionStorage.setItem(je(t),JSON.stringify(e))}function Ve(t){if(!t)return!1;sessionStorage.removeItem(je(t))}function Ge(t){return Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ge(t)}function Ye(){Ye=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,i){var o=e&&e.prototype instanceof h?e:h,a=Object.create(o.prototype),s=new x(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function h(){}function d(){}function p(){}var m={};c(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==e&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(r,o,a,s){var c=u(t[r],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==Ge(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,s)}))}s(c.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function E(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=u(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),R(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Je(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function Ke(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,_x,o,a=[],_n=!0,s=!1;try{if(_x=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;_n=!1}else for(;!(_n=(r=_x.call(n)).done)&&(a.push(r.value),a.length!==e);_n=!0);}catch(t){s=!0,i=t}finally{try{if(!_n&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Xe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xe(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=1?null:React.createElement("div",{className:"instant-images-no-results"},React.createElement("div",null,React.createElement("h3",null,instant_img_localize.no_results," "),React.createElement("p",null,instant_img_localize.no_results_desc," ")))}var sn=Qt.providers;function cn(e){var n=e.switchProvider,r=$t().provider;return React.createElement(t.Fragment,null,!(null==sn||!sn.length)&&React.createElement("nav",{className:"provider-nav"},sn.map((function(t,e){return React.createElement("div",{key:"provider-".concat(e)},React.createElement("button",{onClick:function(){return n(t.toLowerCase())},className:r===t.toLowerCase()?"provider-nav--btn active":"provider-nav--btn"},Zt(t),React.createElement("span",null,t),Qt[t.toLowerCase()].new&&React.createElement("span",{className:"provider-nav--new"},instant_img_localize.new)))}))))}function ln(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=200&&e.status<400&&JSON.parse(e.response).success||o(!1)},e.onerror=function(t){console.warn(t),o(!1)}}),[]),React.createElement(t.Fragment,null,i?null:React.createElement("div",{className:"error-messaging"},React.createElement("strong",null,instant_img_localize.error_restapi),instant_img_localize.error_restapi_desc))}const fn=window.wp.blocks,hn=window.wp.data;function dn(t,e){var n=t.id,r=void 0===n?null:n,i=t.url,o=void 0===i?null:i,a=t.caption,s=void 0===a?"":a,c=t.alt,l=void 0===c?"":c;if(o&&r){var u=(0,fn.createBlock)("core/image",{id:r,url:o,caption:s,alt:l});e?(0,hn.dispatch)("core/block-editor").replaceBlock(e,u):(0,hn.dispatch)("core/block-editor").insertBlocks(u)}}function pn(t){return pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pn(t)}function mn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function vn(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&React.createElement("img",{className:"user-wrap--photo",src:L,alt:""}),A)),React.createElement("div",{className:"photo-options"},f&&!$?React.createElement(t.Fragment,null,React.createElement("button",{type:"button",className:"set-featured fade","data-title":instant_img_localize.set_as_featured,onMouseEnter:function(t){return Te(t)},onMouseLeave:function(t){return Ie(t)},onClick:function(t){return function(t){Ie(t),tt.current&&(rt=!0,tt.current.click())}(t)}},React.createElement("i",{className:"fa fa-picture-o","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.set_as_featured)),React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(t){return Te(t)},onMouseLeave:function(t){return Ie(t)},onClick:function(t){return ot(t)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post))):null,!!s&&React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(t){return Te(t)},onMouseLeave:function(t){return Ie(t)},onClick:function(t){return ot(t)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post)),$?React.createElement("button",{onClick:function(){$&&(window.location=$)},className:"edit-photo-admin fade","data-title":instant_img_localize.edit_upload,onMouseEnter:function(t){return Te(t)},onMouseLeave:function(t){return Ie(t)}},React.createElement("i",{className:"fa fa-pencil","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_upload)):React.createElement("button",{onClick:function(t){return function(t){t.preventDefault(),Ie(t);var e=document.querySelectorAll(".edit-screen.editing");e&&e.forEach((function(t){t.classList.remove("editing")})),et.current.classList.add("editing"),setTimeout((function(){et.current.focus({preventScroll:!0})}),150)}(t)},className:"edit-photo fade","data-title":instant_img_localize.edit_details,onMouseEnter:function(t){return Te(t)},onMouseLeave:function(t){return Ie(t)}},React.createElement("i",{className:"fa fa-cog","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_details)))),React.createElement("div",{className:"photo-meta"},E?React.createElement("span",{className:"likes tooltip--above","data-title":E+" "+N,onMouseEnter:function(t){return Te(t)},onMouseLeave:function(t){return Ie(t)}},React.createElement("i",{className:"fa fa-heart heart-like","aria-hidden":"true"})," ",E):null,React.createElement("a",{className:"tooltip--above",href:m,"data-title":"".concat(instant_img_localize.open_external," ").concat(Pe(o)),onMouseEnter:function(t){return Te(t)},onMouseLeave:function(t){return Ie(t)},rel:"noopener noreferrer",target:"_blank"},React.createElement("i",{className:"fa fa-external-link","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},"".concat(instant_img_localize.open_external," ").concat(Pe(o)))))),React.createElement("div",{className:"edit-screen",tabIndex:"0",ref:et},React.createElement("div",{className:"edit-screen--title"},React.createElement("div",null,React.createElement("p",{className:"heading"},instant_img_localize.edit_details),S&&S.length>0&&React.createElement("p",{className:"dimensions"},S)),React.createElement("div",{className:"preview",style:{backgroundImage:"url(".concat(k,")")}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_filename,":"),React.createElement("input",{type:"text",name:"filename","data-original":p,placeholder:W.filename,value:W.filename,onChange:function(t){return ct(t)}}),React.createElement("em",null,".",w)),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_title,":"),React.createElement("input",{type:"text",name:"title","data-original":v,placeholder:v,value:W.title||"",onChange:function(t){return ct(t)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_alt,":"),React.createElement("input",{type:"text",name:"alt","data-original":g,value:W.alt||"",onChange:function(t){return ct(t)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_caption,":"),React.createElement("textarea",{rows:"4",name:"caption","data-original":F,onChange:function(t){return ct(t)},value:W.caption||"",ref:nt})),D?React.createElement("div",{className:"add-attribution-row"},React.createElement("button",{onClick:function(t){return function(t){t.preventDefault(),nt.current.value=D,U(vn(vn({},W),{},{caption:D}))}(t)},type:"button"},instant_img_localize.attribution)):null,React.createElement("div",{className:"edit-screen--controls"},React.createElement("button",{type:"button",className:"button button-secondary",onClick:function(t){return U({filename:p,title:v,alt:g,caption:F}),et.current.classList.remove("editing"),void tt.current.focus({preventScrol:!0})}},instant_img_localize.cancel)," "," ",React.createElement("button",{type:"button",className:"button button-primary",onClick:function(){return et.current.classList.remove("editing"),void tt.current.click()}},s?instant_img_localize.insert_into_post:instant_img_localize.upload_now))),React.createElement("div",{className:"photo-status"})))}function En(e){var n=e.result.data,r=void 0===n?null:n,i=(null==r?void 0:r.url)||"",o=(null==r?void 0:r.title)||"",a=(null==r?void 0:r.description)||"",s=(null==r?void 0:r.avatar)||"",c=r.image,l=void 0===c?null:c,u=l.src,f=void 0===u?null:u,h=l.alt,d=void 0===h?null:h,p=(0,t.useRef)(),m=(0,t.useRef)();return React.createElement(t.Fragment,null,l&&i?React.createElement("article",{className:"photo feature",title:a,ref:p,onClick:function(){return m.current.click()}},React.createElement("div",{className:"photo--wrap"},React.createElement("span",{className:"flag",title:instant_img_localize.advertisement},instant_img_localize.ad),React.createElement("div",{className:"img-wrap"},React.createElement("a",{className:"loaded",href:i,target:"_blank",ref:m,rel:"noreferrer"},React.createElement("img",{src:f,alt:d}))),React.createElement("div",{className:"feature-title"},s&&React.createElement("img",{src:s,alt:o}),React.createElement("span",null,o)))):null)}function Sn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1&&e.splice(n,1),e.length>=10&&(e.length=10),e.unshift(t),localStorage.setItem(jn,JSON.stringify(e))}else localStorage.setItem(jn,JSON.stringify([t]))}(r),g(Pn())))}(t)},autoComplete:"off"},React.createElement("label",{htmlFor:"search-input",className:"offscreen"},instant_img_localize.search_label),React.createElement("div",{ref:w},React.createElement("input",{ref:n,type:"text",id:"search-input",placeholder:instant_img_localize.search,disabled:h,onChange:function(t){return l&&p(t.target.value)},onFocus:function(){return b(!0)}}),l&&((null==v?void 0:v.length)||(null==d?void 0:d.length))?React.createElement(Hn,{show:_,history:v,setHistory:g,setSearchValue:function(t){var e=null==n?void 0:n.current;e.value=t,null==E||E.current.click(),e.focus()},container:w}):null,!s&&React.createElement(Fn,{show:_})),React.createElement("button",{type:"submit",disabled:h,ref:E},React.createElement("i",{className:"fa fa-search"}),React.createElement("span",{className:"offscreen"},instant_img_localize.search)),React.createElement(Wn,{show:_})))}));function Gn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),R(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Xn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function $n(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==h[0]&&h[0],!M){t.next=3;break}return t.abrupt("return",!1);case 3:if(n||""===(null==pt||null===(e=pt.current)||void 0===e?void 0:e.value)){t.next=7;break}if(!v||!y){t.next=7;break}return Ot(pt.current.value),t.abrupt("return");case 7:if(T(!0),d=void 0,(null==pt||null===(d=pt.current)||void 0===d?void 0:d.value)&&(pt.current.value=""),$(w),tt([]),Pt(),ar=1,r=Ee(k,ot),i=Ce("photos",r),!(o=Ue(i))){t.next=18;break}At(He(o),!1,null),t.next=37;break;case 18:return t.next=20,fetch(i);case 20:return a=t.sent,c=a.status,Ne(a.headers),t.prev=23,t.next=26,a.json();case 26:l=t.sent,u=l.error,f=void 0===u?null:u,At(He(l),!1,f),qe(i,l),t.next=37;break;case 32:t.prev=32,t.t0=t.catch(23),Fe(s,c),T(!1),Ve(i);case 37:setTimeout((function(){T(!1)}),_);case 38:case"end":return t.stop()}var d}),t,null,[[23,32]])}))),Rt.apply(this,arguments)}function xt(){return kt.apply(this,arguments)}function kt(){return(kt=er(Kn().mark((function t(){var e,n,r,i,o,a,c,l,u,f,h,d;return Kn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(j&&!z&&!M&&!H){t.next=2;break}return t.abrupt("return");case 2:if(D(!0),ar=parseInt(ar)+1,e=null!=X&&X.active&&null!=X&&X.term?{term:X.term}:{},n=null!=X&&X.active?"search":"photos",r=null!=X&&X.active?ct:ot,i=$n($n($n({},{page:ar}),e),r),o=Ee(k,i),a=Ce(n,o),!(c=Ue(a))){t.next=15;break}At(He(c),!0,null),t.next=34;break;case 15:return t.next=17,fetch(a);case 17:return l=t.sent,u=l.status,Ne(l.headers),t.prev=20,t.next=23,l.json();case 23:f=t.sent,h=f.error,d=void 0===h?null:h,At(He(f),!0,d),qe(a,f),t.next=34;break;case 29:t.prev=29,t.t0=t.catch(20),Fe(s,u),D(!1),Ve(a);case 34:case"end":return t.stop()}}),t,null,[[20,29]])})))).apply(this,arguments)}function Ot(t){return Ct.apply(this,arguments)}function Ct(){return(Ct=er(Kn().mark((function t(e){var n,r,i,o,a,c,l,u,f,h,d;return Kn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(T(!0),Pt(),ar=1,n="id:"===e.substring(0,3)?"id":"term",r="id"===n?{id:e.replace("id:","").replace(/\s+/,"")}:{term:e},i=$n($n($n({},{page:ar}),r),ct),o=Ee(k,i),a=Ce("search",o),!(c=Ue(a))){t.next=14;break}At(He(c),!1,null),$({active:!0,term:e,type:n,results:We(c)}),t.next=35;break;case 14:return t.next=16,fetch(a);case 16:return l=t.sent,u=l.status,Ne(l.headers),t.prev=19,t.next=22,l.json();case 22:f=t.sent,h=f.error,d=void 0===h?null:h,At(He(f),!1,d),$({active:!0,term:e,type:n,results:We(f)}),qe(a,f),t.next=35;break;case 29:t.prev=29,t.t0=t.catch(19),W(!0),T(!1),Fe(s,u),Ve(a);case 35:pt.current.classList.remove(b);case 36:case"end":return t.stop()}}),t,null,[[19,29]])})))).apply(this,arguments)}function At(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;t=null==e?void 0:e.length,W(0===parseInt(t)||void 0===t),R(n?function(t){return[].concat(Qn(t),Qn(e))}:e),V(r)}function Lt(t,e){var n=$n({},ot);n[t]&&"#"===e||""===e||"all"===e?delete n[t]:n[t]=e,at($n({},n))}function Bt(t){return jt.apply(this,arguments)}function jt(){return(jt=er(Kn().mark((function t(e){var n,r;return Kn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k!==e){t.next=2;break}return t.abrupt("return");case 2:if(T(!0),V(!1),J(!1),bt.classList.remove("overflow-hidden"),!Qt[e].requires_key||A.includes(e)){t.next=27;break}return t.prev=7,t.next=10,fetch(Ae(e));case 10:if(n=t.sent,r=n.status,Ne(n.headers),200===r){t.next=18;break}return J(e),V(!0),bt.classList.add("overflow-hidden"),t.abrupt("return");case 18:200===r&&L((function(t){return[].concat(Qn(t),[e])})),t.next=27;break;case 21:return t.prev=21,t.t0=t.catch(7),J(e),bt.classList.add("overflow-hidden"),V(!0),t.abrupt("return");case 27:setTimeout((function(){rt(pe[e].filters),O(e)}),_);case 28:case"end":return t.stop()}}),t,null,[[7,21]])})))).apply(this,arguments)}function Nt(){return(Nt=er(Kn().mark((function t(e){var n;return Kn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&!((null==e?void 0:e.length)<3)){t.next=2;break}return t.abrupt("return");case 2:return n=instant_img_localize.root+"instant-images-extended/suggestions/?term=".concat(e),t.next=5,It.get(n).then((function(t){tt(t.data)})).catch((function(t){console.warn(t)}));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Pt(){vt&&null!=dt&&dt.current&&(null==dt||dt.current.scroll({top:0,left:0,behavior:"smooth"}))}function zt(t){if("Escape"===t.key){var e=dt.current.querySelectorAll(".edit-screen.editing");e&&Qn(e).forEach((function(t){null==t||t.classList.remove("editing")}))}}return(0,t.useEffect)((function(){null!=X&&X.active||lt({})}),[X]),(0,t.useEffect)((function(){j&&null!=X&&X.active&&Ot(null==X?void 0:X.term)}),[ct]),(0,t.useEffect)((function(){j&&St()}),[ot]),(0,t.useEffect)((function(){rt(pe[k].filters),at({})}),[k]),(0,t.useEffect)((function(){xt()}),[ht]),(0,t.useEffect)((function(){or(dt.current,(function(){yt||(mt.current=new(Ht())(dt.current,{itemSelector:".photo"}),dt.current.querySelectorAll(".photo").forEach((function(t){t.classList.add("in-view")}))),setTimeout((function(){T(!1),D(!1),j||N(!0)}),_)}))}),[S]),(0,t.useEffect)((function(){return T(!1),Et.classList.add("loaded"),yt&&St(),document.addEventListener("keydown",zt,!1),function(){document.removeEventListener("keydown",zt,!1)}}),[]),React.createElement(t.Fragment,null,React.createElement(Xt,{value:{provider:k,wpBlock:vt,mediaModal:_t,blockSidebar:gt,clientId:d,search:X,apiError:q,getPhotos:St,searchHandler:function(t){t.preventDefault();var e=pt.current.value;e.length>2?(pt.current.classList.add(b),Ot(e)):pt.current.focus()},filterSearch:function(t,e){var n=$n({},ct);n[t]&&"#"===e||""===e||"all"===e?delete n[t]:n[t]=e,lt($n({},n))},suggestions:Q,getSuggestions:function(t){return Nt.apply(this,arguments)}}},vt?React.createElement(ge,{switchProvider:Bt}):React.createElement(React.Fragment,null,React.createElement(cn,{switchProvider:Bt}),React.createElement(Dn,null)),React.createElement(un,null),React.createElement("div",{className:"control-nav"},React.createElement("div",{className:Dt()("control-nav--filters-wrap",q||null!=X&&X.active?"inactive":null)},nt&&null!==(i=Object.entries(nt))&&void 0!==i&&i.length?React.createElement("div",{className:"control-nav--filters"},Object.entries(nt).map((function(t,e){var n=nr(t,2),r=n[0],i=n[1];return React.createElement(rn,{key:"".concat(k,"-").concat(e,"-").concat(r),data:i,filterKey:r,handler:Lt})}))):null),React.createElement(Vn,{ref:pt})),React.createElement("div",{id:"photo-listing",className:z?"loading":null},React.createElement(Yn,null),vt?React.createElement(An,{ref:dt,data:S,done:H,loadMorePhotos:xt}):React.createElement(Rn,{ref:dt,data:S}),React.createElement(an,{total:null==X?void 0:X.results,is_search:null==X?void 0:X.active}),React.createElement(on,{ref:ft,loadMorePhotos:xt,loading:M,done:H}),React.createElement($e,{provider:Y,callback:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t&&O(t),J(!1),T(!1),V(!1),bt.classList.remove("overflow-hidden")}}),React.createElement(Ze,null),React.createElement(Ln,null))))}function cr(t){return cr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cr(t)}function lr(){lr=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,i){var o=e&&e.prototype instanceof h?e:h,a=Object.create(o.prototype),s=new x(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function h(){}function d(){}function p(){}var m={};c(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==e&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(r,o,a,s){var c=u(t[r],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==cr(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,s)}))}s(c.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function E(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=u(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),R(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function ur(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}var fr="",hr="",dr=wp.media.view.MediaFrame.Post,pr=wp.media.view.MediaFrame.Select;wp.media.view.MediaFrame.Select=pr.extend({browseRouter:function(t){var e;pr.prototype.browseRouter.apply(this,arguments),t.set({instantimages:{text:null===(e=instant_img_localize)||void 0===e?void 0:e.instant_images,priority:120}})},bindHandlers:function(){pr.prototype.bindHandlers.apply(this,arguments),this.on("content:create:instantimages",this.frameContent,this)},frameContent:function(){var t=this.state();t&&(fr=t.id,hr=t.frame.el)},getFrame:function(t){return this.states.findWhere({id:t})}}),wp.media.view.MediaFrame.Post=dr.extend({browseRouter:function(t){var e;pr.prototype.browseRouter.apply(this,arguments),t.set({instantimages:{text:null===(e=instant_img_localize)||void 0===e?void 0:e.instant_images,priority:120}})},bindHandlers:function(){dr.prototype.bindHandlers.apply(this,arguments),this.on("content:create:instantimages",this.frameContent,this)},frameContent:function(){var t=this.state();t&&(fr=t.id,hr=t.frame.el)},getFrame:function(t){return this.states.findWhere({id:t})}});var mr=function(){if(!hr)return!1;var t=hr.querySelector(".media-frame-content");if(!t)return!1;t.innerHTML="";var e=yr();t.appendChild(e);var n=t.querySelector("#instant-images-media-router-"+fr);if(!n)return!1;vr(n)},vr=function(){var t,e=(t=lr().mark((function t(e){var n,r,i,o,a,s,c,l;return lr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=instant_img_localize&&instant_img_localize.default_provider?instant_img_localize.default_provider:Qt.defaults.provider,r=Ee(n),i=Ce("photos",r),!(o=Ue(i))){t.next=8;break}gr(e,n,o,null),t.next=26;break;case 8:return t.next=10,fetch(i);case 10:return a=t.sent,s=a.status,Ne(a.headers),t.prev=13,t.next=16,a.json();case 16:c=t.sent,l=c.error,gr(e,n,c,void 0===l?null:l),qe(i,c),t.next=26;break;case 22:t.prev=22,t.t0=t.catch(13),Fe(n,s),Ve(i);case 26:case"end":return t.stop()}}),t,null,[[13,22]])})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){ur(o,r,i,a,s,"next",t)}function s(t){ur(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(_x){return e.apply(this,arguments)}}(),gr=function(e,n,r,i){t.createRoot?(0,t.createRoot)(e).render(React.createElement(sr,{editor:"media-modal",data:r,container:e,api_error:i,provider:n})):(0,t.render)(React.createElement(sr,{editor:"media-modal",data:r,container:e,api_error:i,provider:n}),e)},yr=function(){var t=document.createElement("div");t.classList.add("instant-img-container");var e=document.createElement("div");e.classList.add("instant-images-wrapper");var n=document.createElement("div");return n.setAttribute("id","instant-images-media-router-"+fr),e.appendChild(n),t.appendChild(e),t};jQuery(document).ready((function(t){wp.media&&(wp.media.view.Modal.prototype.on("open",(function(){if(!hr)return!1;var t=hr.querySelector(".media-router button.media-menu-item.active");t&&"menu-item-instantimages"===t.id&&mr()})),t(document).on("click",".media-router button.media-menu-item",(function(){var t=hr.querySelector(".media-router button.media-menu-item.active");t&&"menu-item-instantimages"===t.id&&mr()})))}))})()})(); \ No newline at end of file diff --git a/build/plugin-sidebar/index.asset.php b/build/plugin-sidebar/index.asset.php index 9b681d3..466f7ae 100644 --- a/build/plugin-sidebar/index.asset.php +++ b/build/plugin-sidebar/index.asset.php @@ -1 +1 @@ - array('react', 'wp-blocks', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => '42313150bd42af3a10df'); + array('react', 'wp-blocks', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => '2db5e9acc0b29166e542'); diff --git a/build/plugin-sidebar/index.js b/build/plugin-sidebar/index.js deleted file mode 100644 index 8f4877e..0000000 --- a/build/plugin-sidebar/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{var e={4184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t>>8^255&p^99,i[n]=p,o[p]=n;var m=e[n],v=e[m],g=e[v],y=257*e[p]^16843008*p;a[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,l[n]=y<<8|y>>>24,c[n]=y,y=16843009*g^65537*v^257*m^16843008*n,u[p]=y<<24|y>>>8,f[p]=y<<16|y>>>16,h[p]=y<<8|y>>>24,d[p]=y,n?(n=m^e[e[e[g^m]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a6&&a%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[a/n|0]<<24),o[a]=o[a-n]^c);for(var s=this._invKeySchedule=[],l=0;l>>24]]^f[i[c>>>16&255]]^h[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,l,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,f,h,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,a,s){for(var l=this._nRounds,c=e[t]^n[0],u=e[t+1]^n[1],f=e[t+2]^n[2],h=e[t+3]^n[3],d=4,p=1;p>>24]^i[u>>>16&255]^o[f>>>8&255]^a[255&h]^n[d++],v=r[u>>>24]^i[f>>>16&255]^o[h>>>8&255]^a[255&c]^n[d++],g=r[f>>>24]^i[h>>>16&255]^o[c>>>8&255]^a[255&u]^n[d++],y=r[h>>>24]^i[c>>>16&255]^o[u>>>8&255]^a[255&f]^n[d++];c=m,u=v,f=g,h=y}m=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^n[d++],v=(s[u>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^n[d++],g=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^n[d++],y=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&f])^n[d++],e[t]=m,e[t+1]=v,e[t+2]=g,e[t+3]=y},keySize:8});e.AES=t._createHelper(m)}(),r.AES)},5109:function(e,t,n){var r,i,o,a,s,l,c,u,f,h,d,p,m,v,g,y,_,b,w;e.exports=(r=n(8249),n(888),void(r.lib.Cipher||(i=r,o=i.lib,a=o.Base,s=o.WordArray,l=o.BufferedBlockAlgorithm,c=i.enc,c.Utf8,u=c.Base64,f=i.algo.EvpKDF,h=o.Cipher=l.extend({cfg:a.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){l.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?w:_}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),o.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),d=i.mode={},p=o.BlockCipherMode=a.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),m=d.CBC=function(){var e=p.extend();function t(e,t,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},o.BlockCipher=h.extend({cfg:h.cfg.extend({mode:m,padding:v}),reset:function(){var e;h.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),g=o.CipherParams=a.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),y=(i.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?s.create([1398893684,1701076831]).concat(n).concat(t):t).toString(u)},parse:function(e){var t,n=u.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=s.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:t})}},_=o.SerializableCipher=a.extend({cfg:a.extend({format:y}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),a=i.cfg;return g.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),b=(i.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=s.random(8));var i=f.create({keySize:t+n}).compute(e,r),o=s.create(i.words.slice(t),4*n);return i.sigBytes=4*t,g.create({key:i,iv:o,salt:r})}},w=o.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:b}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var o=_.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=i.iv,_.decrypt.call(this,e,t,i.key,r)}}))))},8249:function(e,t,n){var r;e.exports=(r=r||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==n.g&&n.g.crypto&&(r=n.g.crypto),!r)try{r=n(2480)}catch(e){}var i=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),a={},s=a.lib={},l=s.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=s.WordArray=l.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new c.init(n,t/2)}},h=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new c.init(n,t)}},d=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return h.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),l=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,u=e.min(4*l,o);if(l){for(var f=0;f>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i>>6-a%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return o.create(r,i)}(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},r.enc.Base64)},3786:function(e,t,n){var r,i,o;e.exports=(r=n(8249),o=(i=r).lib.WordArray,i.enc.Base64url={stringify:function(e,t=!0){var n=e.words,r=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,l=0;l<4&&a+.75*l>>6*(3-l)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e,t=!0){var n=e.length,r=t?this._safe_map:this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var a=0;a>>6-a%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return o.create(r,i)}(e,n,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},r.enc.Base64url)},298:function(e,t,n){var r;e.exports=(r=n(8249),function(){var e=r,t=e.lib.WordArray,n=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var n=e.length,r=[],i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(r,2*n)}},n.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var n=e.length,r=[],o=0;o>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(r,2*n)}}}(),r.enc.Utf16)},888:function(e,t,n){var r,i,o,a,s,l,c,u;e.exports=(u=n(8249),n(2783),n(9824),o=(i=(r=u).lib).Base,a=i.WordArray,l=(s=r.algo).MD5,c=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:l,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,i=r.hasher.create(),o=a.create(),s=o.words,l=r.keySize,c=r.iterations;s.lengthr&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),s=i.words,l=a.words,c=0;c>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)};n.prototype=e}}(),r.lib.WordArray)},8214:function(e,t,n){var r;e.exports=(r=n(8249),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],l=e[t+1],d=e[t+2],p=e[t+3],m=e[t+4],v=e[t+5],g=e[t+6],y=e[t+7],_=e[t+8],b=e[t+9],w=e[t+10],E=e[t+11],S=e[t+12],R=e[t+13],x=e[t+14],k=e[t+15],O=o[0],C=o[1],A=o[2],B=o[3];O=c(O,C,A,B,a,7,s[0]),B=c(B,O,C,A,l,12,s[1]),A=c(A,B,O,C,d,17,s[2]),C=c(C,A,B,O,p,22,s[3]),O=c(O,C,A,B,m,7,s[4]),B=c(B,O,C,A,v,12,s[5]),A=c(A,B,O,C,g,17,s[6]),C=c(C,A,B,O,y,22,s[7]),O=c(O,C,A,B,_,7,s[8]),B=c(B,O,C,A,b,12,s[9]),A=c(A,B,O,C,w,17,s[10]),C=c(C,A,B,O,E,22,s[11]),O=c(O,C,A,B,S,7,s[12]),B=c(B,O,C,A,R,12,s[13]),A=c(A,B,O,C,x,17,s[14]),O=u(O,C=c(C,A,B,O,k,22,s[15]),A,B,l,5,s[16]),B=u(B,O,C,A,g,9,s[17]),A=u(A,B,O,C,E,14,s[18]),C=u(C,A,B,O,a,20,s[19]),O=u(O,C,A,B,v,5,s[20]),B=u(B,O,C,A,w,9,s[21]),A=u(A,B,O,C,k,14,s[22]),C=u(C,A,B,O,m,20,s[23]),O=u(O,C,A,B,b,5,s[24]),B=u(B,O,C,A,x,9,s[25]),A=u(A,B,O,C,p,14,s[26]),C=u(C,A,B,O,_,20,s[27]),O=u(O,C,A,B,R,5,s[28]),B=u(B,O,C,A,d,9,s[29]),A=u(A,B,O,C,y,14,s[30]),O=f(O,C=u(C,A,B,O,S,20,s[31]),A,B,v,4,s[32]),B=f(B,O,C,A,_,11,s[33]),A=f(A,B,O,C,E,16,s[34]),C=f(C,A,B,O,x,23,s[35]),O=f(O,C,A,B,l,4,s[36]),B=f(B,O,C,A,m,11,s[37]),A=f(A,B,O,C,y,16,s[38]),C=f(C,A,B,O,w,23,s[39]),O=f(O,C,A,B,R,4,s[40]),B=f(B,O,C,A,a,11,s[41]),A=f(A,B,O,C,p,16,s[42]),C=f(C,A,B,O,g,23,s[43]),O=f(O,C,A,B,b,4,s[44]),B=f(B,O,C,A,S,11,s[45]),A=f(A,B,O,C,k,16,s[46]),O=h(O,C=f(C,A,B,O,d,23,s[47]),A,B,a,6,s[48]),B=h(B,O,C,A,y,10,s[49]),A=h(A,B,O,C,x,15,s[50]),C=h(C,A,B,O,v,21,s[51]),O=h(O,C,A,B,S,6,s[52]),B=h(B,O,C,A,p,10,s[53]),A=h(A,B,O,C,w,15,s[54]),C=h(C,A,B,O,l,21,s[55]),O=h(O,C,A,B,_,6,s[56]),B=h(B,O,C,A,k,10,s[57]),A=h(A,B,O,C,g,15,s[58]),C=h(C,A,B,O,R,21,s[59]),O=h(O,C,A,B,m,6,s[60]),B=h(B,O,C,A,E,10,s[61]),A=h(A,B,O,C,d,15,s[62]),C=h(C,A,B,O,b,21,s[63]),o[0]=o[0]+O|0,o[1]=o[1]+C|0,o[2]=o[2]+A|0,o[3]=o[3]+B|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+i+a;return(s<>>32-o)+t}function u(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+i+a;return(s<>>32-o)+t}function f(e,t,n,r,i,o,a){var s=e+(t^n^r)+i+a;return(s<>>32-o)+t}function h(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+i+a;return(s<>>32-o)+t}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),r.MD5)},8568:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();function t(e,t,n,r){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var a=0;a>24&255)){var t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}var n=e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(a);var s=a.slice(0);r.encryptBlock(s,0);for(var l=0;l>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Ansix923)},2807:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)},1077:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)},6991:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},6475:function(e,t,n){var r;e.exports=(r=n(8249),n(5109),r.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},r.pad.ZeroPadding)},2112:function(e,t,n){var r,i,o,a,s,l,c,u,f;e.exports=(f=n(8249),n(2783),n(9824),o=(i=(r=f).lib).Base,a=i.WordArray,l=(s=r.algo).SHA1,c=s.HMAC,u=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:l,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=c.create(n.hasher,e),i=a.create(),o=a.create([1]),s=i.words,l=o.words,u=n.keySize,f=n.iterations;s.length>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&u,h=u<<16|65535&c;for(r[0]^=c,r[1]^=f,r[2]^=u,r[3]^=h,r[4]^=c,r[5]^=f,r[6]^=u,r[7]^=h,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)},4454:function(e,t,n){var r;e.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&u,h=u<<16|65535&c;for(i[0]^=c,i[1]^=f,i[2]^=u,i[3]^=h,i[4]^=c,i[5]^=f,i[6]^=u,i[7]^=h,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)},1857:function(e,t,n){var r;e.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var a=i%n,s=t[a>>>2]>>>24-a%4*8&255;o=(o+r[i]+s)%256;var l=r[i];r[i]=r[o],r[o]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}e.RC4=t._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),r.RC4)},706:function(e,t,n){var r;e.exports=(r=n(8249),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=i.create([0,1518500249,1859775393,2400959708,2840853838]),h=i.create([1352829926,1548603684,1836072691,2053994217,0]),d=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,d,b,w,E,S,R,x,k,O,C=this._hash.words,A=f.words,B=h.words,L=s.words,N=l.words,j=c.words,P=u.words;for(E=o=C[0],S=a=C[1],R=d=C[2],x=b=C[3],k=w=C[4],n=0;n<80;n+=1)O=o+e[t+L[n]]|0,O+=n<16?p(a,d,b)+A[0]:n<32?m(a,d,b)+A[1]:n<48?v(a,d,b)+A[2]:n<64?g(a,d,b)+A[3]:y(a,d,b)+A[4],O=(O=_(O|=0,j[n]))+w|0,o=w,w=b,b=_(d,10),d=a,a=O,O=E+e[t+N[n]]|0,O+=n<16?y(S,R,x)+B[0]:n<32?g(S,R,x)+B[1]:n<48?v(S,R,x)+B[2]:n<64?m(S,R,x)+B[3]:p(S,R,x)+B[4],O=(O=_(O|=0,P[n]))+k|0,E=k,k=x,x=_(R,10),R=S,S=O;O=C[1]+d+x|0,C[1]=C[2]+b+k|0,C[2]=C[3]+w+E|0,C[3]=C[4]+o+S|0,C[4]=C[0]+a+R|0,C[0]=O},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,n){return e^t^n}function m(e,t,n){return e&t|~e&n}function v(e,t,n){return(e|~t)^n}function g(e,t,n){return e&n|t&~n}function y(e,t,n){return e^(t|~n)}function _(e,t){return e<>>32-t}t.RIPEMD160=o._createHelper(d),t.HmacRIPEMD160=o._createHmacHelper(d)}(Math),r.RIPEMD160)},2783:function(e,t,n){var r,i,o,a,s,l,c,u;e.exports=(i=(r=u=n(8249)).lib,o=i.WordArray,a=i.Hasher,s=r.algo,l=[],c=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=0;c<80;c++){if(c<16)l[c]=0|e[t+c];else{var u=l[c-3]^l[c-8]^l[c-14]^l[c-16];l[c]=u<<1|u>>>31}var f=(r<<5|r>>>27)+s+l[c];f+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=a._createHelper(c),r.HmacSHA1=a._createHmacHelper(c),u.SHA1)},7792:function(e,t,n){var r,i,o,a,s,l;e.exports=(l=n(8249),n(2153),i=(r=l).lib.WordArray,o=r.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),r.SHA224=a._createHelper(s),r.HmacSHA224=a._createHmacHelper(s),l.SHA224)},2153:function(e,t,n){var r;e.exports=(r=n(8249),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[],l=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=n(e.pow(r,.5))),l[i]=n(e.pow(r,1/3)),i++),r++}();var c=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=0;d<64;d++){if(d<16)c[d]=0|e[t+d];else{var p=c[d-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=c[d-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;c[d]=m+c[d-7]+g+c[d-16]}var y=r&i^r&o^i&o,_=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),b=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&f)+l[d]+c[d];h=f,f=u,u=s,s=a+b|0,a=o,o=i,i=r,r=b+(_+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+f|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),r.SHA256)},3327:function(e,t,n){var r;e.exports=(r=n(8249),n(4938),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.x64.Word,s=t.algo,l=[],c=[],u=[];!function(){for(var e=1,t=0,n=0;n<24;n++){l[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,f=0,h=0;h<7;h++){if(1&i){var d=(1<>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(C=n[i]).high^=a,C.low^=o}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var d=0,p=0,m=0;m<5;m++)d^=(C=n[h+5*m]).high,p^=C.low;var v=f[h];v.high=d,v.low=p}for(h=0;h<5;h++){var g=f[(h+4)%5],y=f[(h+1)%5],_=y.high,b=y.low;for(d=g.high^(_<<1|b>>>31),p=g.low^(b<<1|_>>>31),m=0;m<5;m++)(C=n[h+5*m]).high^=d,C.low^=p}for(var w=1;w<25;w++){var E=(C=n[w]).high,S=C.low,R=l[w];R<32?(d=E<>>32-R,p=S<>>32-R):(d=S<>>64-R,p=E<>>64-R);var x=f[c[w]];x.high=d,x.low=p}var k=f[0],O=n[0];for(k.high=O.high,k.low=O.low,h=0;h<5;h++)for(m=0;m<5;m++){var C=n[w=h+5*m],A=f[w],B=f[(h+1)%5+5*m],L=f[(h+2)%5+5*m];C.high=A.high^~B.high&L.high,C.low=A.low^~B.low&L.low}C=n[0];var N=u[s];C.high^=N.high,C.low^=N.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u>>24)|4278255360&(h<<24|h>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),c.push(d),c.push(h)}return new i.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=o._createHelper(h),t.HmacSHA3=o._createHmacHelper(h)}(Math),r.SHA3)},7460:function(e,t,n){var r,i,o,a,s,l,c,u;e.exports=(u=n(8249),n(4938),n(34),i=(r=u).x64,o=i.Word,a=i.WordArray,s=r.algo,l=s.SHA512,c=s.SHA384=l.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var e=l._doFinalize.call(this);return e.sigBytes-=16,e}}),r.SHA384=l._createHelper(c),r.HmacSHA384=l._createHmacHelper(c),u.SHA384)},34:function(e,t,n){var r;e.exports=(r=n(8249),n(4938),function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var u=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=r.high,p=r.low,m=i.high,v=i.low,g=o.high,y=o.low,_=a.high,b=a.low,w=s.high,E=s.low,S=u.high,R=u.low,x=f.high,k=f.low,O=h.high,C=h.low,A=d,B=p,L=m,N=v,j=g,P=y,z=_,I=b,T=w,M=E,D=S,F=R,H=x,W=k,U=O,q=C,V=0;V<80;V++){var G,J,Y=c[V];if(V<16)J=Y.high=0|e[t+2*V],G=Y.low=0|e[t+2*V+1];else{var K=c[V-15],X=K.high,$=K.low,Z=(X>>>1|$<<31)^(X>>>8|$<<24)^X>>>7,Q=($>>>1|X<<31)^($>>>8|X<<24)^($>>>7|X<<25),ee=c[V-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=c[V-7],ae=oe.high,se=oe.low,le=c[V-16],ce=le.high,ue=le.low;J=(J=(J=Z+ae+((G=Q+se)>>>0>>0?1:0))+re+((G+=ie)>>>0>>0?1:0))+ce+((G+=ue)>>>0>>0?1:0),Y.high=J,Y.low=G}var fe,he=T&D^~T&H,de=M&F^~M&W,pe=A&L^A&j^L&j,me=B&N^B&P^N&P,ve=(A>>>28|B<<4)^(A<<30|B>>>2)^(A<<25|B>>>7),ge=(B>>>28|A<<4)^(B<<30|A>>>2)^(B<<25|A>>>7),ye=(T>>>14|M<<18)^(T>>>18|M<<14)^(T<<23|M>>>9),_e=(M>>>14|T<<18)^(M>>>18|T<<14)^(M<<23|T>>>9),be=l[V],we=be.high,Ee=be.low,Se=U+ye+((fe=q+_e)>>>0>>0?1:0),Re=ge+me;U=H,q=W,H=D,W=F,D=T,F=M,T=z+(Se=(Se=(Se=Se+he+((fe+=de)>>>0>>0?1:0))+we+((fe+=Ee)>>>0>>0?1:0))+J+((fe+=G)>>>0>>0?1:0))+((M=I+fe|0)>>>0>>0?1:0)|0,z=j,I=P,j=L,P=N,L=A,N=B,A=Se+(ve+pe+(Re>>>0>>0?1:0))+((B=fe+Re|0)>>>0>>0?1:0)|0}p=r.low=p+B,r.high=d+A+(p>>>0>>0?1:0),v=i.low=v+N,i.high=m+L+(v>>>0>>0?1:0),y=o.low=y+P,o.high=g+j+(y>>>0

>>0?1:0),b=a.low=b+I,a.high=_+z+(b>>>0>>0?1:0),E=s.low=E+M,s.high=w+T+(E>>>0>>0?1:0),R=u.low=R+F,u.high=S+D+(R>>>0>>0?1:0),k=f.low=k+W,f.high=x+H+(k>>>0>>0?1:0),C=h.low=C+q,h.high=O+U+(C>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(u),e.HmacSHA512=t._createHmacHelper(u)}(),r.SHA512)},4253:function(e,t,n){var r;e.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=a[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],u=l[o];for(n=0;n<24;n++)c[n/6|0]|=t[(s[n]-1+u)%28]<<31-n%6,c[4+(n/6|0)]|=t[28+(s[n+24]-1+u)%28]<<31-n%6;for(c[0]=c[0]<<1|c[0]>>>31,n=1;n<7;n++)c[n]=c[n]>>>4*(n-1)+3;c[7]=c[7]<<5|c[7]>>>27}var f=this._invSubKeys=[];for(n=0;n<16;n++)f[n]=i[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,a=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((a^i[l])&u[l])>>>0];this._lBlock=a,this._rBlock=o^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,h.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=f.createEncryptor(n.create(t)),this._des2=f.createEncryptor(n.create(r)),this._des3=f.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),r.TripleDES)},4938:function(e,t,n){var r,i,o,a,s,l;e.exports=(r=n(8249),o=(i=r).lib,a=o.Base,s=o.WordArray,(l=i.x64={}).Word=a.extend({init:function(e,t){this.high=e,this.low=t}}),l.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r{var r,i;!function(o,a){"use strict";void 0===(i="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=i)}(window,(function(){"use strict";var e=function(){var e=window.Element.prototype;if(e.matches)return"matches";if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],n=0;n{var r,i;!function(o,a){r=[n(9741)],i=function(e){return function(e,t){"use strict";var n={extend:function(e,t){for(var n in t)e[n]=t[n];return e},modulo:function(e,t){return(e%t+t)%t}},r=Array.prototype.slice;n.makeArray=function(e){return Array.isArray(e)?e:null==e?[]:"object"==typeof e&&"number"==typeof e.length?r.call(e):[e]},n.removeFrom=function(e,t){var n=e.indexOf(t);-1!=n&&e.splice(n,1)},n.getParent=function(e,n){for(;e.parentNode&&e!=document.body;)if(e=e.parentNode,t(e,n))return e},n.getQueryElement=function(e){return"string"==typeof e?document.querySelector(e):e},n.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},n.filterFindElements=function(e,r){e=n.makeArray(e);var i=[];return e.forEach((function(e){if(e instanceof HTMLElement)if(r){t(e,r)&&i.push(e);for(var n=e.querySelectorAll(r),o=0;o{var r,i;window,void 0===(i="function"==typeof(r=function(){"use strict";function e(e){var t=parseFloat(e);return-1==e.indexOf("%")&&!isNaN(t)&&t}var t="undefined"==typeof console?function(){}:function(e){console.error(e)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],r=n.length;function i(e){var n=getComputedStyle(e);return n||t("Style returned "+n+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),n}var o,a=!1;function s(t){if(function(){if(!a){a=!0;var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(t);var r=i(t);o=200==Math.round(e(r.width)),s.isBoxSizeOuter=o,n.removeChild(t)}}(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var l=i(t);if("none"==l.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t{setTimeout((()=>{this.progress(e,t,n)}))};this.images.forEach((function(t){t.once("progress",e),t.check()}))},i.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&r&&r.log(`progress: ${n}`,e,t)},i.prototype.complete=function(){let e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){let e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},s.prototype=Object.create(t.prototype),s.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},s.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},s.prototype.confirm=function(e,t){this.isLoaded=e;let{parentNode:n}=this.img,r="PICTURE"===n.nodeName?n:this.img;this.emitEvent("progress",[this,r,t])},s.prototype.handleEvent=function(e){let t="on"+e.type;this[t]&&this[t](e)},s.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},s.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},s.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},l.prototype=Object.create(s.prototype),l.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},l.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},l.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},i.makeJQueryPlugin=function(t){(t=t||e.jQuery)&&(n=t,n.fn.imagesLoaded=function(e,t){return new i(this,e,t).jqDeferred.promise(n(this))})},i.makeJQueryPlugin(),i}))},8751:(e,t,n)=>{var r,i,o;window,i=[n(1794),n(6131)],void 0===(o="function"==typeof(r=function(e,t){"use strict";var n=e.create("masonry");n.compatOptions.fitWidth="isFitWidth";var r=n.prototype;return r._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var e=0;e1&&n+e>this.cols?0:n;var r=t.size.outerWidth&&t.size.outerHeight;return this.horizontalColIndex=r?n+e:this.horizontalColIndex,{col:n,y:this._getColGroupY(n,e)}},r._manageStamp=function(e){var n=t(e),r=this._getElementOffset(e),i=this._getOption("originLeft")?r.left:r.right,o=i+n.outerWidth,a=Math.floor(i/this.columnWidth);a=Math.max(0,a);var s=Math.floor(o/this.columnWidth);s-=o%this.columnWidth?0:1,s=Math.min(this.cols-1,s);for(var l=(this._getOption("originTop")?r.top:r.bottom)+n.outerHeight,c=a;c<=s;c++)this.colYs[c]=Math.max(l,this.colYs[c])},r._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var e={height:this.maxY};return this._getOption("fitWidth")&&(e.width=this._getContainerFitWidth()),e},r._getContainerFitWidth=function(){for(var e=0,t=this.cols;--t&&0===this.colYs[t];)e++;return(this.cols-e)*this.columnWidth-this.gutter},r.needsResizeLayout=function(){var e=this.containerWidth;return this.getContainerWidth(),e!=this.containerWidth},n})?r.apply(t,i):r)||(e.exports=o)},652:(e,t,n)=>{var r,i,o;window,i=[n(1206),n(6131)],void 0===(o="function"==typeof(r=function(e,t){"use strict";var n=document.documentElement.style,r="string"==typeof n.transition?"transition":"WebkitTransition",i="string"==typeof n.transform?"transform":"WebkitTransform",o={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],a={transform:i,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"};function s(e,t){e&&(this.element=e,this.layout=t,this.position={x:0,y:0},this._create())}var l=s.prototype=Object.create(e.prototype);l.constructor=s,l._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},l.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},l.getSize=function(){this.size=t(this.element)},l.css=function(e){var t=this.element.style;for(var n in e)t[a[n]||n]=e[n]},l.getPosition=function(){var e=getComputedStyle(this.element),t=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),r=e[t?"left":"right"],i=e[n?"top":"bottom"],o=parseFloat(r),a=parseFloat(i),s=this.layout.size;-1!=r.indexOf("%")&&(o=o/100*s.width),-1!=i.indexOf("%")&&(a=a/100*s.height),o=isNaN(o)?0:o,a=isNaN(a)?0:a,o-=t?s.paddingLeft:s.paddingRight,a-=n?s.paddingTop:s.paddingBottom,this.position.x=o,this.position.y=a},l.layoutPosition=function(){var e=this.layout.size,t={},n=this.layout._getOption("originLeft"),r=this.layout._getOption("originTop"),i=n?"paddingLeft":"paddingRight",o=n?"left":"right",a=n?"right":"left",s=this.position.x+e[i];t[o]=this.getXValue(s),t[a]="";var l=r?"paddingTop":"paddingBottom",c=r?"top":"bottom",u=r?"bottom":"top",f=this.position.y+e[l];t[c]=this.getYValue(f),t[u]="",this.css(t),this.emitEvent("layout",[this])},l.getXValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!t?e/this.layout.size.width*100+"%":e+"px"},l.getYValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&t?e/this.layout.size.height*100+"%":e+"px"},l._transitionTo=function(e,t){this.getPosition();var n=this.position.x,r=this.position.y,i=e==this.position.x&&t==this.position.y;if(this.setPosition(e,t),!i||this.isTransitioning){var o=e-n,a=t-r,s={};s.transform=this.getTranslate(o,a),this.transition({to:s,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},l.getTranslate=function(e,t){return"translate3d("+(e=this.layout._getOption("originLeft")?e:-e)+"px, "+(t=this.layout._getOption("originTop")?t:-t)+"px, 0)"},l.goTo=function(e,t){this.setPosition(e,t),this.layoutPosition()},l.moveTo=l._transitionTo,l.setPosition=function(e,t){this.position.x=parseFloat(e),this.position.y=parseFloat(t)},l._nonTransition=function(e){for(var t in this.css(e.to),e.isCleaning&&this._removeStyles(e.to),e.onTransitionEnd)e.onTransitionEnd[t].call(this)},l.transition=function(e){if(parseFloat(this.layout.options.transitionDuration)){var t=this._transn;for(var n in e.onTransitionEnd)t.onEnd[n]=e.onTransitionEnd[n];for(n in e.to)t.ingProperties[n]=!0,e.isCleaning&&(t.clean[n]=!0);e.from&&(this.css(e.from),this.element.offsetHeight),this.enableTransition(e.to),this.css(e.to),this.isTransitioning=!0}else this._nonTransition(e)};var c="opacity,"+i.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}));l.enableTransition=function(){if(!this.isTransitioning){var e=this.layout.options.transitionDuration;e="number"==typeof e?e+"ms":e,this.css({transitionProperty:c,transitionDuration:e,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(o,this,!1)}},l.onwebkitTransitionEnd=function(e){this.ontransitionend(e)},l.onotransitionend=function(e){this.ontransitionend(e)};var u={"-webkit-transform":"transform"};l.ontransitionend=function(e){if(e.target===this.element){var t=this._transn,n=u[e.propertyName]||e.propertyName;delete t.ingProperties[n],function(e){for(var t in e)return!1;return!0}(t.ingProperties)&&this.disableTransition(),n in t.clean&&(this.element.style[e.propertyName]="",delete t.clean[n]),n in t.onEnd&&(t.onEnd[n].call(this),delete t.onEnd[n]),this.emitEvent("transitionEnd",[this])}},l.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},l._removeStyles=function(e){var t={};for(var n in e)t[n]="";this.css(t)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return l.removeTransitionStyles=function(){this.css(f)},l.stagger=function(e){e=isNaN(e)?0:e,this.staggerDelay=e+"ms"},l.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},l.remove=function(){r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",(function(){this.removeElem()})),this.hide()):this.removeElem()},l.reveal=function(){delete this.isHidden,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:e.hiddenStyle,to:e.visibleStyle,isCleaning:!0,onTransitionEnd:t})},l.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},l.getHideRevealTransitionEndProperty=function(e){var t=this.layout.options[e];if(t.opacity)return"opacity";for(var n in t)return n},l.hide=function(){this.isHidden=!0,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:e.visibleStyle,to:e.hiddenStyle,isCleaning:!0,onTransitionEnd:t})},l.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},l.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},s})?r.apply(t,i):r)||(e.exports=o)},1206:function(e,t,n){var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},r=n[e]=n[e]||[];return-1==r.indexOf(t)&&r.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var r=n.indexOf(t);return-1!=r&&n.splice(r,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var r=this._onceEvents&&this._onceEvents[e],i=0;i{var r,i;!function(o,a){"use strict";r=[n(1206),n(6131),n(9047),n(652)],i=function(e,t,n,r){return function(e,t,n,r,i){var o=e.console,a=e.jQuery,s=function(){},l=0,c={};function u(e,t){var n=r.getQueryElement(e);if(n){this.element=n,a&&(this.$element=a(this.element)),this.options=r.extend({},this.constructor.defaults),this.option(t);var i=++l;this.element.outlayerGUID=i,c[i]=this,this._create(),this._getOption("initLayout")&&this.layout()}else o&&o.error("Bad element for "+this.constructor.namespace+": "+(n||e))}u.namespace="outlayer",u.Item=i,u.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=u.prototype;function h(e){function t(){e.apply(this,arguments)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t}r.extend(f,t.prototype),f.option=function(e){r.extend(this.options,e)},f._getOption=function(e){var t=this.constructor.compatOptions[e];return t&&void 0!==this.options[t]?this.options[t]:this.options[e]},u.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),r.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(e){for(var t=this._filterFindItemElements(e),n=this.constructor.Item,r=[],i=0;i{}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.element,t=window.wp.plugins,r=window.wp.editPost;function i(){return React.createElement("span",{className:"instant-images-sidebar-icon"},React.createElement(o,null))}function o(){return React.createElement("svg",{viewBox:"0 0 31 58",width:"13px",height:"24px"},React.createElement("polygon",{points:"20 0 20 23 31 23 11 58 11 34 0 34 20 0",fill:"#4a7bc5"}))}function a(){return React.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("title",null,"Instant Images Icon"),React.createElement("path",{d:"M0 8C0 3.58172 3.58172 0 8 0H72C76.4183 0 80 3.58172 80 8V72C80 76.4183 76.4183 80 72 80H8C3.58172 80 0 76.4183 0 72V8Z",fill:"#647FE8"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z",fill:"white"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z",fill:"white"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z",fill:"#C7D2FF"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z",fill:"#C7D2FF"}))}function s(e,t){return function(){return e.apply(t,arguments)}}const{toString:l}=Object.prototype,{getPrototypeOf:c}=Object,u=(f=Object.create(null),e=>{const t=l.call(e);return f[t]||(f[t]=t.slice(8,-1).toLowerCase())});var f;const h=e=>(e=e.toLowerCase(),t=>u(t)===e),d=e=>t=>typeof t===e,{isArray:p}=Array,m=d("undefined"),v=h("ArrayBuffer"),g=d("string"),y=d("function"),_=d("number"),b=e=>null!==e&&"object"==typeof e,w=e=>{if("object"!==u(e))return!1;const t=c(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},E=h("Date"),S=h("File"),R=h("Blob"),x=h("FileList"),k=h("URLSearchParams");function O(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),p(e))for(r=0,i=e.length;r0;)if(r=n[i],t===r.toLowerCase())return r;return null}const A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,B=e=>!m(e)&&e!==A,L=(N="undefined"!=typeof Uint8Array&&c(Uint8Array),e=>N&&e instanceof N);var N;const j=h("HTMLFormElement"),P=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),z=h("RegExp"),I=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};O(n,((n,i)=>{!1!==t(n,i,e)&&(r[i]=n)})),Object.defineProperties(e,r)},T="abcdefghijklmnopqrstuvwxyz",M="0123456789",D={DIGIT:M,ALPHA:T,ALPHA_DIGIT:T+T.toUpperCase()+M},F={isArray:p,isArrayBuffer:v,isBuffer:function(e){return null!==e&&!m(e)&&null!==e.constructor&&!m(e.constructor)&&y(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{const t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||l.call(e)===t||y(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&v(e.buffer),t},isString:g,isNumber:_,isBoolean:e=>!0===e||!1===e,isObject:b,isPlainObject:w,isUndefined:m,isDate:E,isFile:S,isBlob:R,isRegExp:z,isFunction:y,isStream:e=>b(e)&&y(e.pipe),isURLSearchParams:k,isTypedArray:L,isFileList:x,forEach:O,merge:function e(){const{caseless:t}=B(this)&&this||{},n={},r=(r,i)=>{const o=t&&C(n,i)||i;w(n[o])&&w(r)?n[o]=e(n[o],r):w(r)?n[o]=e({},r):p(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e(O(t,((t,r)=>{n&&y(t)?e[r]=s(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&c(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:u,kindOfTest:h,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(p(e))return e;let t=e.length;if(!_(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:j,hasOwnProperty:P,hasOwnProp:P,reduceDescriptors:I,freezeMethods:e=>{I(e,((t,n)=>{if(y(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];y(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return p(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:C,global:A,isContextDefined:B,ALPHABET:D,generateString:(e=16,t=D.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&y(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(b(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=p(e)?[]:{};return O(e,((e,t)=>{const o=n(e,r+1);!m(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)}};function H(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}F.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const W=H.prototype,U={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{U[e]={value:e}})),Object.defineProperties(H,U),Object.defineProperty(W,"isAxiosError",{value:!0}),H.from=(e,t,n,r,i,o)=>{const a=Object.create(W);return F.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),H.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const q=H;function V(e){return F.isPlainObject(e)||F.isArray(e)}function G(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function J(e,t,n){return e?e.concat(t).map((function(e,t){return e=G(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Y=F.toFlatObject(F,{},null,(function(e){return/^is[A-Z]/.test(e)})),K=function(e,t,n){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=F.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!F.isUndefined(t[e])}))).metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(F.isDate(e))return e.toISOString();if(!s&&F.isBlob(e))throw new q("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(e)||F.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,i){let s=e;if(e&&!i&&"object"==typeof e)if(F.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(F.isArray(e)&&function(e){return F.isArray(e)&&!e.some(V)}(e)||(F.isFileList(e)||F.endsWith(n,"[]"))&&(s=F.toArray(e)))return n=G(n),s.forEach((function(e,r){!F.isUndefined(e)&&null!==e&&t.append(!0===a?J([n],r,o):null===a?n:n+"[]",l(e))})),!1;return!!V(e)||(t.append(J(i,n,o),l(e)),!1)}const u=[],f=Object.assign(Y,{defaultVisitor:c,convertValue:l,isVisitable:V});if(!F.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!F.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),F.forEach(n,(function(n,o){!0===(!(F.isUndefined(n)||null===n)&&i.call(t,n,F.isString(o)?o.trim():o,r,f))&&e(n,r?r.concat(o):[o])})),u.pop()}}(e),t};function X(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function $(e,t){this._pairs=[],e&&K(e,this,t)}const Z=$.prototype;Z.append=function(e,t){this._pairs.push([e,t])},Z.toString=function(e){const t=e?function(t){return e.call(this,t,X)}:X;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Q=$;function ee(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function te(e,t,n){if(!t)return e;const r=n&&n.encode||ee,i=n&&n.serialize;let o;if(o=i?i(t,n):F.isURLSearchParams(t)?t.toString():new Q(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const ne=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){F.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},re={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ie={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Q,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]},oe=function(e){function t(e,n,r,i){let o=e[i++];const a=Number.isFinite(+o),s=i>=e.length;return o=!o&&F.isArray(r)?r.length:o,s?(F.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):(r[o]&&F.isObject(r[o])||(r[o]=[]),t(e,n,r[o],i)&&F.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r{t(function(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},ae={"Content-Type":void 0},se={transitional:re,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=F.isObject(e);if(i&&F.isHTMLForm(e)&&(e=new FormData(e)),F.isFormData(e))return r&&r?JSON.stringify(oe(e)):e;if(F.isArrayBuffer(e)||F.isBuffer(e)||F.isStream(e)||F.isFile(e)||F.isBlob(e))return e;if(F.isArrayBufferView(e))return e.buffer;if(F.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return K(e,new ie.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ie.isNode&&F.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=F.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return K(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(F.isString(e))try{return(0,JSON.parse)(e),F.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||se.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&F.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw q.from(e,q.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ie.classes.FormData,Blob:ie.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};F.forEach(["delete","get","head"],(function(e){se.headers[e]={}})),F.forEach(["post","put","patch"],(function(e){se.headers[e]=F.merge(ae)}));const le=se,ce=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ue=Symbol("internals");function fe(e){return e&&String(e).trim().toLowerCase()}function he(e){return!1===e||null==e?e:F.isArray(e)?e.map(he):String(e)}function de(e,t,n,r,i){return F.isFunction(r)?r.call(this,t,n):(i&&(t=n),F.isString(t)?F.isString(r)?-1!==t.indexOf(r):F.isRegExp(r)?r.test(t):void 0:void 0)}class pe{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=fe(t);if(!i)throw new Error("header name must be a non-empty string");const o=F.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=he(e))}const o=(e,t)=>F.forEach(e,((e,n)=>i(e,n,t)));return F.isPlainObject(e)||e instanceof this.constructor?o(e,t):F.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z]+$/.test(e.trim())?o((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&ce[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&i(t,e,n),this}get(e,t){if(e=fe(e)){const n=F.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(F.isFunction(t))return t.call(this,e,n);if(F.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=fe(e)){const n=F.findKey(this,e);return!(!n||void 0===this[n]||t&&!de(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=fe(e)){const i=F.findKey(n,e);!i||t&&!de(0,n[i],i,t)||(delete n[i],r=!0)}}return F.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!de(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return F.forEach(this,((r,i)=>{const o=F.findKey(n,i);if(o)return t[o]=he(r),void delete t[i];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();a!==i&&delete t[i],t[a]=he(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return F.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&F.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ue]=this[ue]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=fe(e);t[r]||(function(e,t){const n=F.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return F.isArray(e)?e.forEach(r):r(e),this}}pe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.freezeMethods(pe.prototype),F.freezeMethods(pe);const me=pe;function ve(e,t){const n=this||le,r=t||n,i=me.from(r.headers);let o=r.data;return F.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function ge(e){return!(!e||!e.__CANCEL__)}function ye(e,t,n){q.call(this,null==e?"canceled":e,q.ERR_CANCELED,t,n),this.name="CanceledError"}F.inherits(ye,q,{__CANCEL__:!0});const _e=ye,be=ie.isStandardBrowserEnv?{write:function(e,t,n,r,i,o){const a=[];a.push(e+"="+encodeURIComponent(t)),F.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),F.isString(r)&&a.push("path="+r),F.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function we(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ee=ie.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=F.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},Se=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];i||(i=l),n[o]=s,r[o]=l;let u=a,f=0;for(;u!==o;)f+=n[u++],u%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),l-i{const o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-n,l=r(s);n=o;const c={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&o<=a?(a-o)/l:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const xe={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const i=me.from(e.headers).normalize(),o=e.responseType;let a;function s(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}F.isFormData(r)&&(ie.isStandardBrowserEnv||ie.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+n))}const c=we(e.baseURL,e.url);function u(){if(!l)return;const r=me.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new q("Request failed with status code "+n.status,[q.ERR_BAD_REQUEST,q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),s()}),(function(e){n(e),s()}),{data:o&&"text"!==o&&"json"!==o?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),te(c,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=u:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(u)},l.onabort=function(){l&&(n(new q("Request aborted",q.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new q("Network Error",q.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||re;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new q(t,r.clarifyTimeoutError?q.ETIMEDOUT:q.ECONNABORTED,e,l)),l=null},ie.isStandardBrowserEnv){const t=(e.withCredentials||Ee(c))&&e.xsrfCookieName&&be.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===r&&i.setContentType(null),"setRequestHeader"in l&&F.forEach(i.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),F.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&"json"!==o&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",Re(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Re(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{l&&(n(!t||t.type?new _e(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const f=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(c);f&&-1===ie.protocols.indexOf(f)?n(new q("Unsupported protocol "+f+":",q.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};F.forEach(xe,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const ke={getAdapter:e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;ie instanceof me?e.toJSON():e;function Be(e,t){t=t||{};const n={};function r(e,t,n){return F.isPlainObject(e)&&F.isPlainObject(t)?F.merge.call({caseless:n},e,t):F.isPlainObject(t)?F.merge({},t):F.isArray(t)?t.slice():t}function i(e,t,n){return F.isUndefined(t)?F.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!F.isUndefined(t))return r(void 0,t)}function a(e,t){return F.isUndefined(t)?F.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>i(Ae(e),Ae(t),!0)};return F.forEach(Object.keys(e).concat(Object.keys(t)),(function(r){const o=l[r]||i,a=o(e[r],t[r],r);F.isUndefined(a)&&o!==s||(n[r]=a)})),n}const Le={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Le[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Ne={};Le.transitional=function(e,t,n){function r(e,t){return"[Axios v1.3.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new q(r(i," has been removed"+(t?" in "+t:"")),q.ERR_DEPRECATED);return t&&!Ne[i]&&(Ne[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};const je={assertOptions:function(e,t,n){if("object"!=typeof e)throw new q("options must be an object",q.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const t=e[o],n=void 0===t||a(t,o,e);if(!0!==n)throw new q("option "+o+" must be "+n,q.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new q("Unknown option "+o,q.ERR_BAD_OPTION)}},validators:Le},Pe=je.validators;class ze{constructor(e){this.defaults=e,this.interceptors={request:new ne,response:new ne}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Be(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;let o;void 0!==n&&je.assertOptions(n,{silentJSONParsing:Pe.transitional(Pe.boolean),forcedJSONParsing:Pe.transitional(Pe.boolean),clarifyTimeoutError:Pe.transitional(Pe.boolean)},!1),void 0!==r&&je.assertOptions(r,{encode:Pe.function,serialize:Pe.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase(),o=i&&F.merge(i.common,i[t.method]),o&&F.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=me.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,f=0;if(!s){const e=[Ce.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);f{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new _e(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Te((function(t){e=t})),cancel:e}}}const Me=Te,De={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(De).forEach((([e,t])=>{De[t]=e}));const Fe=De,He=function e(t){const n=new Ie(t),r=s(Ie.prototype.request,n);return F.extend(r,Ie.prototype,n,{allOwnKeys:!0}),F.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Be(t,n))},r}(le);He.Axios=Ie,He.CanceledError=_e,He.CancelToken=Me,He.isCancel=ge,He.VERSION="1.3.4",He.toFormData=K,He.AxiosError=q,He.Cancel=He.CanceledError,He.all=function(e){return Promise.all(e)},He.spread=function(e){return function(t){return e.apply(null,t)}},He.isAxiosError=function(e){return F.isObject(e)&&!0===e.isAxiosError},He.mergeConfig=Be,He.AxiosHeaders=me,He.formToJSON=e=>oe(F.isHTMLForm(e)?new FormData(e):e),He.HttpStatusCode=Fe,He.default=He;const We=He;var Ue=n(4184),qe=n.n(Ue),Ve=n(8751),Ge=n.n(Ve);const Je=window.React,Ye=new Map,Ke=new WeakMap;let Xe=0;function $e(e,t,n={},r=undefined){if(void 0===window.IntersectionObserver&&void 0!==r){const i=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}const{id:i,observer:o,elements:a}=function(e){let t=function(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(n=e.root,n?(Ke.has(n)||(Xe+=1,Ke.set(n,Xe.toString())),Ke.get(n)):"0"):e[t]}`;var n})).toString()}(e),n=Ye.get(t);if(!n){const r=new Map;let i;const o=new IntersectionObserver((t=>{t.forEach((t=>{var n;const o=t.isIntersecting&&i.some((e=>t.intersectionRatio>=e));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=r.get(t.target))||n.forEach((e=>{e(o,t)}))}))}),e);i=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},Ye.set(t,n)}return n}(n);let s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),o.observe(e),function(){s.splice(s.indexOf(t),1),0===s.length&&(a.delete(e),o.unobserve(e)),0===a.size&&(o.disconnect(),Ye.delete(i))}}class Ze extends Je.Component{constructor(e){super(e),this.node=null,this._unobserveCb=null,this.handleNode=e=>{this.node&&(this.unobserve(),e||this.props.triggerOnce||this.props.skip||this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=e||null,this.observeNode()},this.handleChange=(e,t)=>{e&&this.props.triggerOnce&&this.unobserve(),isPlainChildren(this.props)||this.setState({inView:e,entry:t}),this.props.onChange&&this.props.onChange(e,t)},this.state={inView:!!e.initialInView,entry:void 0}}componentDidUpdate(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve(),this.node=null}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:i,fallbackInView:o}=this.props;this._unobserveCb=$e(this.node,this.handleChange,{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:i},o)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){if(!isPlainChildren(this.props)){const{inView:e,entry:t}=this.state;return this.props.children({inView:e,entry:t,ref:this.handleNode})}const e=this.props,{children:t,as:n}=e,r=function(e,t){if(null==e)return{};for(var n,r,i={},o=Object.keys(e);r=0||(i[n]=e[n]);return i}(e);return React.createElement(n||"div",_extends({ref:this.handleNode},r),t)}}function Qe({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:i,triggerOnce:o,skip:a,initialInView:s,fallbackInView:l,onChange:c}={}){var u;const[f,h]=Je.useState(null),d=Je.useRef(),[p,m]=Je.useState({inView:!!s,entry:void 0});d.current=c,Je.useEffect((()=>{if(a||!f)return;let s;return s=$e(f,((e,t)=>{m({inView:e,entry:t}),d.current&&d.current(e,t),t.isIntersecting&&o&&s&&(s(),s=void 0)}),{root:i,rootMargin:r,threshold:e,trackVisibility:n,delay:t},l),()=>{s&&s()}}),[Array.isArray(e)?e.toString():e,f,i,r,o,a,n,l,t]);const v=null==(u=p.entry)?void 0:u.target,g=Je.useRef();f||!v||o||a||g.current===v||(g.current=v,m({inView:!!s,entry:void 0}));const y=[h,p.inView,p.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}var et=(0,e.createContext)();function tt(e){var t=e.value,n=e.children;return React.createElement(et.Provider,{value:t},n)}function nt(){return(0,e.useContext)(et)}function rt(e){return e&&it[e.toLowerCase()].icon?it[e.toLowerCase()].icon():null}var it={proxy:"https://proxy.getinstantimages.com/api/",testmode:!1,defaults:{provider:"unsplash",order:"latest",per_page:"20",arr_key:"results"},providers:["Unsplash","Openverse","Pixabay","Pexels"],unsplash:{name:"Unsplash",requires_key:!0,new:!1,api_var:"client_id",collections_api:"https://api.unsplash.com/collections/",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M10 9V0H22V9H10ZM22 14H32V32H0V14H10V23H22V14Z",fill:"black"}))}},pixabay:{name:"Pixabay",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("g",{clipPath:"url(#clip0_307_143)"},React.createElement("path",{d:"M0 0V32H32V0H0Z",fill:"#48A947"}),React.createElement("path",{d:"M6.83734 22.3147V28C5.93067 28.0427 5.02401 28.032 4.11734 27.9787C4.09601 27.7014 4.06401 27.4667 4.06401 27.2427C4.06401 23.2427 4.05334 19.2534 4.06401 15.2534C4.07467 12.032 5.97334 9.32269 8.85334 8.37335C13.1307 6.95469 17.4507 10.048 17.8453 14.3894C18.144 17.6534 16.4267 20.5547 13.568 21.7814C12.6507 22.176 11.6907 22.304 10.7093 22.304C9.45067 22.3147 8.21334 22.3147 6.83734 22.3147ZM6.84801 19.4454C8.24534 19.4454 9.54667 19.424 10.848 19.4454C13.1627 19.488 14.816 17.76 15.104 15.712C15.424 13.3654 13.7813 11.2107 11.4453 10.88H11.4347C9.25867 10.592 7.06134 12.2774 6.88001 14.528C6.74134 16.128 6.84801 17.728 6.84801 19.4454Z",fill:"#F9FBF9"}),React.createElement("path",{d:"M25.4827 14.9334L30.656 22.2081H27.3067L23.4667 16.9494C22.0694 18.6881 20.9067 20.4907 19.584 22.2081H16.2454L21.408 14.9334L16.8107 8.04272H20.16L23.4454 12.9494L26.7307 8.04272H30.0694L25.4827 14.9334Z",fill:"#FAFCFA"}),React.createElement("path",{d:"M6.848 19.4453C6.848 17.7279 6.74134 16.1173 6.86934 14.5386C7.05067 12.2879 9.248 10.6026 11.424 10.8906C13.7707 11.2106 15.4133 13.3653 15.0933 15.7119C14.816 17.7599 13.152 19.4879 10.8373 19.4453C9.54667 19.4239 8.24534 19.4453 6.848 19.4453Z",fill:"#4AA949"})),React.createElement("defs",null,React.createElement("clipPath",{id:"clip0_307_143"},React.createElement("rect",{width:"32",height:"32",fill:"white"}))))}},pexels:{name:"Pexels",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32px",height:"32px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M2 0h28a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2z",fill:"#05A081"}),React.createElement("path",{d:"M13 21h3.863v-3.752h1.167a3.124 3.124 0 1 0 0-6.248H13v10zm5.863 2H11V9h7.03a5.124 5.124 0 0 1 .833 10.18V23z",fill:"#fff"}))}},openverse:{name:"Openverse",requires_key:!1,new:!1,api_var:"key",key:"",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M25.8578 14.32C29.6708 14.32 32.7618 11.1144 32.7618 7.16C32.7618 3.20564 29.6708 0 25.8578 0C22.0448 0 18.9539 3.20564 18.9539 7.16C18.9539 11.1144 22.0448 14.32 25.8578 14.32Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 7.16C0.761841 11.1 3.84742 14.32 7.66584 14.32V0C3.84742 0 0.761841 3.2 0.761841 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 7.16C9.85791 11.1 12.9435 14.32 16.7619 14.32V0C12.9628 0 9.85791 3.2 9.85791 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M25.8578 31.9399C29.6708 31.9399 32.7618 28.7343 32.7618 24.78C32.7618 20.8256 29.6708 17.62 25.8578 17.62C22.0448 17.62 18.9539 20.8256 18.9539 24.78C18.9539 28.7343 22.0448 31.9399 25.8578 31.9399Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 24.7801C9.85791 28.72 12.9435 31.9401 16.7619 31.9401V17.64C12.9628 17.64 9.85791 20.84 9.85791 24.7801Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 24.84C0.761841 28.8 3.84742 32 7.66584 32V17.7C3.84742 17.7 0.761841 20.9 0.761841 24.84Z",fill:"#000000"}))}}};const ot=window.wp.i18n;var at=[{label:(0,ot.__)("WordPress","instant-images"),value:"wordpress"},{label:(0,ot.__)("Flickr","instant-images"),value:"flickr"},{label:(0,ot.__)("Nasa","instant-images"),value:"nasa"},{label:(0,ot.__)("SpaceX","instant-images"),value:"spacex"},{label:(0,ot.__)("Wikimedia","instant-images"),value:"wikimedia"}],st=[{label:(0,ot.__)("Square","instant-images"),value:"square"},{label:(0,ot.__)("Tall","instant-images"),value:"tall"},{label:(0,ot.__)("Wide","instant-images"),value:"wide"}],lt=[{label:(0,ot.__)("Red","instant-images"),value:"red"},{label:(0,ot.__)("Orange","instant-images"),value:"orange"},{label:(0,ot.__)("Yellow","instant-images"),value:"yellow"},{label:(0,ot.__)("Green","instant-images"),value:"green"},{label:(0,ot.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,ot.__)("Blue","instant-images"),value:"blue"},{label:(0,ot.__)("Violet","instant-images"),value:"violet"},{label:(0,ot.__)("Pink","instant-images"),value:"pink"},{label:(0,ot.__)("Brown","instant-images"),value:"brown"},{label:(0,ot.__)("Black","instant-images"),value:"black"},{label:(0,ot.__)("Gray","instant-images"),value:"gray"},{label:(0,ot.__)("White","instant-images"),value:"white"}],ct=[{label:(0,ot.__)("Landscape","instant-images"),value:"landscape"},{label:(0,ot.__)("Portrait","instant-images"),value:"portrait"},{label:(0,ot.__)("Square","instant-images"),value:"squarish"}],ut=[{label:(0,ot.__)("Grayscale","instant-images"),value:"grayscale"},{label:(0,ot.__)("Red","instant-images"),value:"red"},{label:(0,ot.__)("Orange","instant-images"),value:"orange"},{label:(0,ot.__)("Yellow","instant-images"),value:"yellow"},{label:(0,ot.__)("Green","instant-images"),value:"green"},{label:(0,ot.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,ot.__)("Blue","instant-images"),value:"blue"},{label:(0,ot.__)("Lilac","instant-images"),value:"lilac"},{label:(0,ot.__)("Pink","instant-images"),value:"pink"},{label:(0,ot.__)("White","instant-images"),value:"white"},{label:(0,ot.__)("Gray","instant-images"),value:"gray"},{label:(0,ot.__)("Black","instant-images"),value:"black"},{label:(0,ot.__)("Brown","instant-images"),value:"brown"},{label:(0,ot.__)("Transparent","instant-images"),value:"transparent"}],ft=[{label:(0,ot.__)("Backgrounds","instant-images"),value:"backgrounds"},{label:(0,ot.__)("Fashion","instant-images"),value:"fashion"},{label:(0,ot.__)("Nature","instant-images"),value:"nature"},{label:(0,ot.__)("Science","instant-images"),value:"science"},{label:(0,ot.__)("Education","instant-images"),value:"education"},{label:(0,ot.__)("Feelings","instant-images"),value:"feelings"},{label:(0,ot.__)("Health","instant-images"),value:"health"},{label:(0,ot.__)("People","instant-images"),value:"people"},{label:(0,ot.__)("Religion","instant-images"),value:"religion"},{label:(0,ot.__)("Places","instant-images"),value:"places"},{label:(0,ot.__)("Animals","instant-images"),value:"animals"},{label:(0,ot.__)("Industry","instant-images"),value:"industry"},{label:(0,ot.__)("Computer","instant-images"),value:"computer"},{label:(0,ot.__)("Food","instant-images"),value:"food"},{label:(0,ot.__)("Sports","instant-images"),value:"sports"},{label:(0,ot.__)("Food","instant-images"),value:"food"},{label:(0,ot.__)("Transportation","instant-images"),value:"transportation"},{label:(0,ot.__)("Travel","instant-images"),value:"travel"},{label:(0,ot.__)("Buildings","instant-images"),value:"buildings"},{label:(0,ot.__)("Business","instant-images"),value:"business"},{label:(0,ot.__)("Music","instant-images"),value:"music"}],ht=[{label:(0,ot.__)("Horizontal","instant-images"),value:"horizontal"},{label:(0,ot.__)("Vertical","instant-images"),value:"vertical"}],dt=[{label:(0,ot.__)("Photo","instant-images"),value:"photo"},{label:(0,ot.__)("Illustration","instant-images"),value:"illustration"},{label:(0,ot.__)("Vector","instant-images"),value:"vector"}],pt=[{label:(0,ot.__)("Black & White","instant-images"),value:"black_and_white"},{label:(0,ot.__)("Black","instant-images"),value:"black"},{label:(0,ot.__)("White","instant-images"),value:"white"},{label:(0,ot.__)("Yellow","instant-images"),value:"yellow"},{label:(0,ot.__)("Green","instant-images"),value:"green"},{label:(0,ot.__)("Orange","instant-images"),value:"orange"},{label:(0,ot.__)("Red","instant-images"),value:"red"},{label:(0,ot.__)("Purple","instant-images"),value:"purple"},{label:(0,ot.__)("Magenta","instant-images"),value:"magenta"},{label:(0,ot.__)("Teal","instant-images"),value:"teal"},{label:(0,ot.__)("Blue","instant-images"),value:"blue"}],mt=[{label:(0,ot.__)("Landscape","instant-images"),value:"landscape"},{label:(0,ot.__)("Portrait","instant-images"),value:"portrait"},{label:(0,ot.__)("Square","instant-images"),value:"squarish"}];function vt(e){return function(e){if(Array.isArray(e))return gt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return gt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&parseInt(n)<2&&alert(instant_img_localize.api_ratelimit_msg)}}function Mt(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Dt="";function Ft(e){var t=e.currentTarget,n=t.getBoundingClientRect(),r=Math.round(n.left),i=Math.round(n.top),o=t.closest("#photo-listing").querySelector("#tooltip");o.classList.remove("over"),t.classList.contains("tooltip--above")?o.classList.add("above"):o.classList.remove("above"),Dt=setInterval((function(){clearInterval(Dt),o.innerHTML=t.dataset.title,r=r-o.offsetWidth+t.offsetWidth+5,o.style.left="".concat(r,"px"),o.style.top="".concat(i,"px"),setTimeout((function(){o.classList.add("over")}),25)}),750)}function Ht(e){clearInterval(Dt),e.currentTarget.closest("#photo-listing").querySelector("#tooltip").classList.remove("over")}function Wt(e){e&&window&&window.open(e,"_blank")}function Ut(){var e=instant_img_localize;switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:200){case 400:case 401:return e.api_invalid_msg;case 403:return e.api_invalid_403_msg;case 404:return e.api_invalid_404_msg;case 429:return e.api_ratelimit_msg;case 500:case 503:return e.api_invalid_500_msg;case 501:return e.api_invalid_501_msg}}function qt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=instant_img_localize,r=Ut(t);switch(t){case 400:case 401:case 500:case 429:console.warn("[".concat(n.instant_images," - ").concat(t," Error] ").concat(Mt(e),": ").concat(r))}}function Vt(e){return e&&e[it.defaults.arr_key]||[]}function Gt(e){return void 0===e.total||null===e.total?0:e.total}function Jt(e){if(!e||it.testmode)return!1;var t=sessionStorage.getItem(It(e));if(!t)return!1;var n=JSON.parse(t),r=n.expires,i=void 0===r?0:r,o=n.error;if(void 0!==o&&o)return!1;var a=Date.now()>i;return a&&Kt(e),!(!n||a)&&n}function Yt(e,t){if(!e||!t||null!=t&&t.error)return!1;t.expires=Date.now()+36e5,sessionStorage.setItem(It(e),JSON.stringify(t))}function Kt(e){if(!e)return!1;sessionStorage.removeItem(It(e))}function Xt(e){return Xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xt(e)}function $t(){$t=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new x(i||[]);return r(a,"_invoke",{value:w(e,n,s)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f={};function h(){}function d(){}function p(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&n.call(g,o)&&(m=g);var y=p.prototype=h.prototype=Object.create(m);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function i(r,o,a,s){var l=u(e[r],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==Xt(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,s)}))}s(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function w(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=u(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function Zt(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function Qt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,_x,o,a=[],_n=!0,s=!1;try{if(_x=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;_n=!1}else for(;!(_n=(r=_x.call(n)).done)&&(a.push(r.value),a.length!==t);_n=!0);}catch(e){s=!0,i=e}finally{try{if(!_n&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return en(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?en(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function en(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=1?null:React.createElement("div",{className:"instant-images-no-results"},React.createElement("div",null,React.createElement("h3",null,instant_img_localize.no_results," "),React.createElement("p",null,instant_img_localize.no_results_desc," ")))}var fn=it.providers;function hn(t){var n=t.switchProvider,r=nt().provider;return React.createElement(e.Fragment,null,!(null==fn||!fn.length)&&React.createElement("nav",{className:"provider-nav"},fn.map((function(e,t){return React.createElement("div",{key:"provider-".concat(t)},React.createElement("button",{onClick:function(){return n(e.toLowerCase())},className:r===e.toLowerCase()?"provider-nav--btn active":"provider-nav--btn"},rt(e),React.createElement("span",null,e),it[e.toLowerCase()].new&&React.createElement("span",{className:"provider-nav--new"},instant_img_localize.new)))}))))}function dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=200&&t.status<400&&JSON.parse(t.response).success||o(!1)},t.onerror=function(e){console.warn(e),o(!1)}}),[]),React.createElement(e.Fragment,null,i?null:React.createElement("div",{className:"error-messaging"},React.createElement("strong",null,instant_img_localize.error_restapi),instant_img_localize.error_restapi_desc))}const mn=window.wp.blocks,vn=window.wp.data;function gn(e,t){var n=e.id,r=void 0===n?null:n,i=e.url,o=void 0===i?null:i,a=e.caption,s=void 0===a?"":a,l=e.alt,c=void 0===l?"":l;if(o&&r){var u=(0,mn.createBlock)("core/image",{id:r,url:o,caption:s,alt:c});t?(0,vn.dispatch)("core/block-editor").replaceBlock(t,u):(0,vn.dispatch)("core/block-editor").insertBlocks(u)}}function yn(e){return yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yn(e)}function bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wn(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&React.createElement("img",{className:"user-wrap--photo",src:B,alt:""}),A)),React.createElement("div",{className:"photo-options"},f&&!$?React.createElement(e.Fragment,null,React.createElement("button",{type:"button",className:"set-featured fade","data-title":instant_img_localize.set_as_featured,onMouseEnter:function(e){return Ft(e)},onMouseLeave:function(e){return Ht(e)},onClick:function(e){return function(e){Ht(e),ee.current&&(re=!0,ee.current.click())}(e)}},React.createElement("i",{className:"fa fa-picture-o","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.set_as_featured)),React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(e){return Ft(e)},onMouseLeave:function(e){return Ht(e)},onClick:function(e){return oe(e)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post))):null,!!s&&React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(e){return Ft(e)},onMouseLeave:function(e){return Ht(e)},onClick:function(e){return oe(e)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post)),$?React.createElement("button",{onClick:function(){$&&(window.location=$)},className:"edit-photo-admin fade","data-title":instant_img_localize.edit_upload,onMouseEnter:function(e){return Ft(e)},onMouseLeave:function(e){return Ht(e)}},React.createElement("i",{className:"fa fa-pencil","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_upload)):React.createElement("button",{onClick:function(e){return function(e){e.preventDefault(),Ht(e);var t=document.querySelectorAll(".edit-screen.editing");t&&t.forEach((function(e){e.classList.remove("editing")})),te.current.classList.add("editing"),setTimeout((function(){te.current.focus({preventScroll:!0})}),150)}(e)},className:"edit-photo fade","data-title":instant_img_localize.edit_details,onMouseEnter:function(e){return Ft(e)},onMouseLeave:function(e){return Ht(e)}},React.createElement("i",{className:"fa fa-cog","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_details)))),React.createElement("div",{className:"photo-meta"},E?React.createElement("span",{className:"likes tooltip--above","data-title":E+" "+j,onMouseEnter:function(e){return Ft(e)},onMouseLeave:function(e){return Ht(e)}},React.createElement("i",{className:"fa fa-heart heart-like","aria-hidden":"true"})," ",E):null,React.createElement("a",{className:"tooltip--above",href:m,"data-title":"".concat(instant_img_localize.open_external," ").concat(Mt(o)),onMouseEnter:function(e){return Ft(e)},onMouseLeave:function(e){return Ht(e)},rel:"noopener noreferrer",target:"_blank"},React.createElement("i",{className:"fa fa-external-link","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},"".concat(instant_img_localize.open_external," ").concat(Mt(o)))))),React.createElement("div",{className:"edit-screen",tabIndex:"0",ref:te},React.createElement("div",{className:"edit-screen--title"},React.createElement("div",null,React.createElement("p",{className:"heading"},instant_img_localize.edit_details),S&&S.length>0&&React.createElement("p",{className:"dimensions"},S)),React.createElement("div",{className:"preview",style:{backgroundImage:"url(".concat(k,")")}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_filename,":"),React.createElement("input",{type:"text",name:"filename","data-original":p,placeholder:W.filename,value:W.filename,onChange:function(e){return le(e)}}),React.createElement("em",null,".",w)),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_title,":"),React.createElement("input",{type:"text",name:"title","data-original":v,placeholder:v,value:W.title||"",onChange:function(e){return le(e)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_alt,":"),React.createElement("input",{type:"text",name:"alt","data-original":g,value:W.alt||"",onChange:function(e){return le(e)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_caption,":"),React.createElement("textarea",{rows:"4",name:"caption","data-original":F,onChange:function(e){return le(e)},value:W.caption||"",ref:ne})),D?React.createElement("div",{className:"add-attribution-row"},React.createElement("button",{onClick:function(e){return function(e){e.preventDefault(),ne.current.value=D,U(wn(wn({},W),{},{caption:D}))}(e)},type:"button"},instant_img_localize.attribution)):null,React.createElement("div",{className:"edit-screen--controls"},React.createElement("button",{type:"button",className:"button button-secondary",onClick:function(e){return U({filename:p,title:v,alt:g,caption:F}),te.current.classList.remove("editing"),void ee.current.focus({preventScrol:!0})}},instant_img_localize.cancel)," "," ",React.createElement("button",{type:"button",className:"button button-primary",onClick:function(){return te.current.classList.remove("editing"),void ee.current.click()}},s?instant_img_localize.insert_into_post:instant_img_localize.upload_now))),React.createElement("div",{className:"photo-status"})))}function kn(t){var n=t.result.data,r=void 0===n?null:n,i=(null==r?void 0:r.url)||"",o=(null==r?void 0:r.title)||"",a=(null==r?void 0:r.description)||"",s=(null==r?void 0:r.avatar)||"",l=r.image,c=void 0===l?null:l,u=c.src,f=void 0===u?null:u,h=c.alt,d=void 0===h?null:h,p=(0,e.useRef)(),m=(0,e.useRef)();return React.createElement(e.Fragment,null,c&&i?React.createElement("article",{className:"photo feature",title:a,ref:p,onClick:function(){return m.current.click()}},React.createElement("div",{className:"photo--wrap"},React.createElement("span",{className:"flag",title:instant_img_localize.advertisement},instant_img_localize.ad),React.createElement("div",{className:"img-wrap"},React.createElement("a",{className:"loaded",href:i,target:"_blank",ref:m,rel:"noreferrer"},React.createElement("img",{src:f,alt:d}))),React.createElement("div",{className:"feature-title"},s&&React.createElement("img",{src:s,alt:o}),React.createElement("span",null,o)))):null)}function On(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&t.splice(n,1),t.length>=10&&(t.length=10),t.unshift(e),localStorage.setItem(In,JSON.stringify(t))}else localStorage.setItem(In,JSON.stringify([e]))}(r),g(Mn())))}(e)},autoComplete:"off"},React.createElement("label",{htmlFor:"search-input",className:"offscreen"},instant_img_localize.search_label),React.createElement("div",{ref:w},React.createElement("input",{ref:n,type:"text",id:"search-input",placeholder:instant_img_localize.search,disabled:h,onChange:function(e){return c&&p(e.target.value)},onFocus:function(){return b(!0)}}),c&&((null==v?void 0:v.length)||(null==d?void 0:d.length))?React.createElement(Vn,{show:_,history:v,setHistory:g,setSearchValue:function(e){var t=null==n?void 0:n.current;t.value=e,null==E||E.current.click(),t.focus()},container:w}):null,!s&&React.createElement(qn,{show:_})),React.createElement("button",{type:"submit",disabled:h,ref:E},React.createElement("i",{className:"fa fa-search"}),React.createElement("span",{className:"offscreen"},instant_img_localize.search)),React.createElement(Gn,{show:_})))}));function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tr(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==h[0]&&h[0],!M){e.next=3;break}return e.abrupt("return",!1);case 3:if(n||""===(null==pe||null===(t=pe.current)||void 0===t?void 0:t.value)){e.next=7;break}if(!v||!y){e.next=7;break}return Oe(pe.current.value),e.abrupt("return");case 7:if(I(!0),d=void 0,(null==pe||null===(d=pe.current)||void 0===d?void 0:d.value)&&(pe.current.value=""),$(w),ee([]),Pe(),ur=1,r=kt(k,oe),i=Nt("photos",r),!(o=Jt(i))){e.next=18;break}Ae(Vt(o),!1,null),e.next=37;break;case 18:return e.next=20,fetch(i);case 20:return a=e.sent,l=a.status,Tt(a.headers),e.prev=23,e.next=26,a.json();case 26:c=e.sent,u=c.error,f=void 0===u?null:u,Ae(Vt(c),!1,f),Yt(i,c),e.next=37;break;case 32:e.prev=32,e.t0=e.catch(23),qt(s,l),I(!1),Kt(i);case 37:setTimeout((function(){I(!1)}),_);case 38:case"end":return e.stop()}var d}),e,null,[[23,32]])}))),Re.apply(this,arguments)}function xe(){return ke.apply(this,arguments)}function ke(){return(ke=or(Qn().mark((function e(){var t,n,r,i,o,a,l,c,u,f,h,d;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N&&!z&&!M&&!H){e.next=2;break}return e.abrupt("return");case 2:if(D(!0),ur=parseInt(ur)+1,t=null!=X&&X.active&&null!=X&&X.term?{term:X.term}:{},n=null!=X&&X.active?"search":"photos",r=null!=X&&X.active?le:oe,i=tr(tr(tr({},{page:ur}),t),r),o=kt(k,i),a=Nt(n,o),!(l=Jt(a))){e.next=15;break}Ae(Vt(l),!0,null),e.next=34;break;case 15:return e.next=17,fetch(a);case 17:return c=e.sent,u=c.status,Tt(c.headers),e.prev=20,e.next=23,c.json();case 23:f=e.sent,h=f.error,d=void 0===h?null:h,Ae(Vt(f),!0,d),Yt(a,f),e.next=34;break;case 29:e.prev=29,e.t0=e.catch(20),qt(s,u),D(!1),Kt(a);case 34:case"end":return e.stop()}}),e,null,[[20,29]])})))).apply(this,arguments)}function Oe(e){return Ce.apply(this,arguments)}function Ce(){return(Ce=or(Qn().mark((function e(t){var n,r,i,o,a,l,c,u,f,h,d;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(I(!0),Pe(),ur=1,n="id:"===t.substring(0,3)?"id":"term",r="id"===n?{id:t.replace("id:","").replace(/\s+/,"")}:{term:t},i=tr(tr(tr({},{page:ur}),r),le),o=kt(k,i),a=Nt("search",o),!(l=Jt(a))){e.next=14;break}Ae(Vt(l),!1,null),$({active:!0,term:t,type:n,results:Gt(l)}),e.next=35;break;case 14:return e.next=16,fetch(a);case 16:return c=e.sent,u=c.status,Tt(c.headers),e.prev=19,e.next=22,c.json();case 22:f=e.sent,h=f.error,d=void 0===h?null:h,Ae(Vt(f),!1,d),$({active:!0,term:t,type:n,results:Gt(f)}),Yt(a,f),e.next=35;break;case 29:e.prev=29,e.t0=e.catch(19),W(!0),I(!1),qt(s,u),Kt(a);case 35:pe.current.classList.remove(b);case 36:case"end":return e.stop()}}),e,null,[[19,29]])})))).apply(this,arguments)}function Ae(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;e=null==t?void 0:t.length,W(0===parseInt(e)||void 0===e),R(n?function(e){return[].concat(rr(e),rr(t))}:t),V(r)}function Be(e,t){var n=tr({},oe);n[e]&&"#"===t||""===t||"all"===t?delete n[e]:n[e]=t,ae(tr({},n))}function Le(e){return Ne.apply(this,arguments)}function Ne(){return(Ne=or(Qn().mark((function e(t){var n,r;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(k!==t){e.next=2;break}return e.abrupt("return");case 2:if(I(!0),V(!1),Y(!1),be.classList.remove("overflow-hidden"),!it[t].requires_key||A.includes(t)){e.next=27;break}return e.prev=7,e.next=10,fetch(jt(t));case 10:if(n=e.sent,r=n.status,Tt(n.headers),200===r){e.next=18;break}return Y(t),V(!0),be.classList.add("overflow-hidden"),e.abrupt("return");case 18:200===r&&B((function(e){return[].concat(rr(e),[t])})),e.next=27;break;case 21:return e.prev=21,e.t0=e.catch(7),Y(t),be.classList.add("overflow-hidden"),V(!0),e.abrupt("return");case 27:setTimeout((function(){re(_t[t].filters),O(t)}),_);case 28:case"end":return e.stop()}}),e,null,[[7,21]])})))).apply(this,arguments)}function je(){return(je=or(Qn().mark((function e(t){var n;return Qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&!((null==t?void 0:t.length)<3)){e.next=2;break}return e.abrupt("return");case 2:return n=instant_img_localize.root+"instant-images-extended/suggestions/?term=".concat(t),e.next=5,We.get(n).then((function(e){ee(e.data)})).catch((function(e){console.warn(e)}));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Pe(){ve&&null!=de&&de.current&&(null==de||de.current.scroll({top:0,left:0,behavior:"smooth"}))}function ze(e){if("Escape"===e.key){var t=de.current.querySelectorAll(".edit-screen.editing");t&&rr(t).forEach((function(e){null==e||e.classList.remove("editing")}))}}return(0,e.useEffect)((function(){null!=X&&X.active||ce({})}),[X]),(0,e.useEffect)((function(){N&&null!=X&&X.active&&Oe(null==X?void 0:X.term)}),[le]),(0,e.useEffect)((function(){N&&Se()}),[oe]),(0,e.useEffect)((function(){re(_t[k].filters),ae({})}),[k]),(0,e.useEffect)((function(){xe()}),[he]),(0,e.useEffect)((function(){cr(de.current,(function(){ye||(me.current=new(Ge())(de.current,{itemSelector:".photo"}),de.current.querySelectorAll(".photo").forEach((function(e){e.classList.add("in-view")}))),setTimeout((function(){I(!1),D(!1),N||j(!0)}),_)}))}),[S]),(0,e.useEffect)((function(){return I(!1),Ee.classList.add("loaded"),ye&&Se(),document.addEventListener("keydown",ze,!1),function(){document.removeEventListener("keydown",ze,!1)}}),[]),React.createElement(e.Fragment,null,React.createElement(tt,{value:{provider:k,wpBlock:ve,mediaModal:_e,blockSidebar:ge,clientId:d,search:X,apiError:q,getPhotos:Se,searchHandler:function(e){e.preventDefault();var t=pe.current.value;t.length>2?(pe.current.classList.add(b),Oe(t)):pe.current.focus()},filterSearch:function(e,t){var n=tr({},le);n[e]&&"#"===t||""===t||"all"===t?delete n[e]:n[e]=t,ce(tr({},n))},suggestions:Q,getSuggestions:function(e){return je.apply(this,arguments)}}},ve?React.createElement(wt,{switchProvider:Le}):React.createElement(React.Fragment,null,React.createElement(hn,{switchProvider:Le}),React.createElement(Un,null)),React.createElement(pn,null),React.createElement("div",{className:"control-nav"},React.createElement("div",{className:qe()("control-nav--filters-wrap",q||null!=X&&X.active?"inactive":null)},ne&&null!==(i=Object.entries(ne))&&void 0!==i&&i.length?React.createElement("div",{className:"control-nav--filters"},Object.entries(ne).map((function(e,t){var n=ar(e,2),r=n[0],i=n[1];return React.createElement(ln,{key:"".concat(k,"-").concat(t,"-").concat(r),data:i,filterKey:r,handler:Be})}))):null),React.createElement(Kn,{ref:pe})),React.createElement("div",{id:"photo-listing",className:z?"loading":null},React.createElement($n,null),ve?React.createElement(jn,{ref:de,data:S,done:H,loadMorePhotos:xe}):React.createElement(Cn,{ref:de,data:S}),React.createElement(un,{total:null==X?void 0:X.results,is_search:null==X?void 0:X.active}),React.createElement(cn,{ref:fe,loadMorePhotos:xe,loading:M,done:H}),React.createElement(tn,{provider:J,callback:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&O(e),Y(!1),I(!1),V(!1),be.classList.remove("overflow-hidden")}}),React.createElement(nn,null),React.createElement(Pn,null))))}function hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n

bkgClick(e)} - tabIndex="-1" - > +
bkgClick(e)} tabIndex="-1">
-

@@ -163,17 +152,9 @@ export default function APILightbox(props) {

{instant_img_localize[`${provider}_api_desc`]}

- + | - +

handleSubmit(e)}> @@ -182,37 +163,13 @@ export default function APILightbox(props) {
- {apiStatus === "invalid" && ( - - )} - {apiStatus === "valid" && ( - - )} - {apiStatus === "loading" && ( - - )} + {apiStatus === 'invalid' && } + {apiStatus === 'valid' && } + {apiStatus === 'loading' && } - +
- {response && ( -

- {response} -

- )} + {response &&

{response}

} diff --git a/src/js/components/ErrorLightbox.js b/src/js/components/ErrorLightbox.js index 104e8bc..953353e 100644 --- a/src/js/components/ErrorLightbox.js +++ b/src/js/components/ErrorLightbox.js @@ -1,9 +1,9 @@ -import { Fragment, useRef } from "@wordpress/element"; -import classNames from "classnames"; -import { usePluginContext } from "../common/pluginProvider"; -import getErrorMessage from "../functions/getErrorMessage"; -import { gotoURL } from "../functions/helpers"; -import { getProviderIcon } from "./ProviderIcons"; +import { Fragment, useRef } from '@wordpress/element'; +import classNames from 'classnames'; +import { usePluginContext } from '../common/pluginProvider'; +import getErrorMessage from '../functions/getErrorMessage'; +import { gotoURL } from '../functions/helpers'; +import { getProviderIcon } from './ProviderIcons'; /** * Render the ErrorLightbox component. @@ -19,15 +19,9 @@ export default function ErrorLightbox() { return ( {apiError && status && ( -
+
-
+

{getProviderIcon(provider)} {provider} @@ -36,17 +30,9 @@ export default function ErrorLightbox() { {status} {instant_img_localize.error}

{getErrorMessage(status)}

-

- {instant_img_localize.api_default_provider} -

+

{instant_img_localize.api_default_provider}

- +

diff --git a/src/js/components/Filter.js b/src/js/components/Filter.js index 5e0521d..f3099f7 100644 --- a/src/js/components/Filter.js +++ b/src/js/components/Filter.js @@ -1,7 +1,7 @@ -import { useEffect, useRef, useState } from "@wordpress/element"; -import cn from "classnames"; -import { usePluginContext } from "../common/pluginProvider"; -import { useArrowControls } from "../hooks/useArrowControls"; +import { useEffect, useRef, useState } from '@wordpress/element'; +import cn from 'classnames'; +import { usePluginContext } from '../common/pluginProvider'; +import { useArrowControls } from '../hooks/useArrowControls'; /** * Render the Filter component. @@ -24,7 +24,7 @@ export default function Filter(props) { const button = useRef(); const menu = useRef(); const id = `${provider}-${filterKey}`; - const isColor = filterKey === "colors" || filterKey === "color"; + const isColor = filterKey === 'colors' || filterKey === 'color'; // Use up/down arrow keys to navigate dropdown. useArrowControls(expanded, dropdown); @@ -45,10 +45,10 @@ export default function Filter(props) { if (expanded) { setExpanded(false); - document.removeEventListener("click", closeMenuOutside); + document.removeEventListener('click', closeMenuOutside); } else { setExpanded(true); - document.addEventListener("click", closeMenuOutside); + document.addEventListener('click', closeMenuOutside); } } @@ -58,12 +58,9 @@ export default function Filter(props) { * @param {Event} event The click event. */ function closeMenuOutside(event) { - if ( - !menu?.current?.contains(event.target) && - !button?.current?.contains(event.target) - ) { + if (!menu?.current?.contains(event.target) && !button?.current?.contains(event.target)) { setExpanded(false); - document.removeEventListener("click", closeMenuOutside); + document.removeEventListener('click', closeMenuOutside); } } @@ -84,7 +81,7 @@ export default function Filter(props) { * @param {Event} event The click event. */ function escClick(event) { - if (event.key === "Escape") { + if (event.key === 'Escape') { setExpanded(false); } } @@ -114,11 +111,11 @@ export default function Filter(props) { * @return {string} The color. */ function convertColor(color) { - if (color === "lilac") { - color = "DarkViolet"; + if (color === 'lilac') { + color = 'DarkViolet'; } - if (color === "grayscale" || color === "black_and_white") { - color = "LightGray"; + if (color === 'grayscale' || color === 'black_and_white') { + color = 'LightGray'; } return color; } @@ -130,34 +127,24 @@ export default function Filter(props) { // }); // Check for focus outside. - document.addEventListener("keyup", focusOutside); - document.addEventListener("keydown", escClick); + document.addEventListener('keyup', focusOutside); + document.addEventListener('keydown', escClick); return () => { - document.removeEventListener("keyup", focusOutside); - document.removeEventListener("keydown", escClick); + document.removeEventListener('keyup', focusOutside); + document.removeEventListener('keydown', escClick); }; }, []); // eslint-disable-line react-hooks/exhaustive-deps return (
- -
+
{data?.filters?.length && data.filters.map((filter, key) => { const { label, value } = filter; @@ -165,19 +152,11 @@ export default function Filter(props) { ); })} diff --git a/src/js/components/Icon.js b/src/js/components/Icon.js index 2205d29..8eeef73 100644 --- a/src/js/components/Icon.js +++ b/src/js/components/Icon.js @@ -31,42 +31,13 @@ export function IconSVG() { */ export function IconLogo() { return ( - + Instant Images Icon - - - - - + + + + + ); } diff --git a/src/js/components/InstantImages.js b/src/js/components/InstantImages.js index 5a69661..0d0b4c4 100644 --- a/src/js/components/InstantImages.js +++ b/src/js/components/InstantImages.js @@ -1,32 +1,32 @@ -import { Fragment, useEffect, useRef, useState } from "@wordpress/element"; -import axios from "axios"; -import classNames from "classnames"; -import Masonry from "masonry-layout"; -import { useInView } from "react-intersection-observer"; -import { PluginProvider } from "../common/pluginProvider"; -import { API } from "../constants/API"; -import { FILTERS } from "../constants/filters"; -import WPBlockHeader from "../editor/block/components/Header"; -import buildURL, { buildTestURL } from "../functions/buildURL"; -import consoleStatus from "../functions/consoleStatus"; -import getQueryParams from "../functions/getQueryParams"; -import getResults, { getSearchTotal } from "../functions/getResults"; -import { checkRateLimit } from "../functions/helpers"; -import { deleteSession, getSession, saveSession } from "../functions/session"; -import APILightbox from "./APILightbox"; -import ErrorLightbox from "./ErrorLightbox"; -import Filter from "./Filter"; -import LoadMore from "./LoadMore"; -import NoResults from "./NoResults"; -import ProviderNav from "./ProviderNav"; -import RestAPIError from "./RestAPIError"; -import Results from "./Results"; -import ResultsWPBlock from "./ResultsWPBlock"; -import Tooltip from "./Tooltip"; -import { ExtendedCTA } from "./cta/Extended"; -import SearchForm from "./search/SearchForm"; -import SearchHeader from "./search/SearchHeader"; -const imagesLoaded = require("imagesloaded"); +import { Fragment, useEffect, useRef, useState } from '@wordpress/element'; +import axios from 'axios'; +import classNames from 'classnames'; +import Masonry from 'masonry-layout'; +import { useInView } from 'react-intersection-observer'; +import { PluginProvider } from '../common/pluginProvider'; +import { API } from '../constants/API'; +import { FILTERS } from '../constants/filters'; +import WPBlockHeader from '../editor/block/components/Header'; +import buildURL, { buildTestURL } from '../functions/buildURL'; +import consoleStatus from '../functions/consoleStatus'; +import getQueryParams from '../functions/getQueryParams'; +import getResults, { getSearchTotal } from '../functions/getResults'; +import { checkRateLimit } from '../functions/helpers'; +import { deleteSession, getSession, saveSession } from '../functions/session'; +import APILightbox from './APILightbox'; +import ErrorLightbox from './ErrorLightbox'; +import Filter from './Filter'; +import LoadMore from './LoadMore'; +import NoResults from './NoResults'; +import ProviderNav from './ProviderNav'; +import RestAPIError from './RestAPIError'; +import Results from './Results'; +import ResultsWPBlock from './ResultsWPBlock'; +import Tooltip from './Tooltip'; +import { ExtendedCTA } from './cta/Extended'; +import SearchForm from './search/SearchForm'; +import SearchHeader from './search/SearchHeader'; +const imagesLoaded = require('imagesloaded'); let page = 1; @@ -43,26 +43,16 @@ let page = 1; * @return {JSX.Element} InstantImages component. */ export default function InstantImages(props) { - const { - editor = "classic", - provider, - data, - container, - api_error = null, - clientId = null, - } = props; - - const { - activated: extended_activated = false, - license: extended_license = false, - } = instant_img_localize?.addons?.extended; + const { editor = 'classic', provider, data, container, api_error = null, clientId = null } = props; + + const { activated: extended_activated = false, license: extended_license = false } = instant_img_localize?.addons?.extended; const delay = 250; - const searchClass = "searching"; + const searchClass = 'searching'; const searchDefaults = { active: false, - term: "", - type: "", + term: '', + type: '', results: 0, }; @@ -78,31 +68,27 @@ export default function InstantImages(props) { const [showAPILightbox, setShowAPILightbox] = useState(false); // Render API key lightbox. const [search, setSearch] = useState(searchDefaults); const [suggestions, setSuggestions] = useState([]); - const [filterOptions, setFilterOptions] = useState( - FILTERS[activeProvider].filters - ); + const [filterOptions, setFilterOptions] = useState(FILTERS[activeProvider].filters); const [filters, setFilters] = useState({}); const [searchFilters, setSearchFilters] = useState({}); // Refs. const [loadMoreRef, inView] = useInView({ - rootMargin: "0px 0px", + rootMargin: '0px 0px', }); const photosRef = useRef(); const searchInputRef = useRef(); const msnryRef = useRef(); // WP Editor props. - const wpBlock = editor === "block" ? true : false; - const blockSidebar = editor === "sidebar" ? true : false; + const wpBlock = editor === 'block' ? true : false; + const blockSidebar = editor === 'sidebar' ? true : false; const isBlockEditor = wpBlock || blockSidebar ? true : false; - const mediaModal = editor === "media-modal" ? true : false; + const mediaModal = editor === 'media-modal' ? true : false; const body = document.body; const plugin = isBlockEditor ? container : container.parentNode.parentNode; - const wrapper = isBlockEditor - ? container - : plugin.querySelector(".instant-images-wrapper"); + const wrapper = isBlockEditor ? container : plugin.querySelector('.instant-images-wrapper'); /** * Get the initial set of photos for the current view (New/Popular/Filters/etc...). @@ -115,7 +101,7 @@ export default function InstantImages(props) { return false; } - if (!reset && searchInputRef?.current?.value !== "") { + if (!reset && searchInputRef?.current?.value !== '') { // Maintain search results for extended add-on users. if (extended_activated && extended_license) { doSearch(searchInputRef.current.value); @@ -131,7 +117,7 @@ export default function InstantImages(props) { // Build URL. const params = getQueryParams(activeProvider, filters); - const url = buildURL("photos", params); + const url = buildURL('photos', params); // Get session storage. const sessionData = getSession(url); @@ -176,11 +162,10 @@ export default function InstantImages(props) { page = parseInt(page) + 1; // Get search query. - const searchQuery = - search?.active && search?.term ? { term: search.term } : {}; + const searchQuery = search?.active && search?.term ? { term: search.term } : {}; // Build URL. - const type = search?.active ? "search" : "photos"; + const type = search?.active ? 'search' : 'photos'; const activeFilters = search?.active ? searchFilters : filters; const loadmoreParams = { ...{ page }, @@ -226,13 +211,10 @@ export default function InstantImages(props) { page = 1; // Reset current page num. - const searchType = term.substring(0, 3) === "id:" ? "id" : "term"; + const searchType = term.substring(0, 3) === 'id:' ? 'id' : 'term'; // Get search query. - const searchQuery = - searchType === "id" - ? { id: term.replace("id:", "").replace(/\s+/, "") } - : { term }; + const searchQuery = searchType === 'id' ? { id: term.replace('id:', '').replace(/\s+/, '') } : { term }; // Build URL. const searchParams = { @@ -241,7 +223,7 @@ export default function InstantImages(props) { ...searchFilters, }; const params = getQueryParams(activeProvider, searchParams); - const url = buildURL("search", params); + const url = buildURL('search', params); // Get session storage. const sessionData = getSession(url); @@ -324,9 +306,9 @@ export default function InstantImages(props) { * @since 3.0 */ function clearSearch() { - const term = searchInputRef?.current?.value || ""; + const term = searchInputRef?.current?.value || ''; if (term) { - searchInputRef.current.value = ""; + searchInputRef.current.value = ''; } setSearch(searchDefaults); setSuggestions([]); @@ -340,11 +322,7 @@ export default function InstantImages(props) { */ function filterPhotos(filter, value) { const newFilters = { ...filters }; - if ( - (newFilters[filter] && value === "#") || - value === "" || - value === "all" - ) { + if ((newFilters[filter] && value === '#') || value === '' || value === 'all') { delete newFilters[filter]; } else { newFilters[filter] = value; @@ -360,11 +338,7 @@ export default function InstantImages(props) { */ function filterSearch(filter, value) { const newSearchFilters = { ...searchFilters }; - if ( - (newSearchFilters[filter] && value === "#") || - value === "" || - value === "all" - ) { + if ((newSearchFilters[filter] && value === '#') || value === '' || value === 'all') { delete newSearchFilters[filter]; } else { newSearchFilters[filter] = value; @@ -385,7 +359,7 @@ export default function InstantImages(props) { setShowAPILightbox(false); setLoading(false); setAPIError(false); - body.classList.remove("overflow-hidden"); + body.classList.remove('overflow-hidden'); } /** @@ -402,7 +376,7 @@ export default function InstantImages(props) { setLoading(true); setAPIError(false); setShowAPILightbox(false); - body.classList.remove("overflow-hidden"); + body.classList.remove('overflow-hidden'); // API verification - check API key for provider. if (API[newProvider].requires_key && !apiTested.includes(newProvider)) { @@ -415,7 +389,7 @@ export default function InstantImages(props) { // Catch API errors and 401s. setShowAPILightbox(newProvider); // Show API Lightbox. setAPIError(true); - body.classList.add("overflow-hidden"); + body.classList.add('overflow-hidden'); return; } if (status === 200) { @@ -425,7 +399,7 @@ export default function InstantImages(props) { } catch (error) { // Catch all other errors. setShowAPILightbox(newProvider); // Show API Lightbox. - body.classList.add("overflow-hidden"); + body.classList.add('overflow-hidden'); setAPIError(true); return; } @@ -450,9 +424,7 @@ export default function InstantImages(props) { } // API endpoint URL. - const api_url = - instant_img_localize.root + - `instant-images-extended/suggestions/?term=${term}`; + const api_url = instant_img_localize.root + `instant-images-extended/suggestions/?term=${term}`; // Get suggestions. await axios @@ -474,10 +446,10 @@ export default function InstantImages(props) { imagesLoaded(photosRef.current, function () { if (!isBlockEditor) { msnryRef.current = new Masonry(photosRef.current, { - itemSelector: ".photo", + itemSelector: '.photo', }); - photosRef.current.querySelectorAll(".photo").forEach((el) => { - el.classList.add("in-view"); + photosRef.current.querySelectorAll('.photo').forEach((el) => { + el.classList.add('in-view'); }); } setTimeout(() => { @@ -499,7 +471,7 @@ export default function InstantImages(props) { photosRef?.current.scroll({ top: 0, left: 0, - behavior: "smooth", + behavior: 'smooth', }); } } @@ -521,13 +493,11 @@ export default function InstantImages(props) { */ function escFunction(e) { const { key } = e; - if (key === "Escape") { - const editing = photosRef.current.querySelectorAll( - ".edit-screen.editing" - ); + if (key === 'Escape') { + const editing = photosRef.current.querySelectorAll('.edit-screen.editing'); if (editing) { [...editing].forEach((element) => { - element?.classList.remove("editing"); + element?.classList.remove('editing'); }); } } @@ -575,16 +545,16 @@ export default function InstantImages(props) { // Initial page load. useEffect(() => { setLoading(false); - wrapper.classList.add("loaded"); + wrapper.classList.add('loaded'); // Block editor, get initial set of photos. if (isBlockEditor) { getPhotos(); } // Add global escape listener. - document.addEventListener("keydown", escFunction, false); + document.addEventListener('keydown', escFunction, false); return () => { - document.removeEventListener("keydown", escFunction, false); + document.removeEventListener('keydown', escFunction, false); }; }, []); // eslint-disable-line react-hooks/exhaustive-deps @@ -616,46 +586,22 @@ export default function InstantImages(props) { )}
-
+
{filterOptions && Object.entries(filterOptions)?.length ? (
{Object.entries(filterOptions).map(([key, filter], index) => ( - + ))}
) : null}
-
+
- {wpBlock ? ( - - ) : ( - - )} + {wpBlock ? : } - + diff --git a/src/js/components/LoadMore.js b/src/js/components/LoadMore.js index fef5de1..8142077 100644 --- a/src/js/components/LoadMore.js +++ b/src/js/components/LoadMore.js @@ -1,6 +1,6 @@ -import { forwardRef } from "@wordpress/element"; -import { __ } from "@wordpress/i18n"; -import classNames from "classnames"; +import { forwardRef } from '@wordpress/element'; +import { __ } from '@wordpress/i18n'; +import classNames from 'classnames'; /** * Render the LoadMore component. @@ -11,16 +11,9 @@ const LoadMore = forwardRef((props, ref) => { const { loadMorePhotos, loading, done } = props; return ( -
+
); diff --git a/src/js/components/Photo.js b/src/js/components/Photo.js index 92d5656..f0612c6 100755 --- a/src/js/components/Photo.js +++ b/src/js/components/Photo.js @@ -1,17 +1,13 @@ -import { Fragment, useRef, useState } from "@wordpress/element"; -import axios from "axios"; -import classNames from "classnames"; -import { usePluginContext } from "../common/pluginProvider"; -import insertImage from "../editor/utils/insertImage"; -import setFeaturedImage from "../editor/utils/setFeaturedImage"; -import { - capitalizeFirstLetter, - hideTooltip, - showTooltip, -} from "../functions/helpers"; -import { unsplashDownload } from "../functions/providers/unsplash"; -import generateAttribution from "../functions/generateAttribution"; -import { __ } from "@wordpress/i18n"; +import { Fragment, useRef, useState } from '@wordpress/element'; +import axios from 'axios'; +import classNames from 'classnames'; +import { usePluginContext } from '../common/pluginProvider'; +import insertImage from '../editor/utils/insertImage'; +import setFeaturedImage from '../editor/utils/setFeaturedImage'; +import { capitalizeFirstLetter, hideTooltip, showTooltip } from '../functions/helpers'; +import { unsplashDownload } from '../functions/providers/unsplash'; +import generateAttribution from '../functions/generateAttribution'; +import { __ } from '@wordpress/i18n'; /** * Render the Photo component. @@ -21,28 +17,9 @@ import { __ } from "@wordpress/i18n"; */ export default function Photo(props) { const { result, setInactive } = props; - const { - provider, - wpBlock = false, - mediaModal = false, - blockSidebar = false, - clientId, - } = usePluginContext(); - - const { - id, - id: filename, - permalink, - title, - alt, - caption, - attribution, - extension = "jpg", - likes, - dimensions, - urls, - user, - } = result; + const { provider, wpBlock = false, mediaModal = false, blockSidebar = false, clientId } = usePluginContext(); + + const { id, id: filename, permalink, title, alt, caption, attribution, extension = 'jpg', likes, dimensions, urls, user } = result; // Deconstruct image URLs. const { thumb, full, download_url } = urls; @@ -50,21 +27,15 @@ export default function Photo(props) { // Deconstruct user data. const { name: user_name, photo: user_photo, url: user_url } = user; - const container = document.querySelector(".instant-img-container"); - const likeDisplay = - parseInt(likes) === 1 - ? __("Like", "instant-images") - : __("Likes", "instant-images"); + const container = document.querySelector('.instant-img-container'); + const likeDisplay = parseInt(likes) === 1 ? __('Like', 'instant-images') : __('Likes', 'instant-images'); - const { attribution_hook = false, auto_attribution = false } = - instant_img_localize; + const { attribution_hook = false, auto_attribution = false } = instant_img_localize; // Get the attribution text. - const imageAttribution = attribution_hook - ? generateAttribution(attribution_hook, provider, permalink, user) - : attribution; + const imageAttribution = attribution_hook ? generateAttribution(attribution_hook, provider, permalink, user) : attribution; - const imageCaption = auto_attribution === "1" ? imageAttribution : caption; + const imageCaption = auto_attribution === '1' ? imageAttribution : caption; // Photo state. const [imageDetails, setImageDetails] = useState({ @@ -74,8 +45,8 @@ export default function Photo(props) { caption: imageCaption, }); const [inProgress, setInProgress] = useState(false); // inProgress state. - const [status, setStatus] = useState("loaded"); // Status state. - const [editURL, setEditURL] = useState(""); // Edit URL state. + const [status, setStatus] = useState('loaded'); // Status state. + const [editURL, setEditURL] = useState(''); // Edit URL state. // Refs. const photo = useRef(); @@ -93,42 +64,42 @@ export default function Photo(props) { * @since 4.3 */ function download() { - if (inProgress || status === "success" || status === "uploaded") { + if (inProgress || status === 'success' || status === 'uploaded') { return false; // Exit if uploading, uploaded or success. } const target = upload?.current; setInProgress(true); - setStatus("uploading"); + setStatus('uploading'); if (wpBlock) { setInactive(true); // Make Instant Images inactive after selecting an image. } // API URL - const api = instant_img_localize.root + "instant-images/download/"; + const api = instant_img_localize.root + 'instant-images/download/'; // Data Params const data = { provider, - id: target.getAttribute("data-id"), - image_url: target.getAttribute("data-url"), - filename: target.getAttribute("data-id"), + id: target.getAttribute('data-id'), + image_url: target.getAttribute('data-url'), + filename: target.getAttribute('data-id'), extension, - custom_filename: target.getAttribute("data-filename"), - title: target.getAttribute("data-title"), - alt: target.getAttribute("data-alt"), - caption: target.getAttribute("data-caption"), + custom_filename: target.getAttribute('data-filename'), + title: target.getAttribute('data-title'), + alt: target.getAttribute('data-alt'), + caption: target.getAttribute('data-caption'), parent_id: instant_img_localize.parent_id, lang: instant_img_localize.lang, }; // Config Params const config = { - credentials: "same-origin", + credentials: 'same-origin', headers: { - "X-WP-Nonce": instant_img_localize.nonce, - "Content-Type": "application/json", + 'X-WP-Nonce': instant_img_localize.nonce, + 'Content-Type': 'application/json', }, }; @@ -150,7 +121,7 @@ export default function Photo(props) { uploadComplete(target, msg, attachment.id); // Success/Upload Complete // Trigger a download at Unsplash. - if (provider === "unsplash" && download_url) { + if (provider === 'unsplash' && download_url) { unsplashDownload(download_url); } @@ -177,7 +148,7 @@ export default function Photo(props) { // Insert Image via WP Block. if (wpBlock && clientId) { - setStatus("uploaded"); + setStatus('uploaded'); setTimeout(() => { // Delay for effect. insertImage(attachment, clientId); @@ -190,10 +161,8 @@ export default function Photo(props) { * Media Modal. * If is media popup, redirect user to media-upload settings. */ - if (container.dataset.mediaPopup === "true" && !blockSidebar) { - window.location = - "media-upload.php?type=image&tab=library&attachment_id=" + - attachment.id; + if (container.dataset.mediaPopup === 'true' && !blockSidebar) { + window.location = 'media-upload.php?type=image&tab=library&attachment_id=' + attachment.id; } } else { // Error @@ -223,12 +192,12 @@ export default function Photo(props) { } setImageTitle(target, msg); - setStatus("uploaded"); + setStatus('uploaded'); setInProgress(false); // Remove uploaded status after 3.5 seconds. setTimeout(function () { - setStatus("success"); + setStatus('success'); }, 3500); // Refresh Media Router/Modal. @@ -283,7 +252,7 @@ export default function Photo(props) { function refreshMediaModal(modalID) { if (mediaModal && wp.media && wp.media.frame && wp.media.frame.el) { const mediaModalEl = wp.media.frame.el; - const mediaTab = mediaModalEl.querySelector("#menu-item-browse"); + const mediaTab = mediaModalEl.querySelector('#menu-item-browse'); if (mediaTab) { // Open the 'Media Library' tab. mediaTab.click(); @@ -297,7 +266,7 @@ export default function Photo(props) { } // Select the attached that was just uploaded. - const selection = wp.media.frame.state().get("selection"); + const selection = wp.media.frame.state().get('selection'); const selected = parseInt(modalID); selection.reset(selected ? [wp.media.attachment(selected)] : []); }, 100); @@ -314,7 +283,7 @@ export default function Photo(props) { function uploadError(target, msg) { setImageTitle(target, msg); setInProgress(false); - setStatus("error"); + setStatus('error'); setInactive(false); console.warn(msg); } @@ -327,7 +296,7 @@ export default function Photo(props) { * @since 3.0 */ function setImageTitle(target, msg) { - target.setAttribute("title", msg); // Remove 'Click to upload...', set new value + target.setAttribute('title', msg); // Remove 'Click to upload...', set new value } /** @@ -341,15 +310,15 @@ export default function Photo(props) { hideTooltip(e); // Get all open edit screens and close them. - const openEdits = document.querySelectorAll(".edit-screen.editing"); + const openEdits = document.querySelectorAll('.edit-screen.editing'); if (openEdits) { openEdits.forEach((edit) => { - edit.classList.remove("editing"); + edit.classList.remove('editing'); }); } // Show edit screen - editScreen.current.classList.add("editing"); + editScreen.current.classList.add('editing'); // Set focus on edit screen setTimeout(function () { @@ -366,19 +335,19 @@ export default function Photo(props) { function handleEditChange(e) { const target = e.target.name; switch (target) { - case "filename": + case 'filename': setImageDetails({ ...imageDetails, filename: e.target.value }); break; - case "title": + case 'title': setImageDetails({ ...imageDetails, title: e.target.value }); break; - case "alt": + case 'alt': setImageDetails({ ...imageDetails, alt: e.target.value }); break; - case "caption": + case 'caption': setImageDetails({ ...imageDetails, caption: e.target.value }); break; } @@ -390,7 +359,7 @@ export default function Photo(props) { * @since 3.2 */ function uploadNow() { - editScreen.current.classList.remove("editing"); // Hide edit screen. + editScreen.current.classList.remove('editing'); // Hide edit screen. upload.current.click(); // Trigger click. } @@ -409,7 +378,7 @@ export default function Photo(props) { }); // Hide edit screen - editScreen.current.classList.remove("editing"); + editScreen.current.classList.remove('editing'); // Set focus back on photo. upload.current.focus({ preventScrol: true }); @@ -421,9 +390,9 @@ export default function Photo(props) { * @since 4.3 */ function closeMediaModal() { - const mediaModalEl = document.querySelector(".media-modal"); + const mediaModalEl = document.querySelector('.media-modal'); if (mediaModalEl) { - const closeBtn = mediaModalEl.querySelector("button.media-modal-close"); + const closeBtn = mediaModalEl.querySelector('button.media-modal-close'); if (!closeBtn) { return false; } @@ -445,7 +414,7 @@ export default function Photo(props) { return (
-
+
- +
- {user_photo?.length > 0 && ( - - )} + {user_photo?.length > 0 && } {user_name}
@@ -493,9 +450,7 @@ export default function Photo(props) { onClick={(e) => setFeaturedImageClick(e)} > - - {instant_img_localize.set_as_featured} - + {instant_img_localize.set_as_featured} ) : null} @@ -523,9 +476,7 @@ export default function Photo(props) { onClick={(e) => insertImageIntoPost(e)} > - - {instant_img_localize.insert_into_post} - + {instant_img_localize.insert_into_post} )} @@ -538,9 +489,7 @@ export default function Photo(props) { onMouseLeave={(e) => hideTooltip(e)} > - - {instant_img_localize.edit_upload} - + {instant_img_localize.edit_upload} ) : ( )}
@@ -563,29 +510,24 @@ export default function Photo(props) { {likes ? ( showTooltip(e)} onMouseLeave={(e) => hideTooltip(e)} > - {" "} - {likes} + {likes} ) : null} showTooltip(e)} onMouseLeave={(e) => hideTooltip(e)} rel="noopener noreferrer" target="_blank" > - {`${ - instant_img_localize.open_external - } ${capitalizeFirstLetter(provider)}`} + {`${instant_img_localize.open_external} ${capitalizeFirstLetter(provider)}`}
@@ -594,14 +536,9 @@ export default function Photo(props) {

{instant_img_localize.edit_details}

- {dimensions && dimensions.length > 0 && ( -

{dimensions}

- )} + {dimensions && dimensions.length > 0 &&

{dimensions}

}
-
+
@@ -655,22 +579,12 @@ export default function Photo(props) {
) : null}
- {" "} + {' '}   -
diff --git a/src/js/components/ProviderIcons.js b/src/js/components/ProviderIcons.js index 6c72374..c204a73 100644 --- a/src/js/components/ProviderIcons.js +++ b/src/js/components/ProviderIcons.js @@ -1,4 +1,4 @@ -import { API } from "../constants/API"; +import { API } from '../constants/API'; /** * Return the provider icon. @@ -10,9 +10,7 @@ export function getProviderIcon(provider) { if (!provider) { return null; } - return API[provider.toLowerCase()].icon - ? API[provider.toLowerCase()].icon() - : null; + return API[provider.toLowerCase()].icon ? API[provider.toLowerCase()].icon() : null; } /** @@ -20,12 +18,7 @@ export function getProviderIcon(provider) { */ export function UnsplashIcon() { return ( - + ); @@ -36,12 +29,7 @@ export function UnsplashIcon() { */ export function PixabayIcon() { return ( - + + - - + + - - + + ); } @@ -110,20 +81,9 @@ export function OpenverseIcon() { */ export function PexelsIcon() { return ( - - - + + + ); } diff --git a/src/js/components/ProviderNav.js b/src/js/components/ProviderNav.js index 288063b..9f03d9c 100644 --- a/src/js/components/ProviderNav.js +++ b/src/js/components/ProviderNav.js @@ -1,7 +1,7 @@ -import { Fragment } from "@wordpress/element"; -import { usePluginContext } from "../common/pluginProvider"; -import { API } from "../constants/API"; -import { getProviderIcon } from "./ProviderIcons"; +import { Fragment } from '@wordpress/element'; +import { usePluginContext } from '../common/pluginProvider'; +import { API } from '../constants/API'; +import { getProviderIcon } from './ProviderIcons'; const providers = API.providers; /** @@ -22,19 +22,11 @@ export default function ProviderNav({ switchProvider }) {
))} diff --git a/src/js/components/RestAPIError.js b/src/js/components/RestAPIError.js index 25f270a..ed6e8f8 100644 --- a/src/js/components/RestAPIError.js +++ b/src/js/components/RestAPIError.js @@ -1,4 +1,4 @@ -import { Fragment, useState, useEffect } from "@wordpress/element"; +import { Fragment, useState, useEffect } from '@wordpress/element'; /** * Render the RestAPIError component. @@ -14,11 +14,11 @@ export default function RestAPIError() { * @since 3.2 */ function test() { - const testURL = instant_img_localize.root + "instant-images/test/"; + const testURL = instant_img_localize.root + 'instant-images/test/'; const restAPITest = new XMLHttpRequest(); - restAPITest.open("POST", testURL, true); - restAPITest.setRequestHeader("X-WP-Nonce", instant_img_localize.nonce); - restAPITest.setRequestHeader("Content-Type", "application/json"); + restAPITest.open('POST', testURL, true); + restAPITest.setRequestHeader('X-WP-Nonce', instant_img_localize.nonce); + restAPITest.setRequestHeader('Content-Type', 'application/json'); restAPITest.send(); restAPITest.onload = function () { if (restAPITest.status >= 200 && restAPITest.status < 400) { diff --git a/src/js/components/Results.js b/src/js/components/Results.js index b7ed328..2f0ac93 100644 --- a/src/js/components/Results.js +++ b/src/js/components/Results.js @@ -1,6 +1,6 @@ -import { Fragment, forwardRef, useState } from "@wordpress/element"; -import Photo from "./Photo"; -import Sponsor from "./Sponsor"; +import { Fragment, forwardRef, useState } from '@wordpress/element'; +import Photo from './Photo'; +import Sponsor from './Sponsor'; /** * Render the Results component. @@ -12,19 +12,11 @@ const Results = forwardRef((props, ref) => { const [inactive, setInactive] = useState(false); return ( -
+
{!!data?.length && data.map((result, index) => ( - {result?.type === "instant-images-ad" ? ( - - ) : ( - - )} + {result?.type === 'instant-images-ad' ? : } ))}
diff --git a/src/js/components/ResultsWPBlock.js b/src/js/components/ResultsWPBlock.js index 182e163..4841c85 100644 --- a/src/js/components/ResultsWPBlock.js +++ b/src/js/components/ResultsWPBlock.js @@ -1,10 +1,10 @@ -import { Fragment, forwardRef, useEffect, useState } from "@wordpress/element"; -import { useInView } from "react-intersection-observer"; -import { usePluginContext } from "../common/pluginProvider"; -import WPBlockInstructions from "../editor/block/components/Instructions"; -import WPBlockLoadMore from "../editor/block/components/LoadMore"; -import Photo from "./Photo"; -import Sponsor from "./Sponsor"; +import { Fragment, forwardRef, useEffect, useState } from '@wordpress/element'; +import { useInView } from 'react-intersection-observer'; +import { usePluginContext } from '../common/pluginProvider'; +import WPBlockInstructions from '../editor/block/components/Instructions'; +import WPBlockLoadMore from '../editor/block/components/LoadMore'; +import Photo from './Photo'; +import Sponsor from './Sponsor'; /** * Render the Results component. @@ -17,7 +17,7 @@ const ResultsWPBlock = forwardRef((props, ref) => { const [inactive, setInactive] = useState(false); const [loadMoreRef, inView] = useInView({ - rootMargin: "0px 0px", + rootMargin: '0px 0px', }); // Scroll in-view callback. @@ -29,19 +29,11 @@ const ResultsWPBlock = forwardRef((props, ref) => { return ( -
+
{!!data?.length && data.map((result, index) => ( - {result?.type === "instant-images-ad" ? ( - - ) : ( - - )} + {result?.type === 'instant-images-ad' ? : } ))} diff --git a/src/js/components/Sponsor.js b/src/js/components/Sponsor.js index 8402e77..cf8cbac 100755 --- a/src/js/components/Sponsor.js +++ b/src/js/components/Sponsor.js @@ -1,4 +1,4 @@ -import { useRef, Fragment } from "@wordpress/element"; +import { useRef, Fragment } from '@wordpress/element'; /** * Render the Sponsor component. @@ -9,10 +9,10 @@ import { useRef, Fragment } from "@wordpress/element"; export default function Sponsor(props) { const { result } = props; const { data = null } = result; - const url = data?.url || ""; - const title = data?.title || ""; - const desc = data?.description || ""; - const avatar = data?.avatar || ""; + const url = data?.url || ''; + const title = data?.title || ''; + const desc = data?.description || ''; + const avatar = data?.avatar || ''; const { image = null } = data; const { src = null, alt = null } = image; @@ -24,24 +24,13 @@ export default function Sponsor(props) { {image && url ? ( // eslint-disable-next-line -
link.current.click()} - > +
link.current.click()}>
{instant_img_localize.ad} diff --git a/src/js/components/cta/Extended.js b/src/js/components/cta/Extended.js index 8f2dcbc..d5c1815 100644 --- a/src/js/components/cta/Extended.js +++ b/src/js/components/cta/Extended.js @@ -1,7 +1,7 @@ -import { useState } from "@wordpress/element"; -import { __ } from "@wordpress/i18n"; -import classNames from "classnames"; -import { getSetting, saveSettings } from "../../functions/localStorage"; +import { useState } from '@wordpress/element'; +import { __ } from '@wordpress/i18n'; +import classNames from 'classnames'; +import { getSetting, saveSettings } from '../../functions/localStorage'; /* eslint-disable */ @@ -12,12 +12,12 @@ import { getSetting, saveSettings } from "../../functions/localStorage"; */ export function ExtendedCTA() { const { activated = false } = instant_img_localize?.addons?.extended; - const name = "extended-cta-2024"; - const [dissmissed, setDismissed] = useState(getSetting(name) === "hide"); // Get setting from localstorage. + const name = 'extended-cta-2024'; + const [dissmissed, setDismissed] = useState(getSetting(name) === 'hide'); // Get setting from localstorage. // Hide the CTA. function remove() { - saveSettings(name, "hide"); + saveSettings(name, 'hide'); setDismissed(true); } @@ -28,33 +28,19 @@ export function ExtendedCTA() {

- Introducing the{" "} - + Introducing the{' '} + Extended add-on - {" "} + {' '} → An extension pack of premium features and functionality to enhance the Instant Images plugin.

- - {__("Learn More", "instant-images")} + + {__('Learn More', 'instant-images')} -
@@ -71,52 +57,33 @@ export function ExtendedCTA() { * @return {JSX.Element} The ExtendedSearchCTA component. */ export function ExtendedSearchCTA({ show = false }) { - const name = "extended-cta-search-2024"; - const [active, setActive] = useState(getSetting(name) !== "hide"); // Get setting from localstorage. + const name = 'extended-cta-search-2024'; + const [active, setActive] = useState(getSetting(name) !== 'hide'); // Get setting from localstorage. // Hide the CTA. function remove() { - saveSettings(name, "hide"); + saveSettings(name, 'hide'); setActive(false); } return ( -
+
- diff --git a/src/js/components/search/SearchForm.js b/src/js/components/search/SearchForm.js index 883cd47..53696fd 100644 --- a/src/js/components/search/SearchForm.js +++ b/src/js/components/search/SearchForm.js @@ -1,14 +1,11 @@ -import { forwardRef, useEffect, useRef, useState } from "@wordpress/element"; -import classNames from "classnames"; -import { usePluginContext } from "../../common/pluginProvider"; -import { - getSearchHistory, - saveSearchHistory, -} from "../../functions/localStorage"; -import { useClickOutside } from "../../hooks/useClickOutside"; -import { ExtendedSearchCTA } from "../cta/Extended"; -import SearchHistory from "./SearchHistory"; -import SearchToolTip from "./SearchToolTip"; +import { forwardRef, useEffect, useRef, useState } from '@wordpress/element'; +import classNames from 'classnames'; +import { usePluginContext } from '../../common/pluginProvider'; +import { getSearchHistory, saveSearchHistory } from '../../functions/localStorage'; +import { useClickOutside } from '../../hooks/useClickOutside'; +import { ExtendedSearchCTA } from '../cta/Extended'; +import SearchHistory from './SearchHistory'; +import SearchToolTip from './SearchToolTip'; /** * Render the search form as a component. @@ -16,12 +13,8 @@ import SearchToolTip from "./SearchToolTip"; * @return {JSX.Element} The SearchForm component. */ const SearchForm = forwardRef(({}, ref) => { - const { - activated: extended_activated = false, - license: extended_license = false, - } = instant_img_localize?.addons?.extended; - const { searchHandler, apiError, suggestions, getSuggestions } = - usePluginContext(); + const { activated: extended_activated = false, license: extended_license = false } = instant_img_localize?.addons?.extended; + const { searchHandler, apiError, suggestions, getSuggestions } = usePluginContext(); const [history, setHistory] = useState([]); const [show, setShow] = useState(false); @@ -78,12 +71,7 @@ const SearchForm = forwardRef(({}, ref) => { }, []); return ( -
+
formSubmit(e)} autoComplete="off">
))} + {provider === 'giphy' ? ( +
+ + Powered by Giphy + +
+ ) : null} )} diff --git a/src/scss/partials/_control-nav.scss b/src/scss/partials/_control-nav.scss index 93b5469..190b499 100755 --- a/src/scss/partials/_control-nav.scss +++ b/src/scss/partials/_control-nav.scss @@ -96,6 +96,7 @@ // Search &--search { display: flex; + align-items: center; width: 30%; max-width: 350px; @media screen and (min-width: $large) { diff --git a/src/scss/partials/_provider-nav.scss b/src/scss/partials/_provider-nav.scss index 1c83b6c..b212575 100644 --- a/src/scss/partials/_provider-nav.scss +++ b/src/scss/partials/_provider-nav.scss @@ -19,6 +19,21 @@ &:last-of-type { margin-left: 0; } + &.giphy-powered { + margin-left: 3px; + display: flex; + align-items: center; + width: 130px; + a { + width: 130px; + height: 100%; + display: flex; + align-items: center; + img { + display: block; + } + } + } } &--btn { padding: 0 10px; From dbca42d8eced920771cfb71f452a94ccad14cc3e Mon Sep 17 00:00:00 2001 From: Darren Cooney Date: Fri, 22 Nov 2024 14:22:11 -0500 Subject: [PATCH 14/14] Giphy release prep --- README.txt | 6 +- build/admin/index.asset.php | 2 +- build/admin/index.js | 5038 +--- build/block/index.asset.php | 2 +- build/block/index.js | 22411 +--------------- ...oweredby_100px-White_VertText.60eb0118.png | Bin 1483 -> 0 bytes build/instant-images.asset.php | 2 +- build/instant-images.js | 21108 +-------------- build/media-modal/index.asset.php | 2 +- build/media-modal/index.js | 21104 +-------------- build/plugin-sidebar/index.asset.php | 2 +- build/plugin-sidebar/index.js | 21040 +-------------- build/style-instant-images-rtl.css | 3701 +-- build/style-instant-images.css | 3703 +-- instant-images.php | 2 +- lang/instant-images.pot | 303 +- webpack/proxy.config.js | 2 +- 17 files changed, 1242 insertions(+), 97186 deletions(-) delete mode 100644 build/images/Poweredby_100px-White_VertText.60eb0118.png diff --git a/README.txt b/README.txt index 5f7f4cd..94489f2 100755 --- a/README.txt +++ b/README.txt @@ -128,7 +128,7 @@ No, we provide an API for you to use, however you can get your own by signing up No, an Openverse account is not required. = Do I need an account at Giphy? = -Yes, Giphy requires a valid API key. You can get your own by signing up for a free account at [Giphy](https://developers.giphy.com/). When you sign up be sure to choose the "Select API" option and choose the "Giphy API" option. +No, we provide an API for you to use, however you can get your own by signing up for a free account at [Giphy](https://developers.giphy.com/). When you sign up be sure to choose the "Select API" option and choose the "Giphy API" option. == Installation == @@ -166,8 +166,8 @@ How to install Instant Images. == Changelog == -= 7.0.0 - November 20, 2024 = -* NEW: Added Giphy integration. Giphy requires a valid API key. += 7.0.0 - November 22, 2024 = +* NEW: Added Giphy integration! * NEW: Added Image Size functionality to Instant Images settings. * NEW: Added required functionality to add image size with the Extended add-on. * FIX: Fixed potential issue with image file extensions being incorrect for png and jpeg files. diff --git a/build/admin/index.asset.php b/build/admin/index.asset.php index ffb39bd..d4cd5db 100644 --- a/build/admin/index.asset.php +++ b/build/admin/index.asset.php @@ -1 +1 @@ - array('wp-i18n'), 'version' => '26e24080015ff6988a26'); + array('wp-i18n'), 'version' => 'a6397371134df62c3eb8'); diff --git a/build/admin/index.js b/build/admin/index.js index 834011b..e1b6edb 100644 --- a/build/admin/index.js +++ b/build/admin/index.js @@ -1,5037 +1 @@ -/******/ (() => { // webpackBootstrap -/******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ "./admin/src/js/licenses.js": -/*!**********************************!*\ - !*** ./admin/src/js/licenses.js ***! - \**********************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - - - -// Get all license forms. -var licenseForms = document.querySelectorAll('.license-settings form.license-settings--item'); -if (licenseForms) { - // Loop each formt o add event listener. - licenseForms.forEach(function (form) { - form.addEventListener('submit', function (e) { - e.preventDefault(); - var input = this.querySelector('input'); - var license = input.value; - var key = input.dataset.key; - var status = input.dataset.status; - var id = input.dataset.id; - var type = form.classList.contains('valid') ? 'deactivate' : 'activate'; - if (!license) { - input.focus(); - return; - } - var button = form.querySelector('input[type=submit]'); - button.setAttribute('disabled', 'disabled'); - var loading = form.querySelector('.loading'); - loading.classList.add('active'); - updateLicense({ - key: key, - status: status, - id: id, - license: license, - type: type - }); - }); - }); -} - -/** - * Update add-on license via REST API. - * - * @param {Object} params The data params for license activation/deactivation. - */ -function updateLicense(params) { - var _instant_img_admin_lo = instant_img_admin_localize, - root = _instant_img_admin_lo.root, - nonce = _instant_img_admin_lo.nonce; // eslint-disable-line no-undef - var api = root + 'instant-images/license/'; - var config = { - headers: { - 'X-WP-Nonce': nonce, - 'Content-Type': 'application/json' - } - }; - axios__WEBPACK_IMPORTED_MODULE_1__["default"].post(api, JSON.stringify(params), config).then(function (data) { - if (data !== null && data !== void 0 && data.data) { - location.reload(); // Success: reload window. - } else { - console.warn( - // Error handling. - (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Are you sure you should be doing this?', 'instant-images')); - doReload(); - } - })["catch"](function (error) { - console.warn(error); - doReload(); - }); -} - -/** - * Reload window after 2 seconds. - */ -function doReload() { - setTimeout(function () { - location.reload(); // reload window. - }, 2000); -} - -/***/ }), - -/***/ "@wordpress/i18n": -/*!******************************!*\ - !*** external ["wp","i18n"] ***! - \******************************/ -/***/ ((module) => { - -module.exports = window["wp"]["i18n"]; - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/adapters.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/adapters/adapters.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _http_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./http.js */ "./node_modules/axios/lib/helpers/null.js"); -/* harmony import */ var _xhr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./xhr.js */ "./node_modules/axios/lib/adapters/xhr.js"); -/* harmony import */ var _fetch_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fetch.js */ "./node_modules/axios/lib/adapters/fetch.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - - - - - - -const knownAdapters = { - http: _http_js__WEBPACK_IMPORTED_MODULE_0__["default"], - xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_1__["default"], - fetch: _fetch_js__WEBPACK_IMPORTED_MODULE_2__["default"] -} - -_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(knownAdapters, (fn, value) => { - if (fn) { - try { - Object.defineProperty(fn, 'name', {value}); - } catch (e) { - // eslint-disable-next-line no-empty - } - Object.defineProperty(fn, 'adapterName', {value}); - } -}); - -const renderReason = (reason) => `- ${reason}`; - -const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(adapter) || adapter === null || adapter === false; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - getAdapter: (adapters) => { - adapters = _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isArray(adapters) ? adapters : [adapters]; - - const {length} = adapters; - let nameOrAdapter; - let adapter; - - const rejectedReasons = {}; - - for (let i = 0; i < length; i++) { - nameOrAdapter = adapters[i]; - let id; - - adapter = nameOrAdapter; - - if (!isResolvedHandle(nameOrAdapter)) { - adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; - - if (adapter === undefined) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"](`Unknown adapter '${id}'`); - } - } - - if (adapter) { - break; - } - - rejectedReasons[id || '#' + i] = adapter; - } - - if (!adapter) { - - const reasons = Object.entries(rejectedReasons) - .map(([id, state]) => `adapter ${id} ` + - (state === false ? 'is not supported by the environment' : 'is not available in the build') - ); - - let s = length ? - (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : - 'as no adapter specified'; - - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"]( - `There is no suitable adapter to dispatch the request ` + s, - 'ERR_NOT_SUPPORT' - ); - } - - return adapter; - }, - adapters: knownAdapters -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/fetch.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/adapters/fetch.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/composeSignals.js */ "./node_modules/axios/lib/helpers/composeSignals.js"); -/* harmony import */ var _helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/trackStream.js */ "./node_modules/axios/lib/helpers/trackStream.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../helpers/progressEventReducer.js */ "./node_modules/axios/lib/helpers/progressEventReducer.js"); -/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/resolveConfig.js */ "./node_modules/axios/lib/helpers/resolveConfig.js"); -/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/settle.js */ "./node_modules/axios/lib/core/settle.js"); - - - - - - - - - - -const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function'; -const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function'; - -// used only inside the fetch adapter -const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? - ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : - async (str) => new Uint8Array(await new Response(str).arrayBuffer()) -); - -const test = (fn, ...args) => { - try { - return !!fn(...args); - } catch (e) { - return false - } -} - -const supportsRequestStream = isReadableStreamSupported && test(() => { - let duplexAccessed = false; - - const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, { - body: new ReadableStream(), - method: 'POST', - get duplex() { - duplexAccessed = true; - return 'half'; - }, - }).headers.has('Content-Type'); - - return duplexAccessed && !hasContentType; -}); - -const DEFAULT_CHUNK_SIZE = 64 * 1024; - -const supportsResponseStream = isReadableStreamSupported && - test(() => _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReadableStream(new Response('').body)); - - -const resolvers = { - stream: supportsResponseStream && ((res) => res.body) -}; - -isFetchSupported && (((res) => { - ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => { - !resolvers[type] && (resolvers[type] = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(res[type]) ? (res) => res[type]() : - (_, config) => { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](`Response type '${type}' is not supported`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT, config); - }) - }); -})(new Response)); - -const getBodyLength = async (body) => { - if (body == null) { - return 0; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isBlob(body)) { - return body.size; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isSpecCompliantForm(body)) { - const _request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, { - method: 'POST', - body, - }); - return (await _request.arrayBuffer()).byteLength; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBufferView(body) || _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBuffer(body)) { - return body.byteLength; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isURLSearchParams(body)) { - body = body + ''; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(body)) { - return (await encodeText(body)).byteLength; - } -} - -const resolveBodyLength = async (headers, body) => { - const length = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(headers.getContentLength()); - - return length == null ? getBodyLength(body) : length; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isFetchSupported && (async (config) => { - let { - url, - method, - data, - signal, - cancelToken, - timeout, - onDownloadProgress, - onUploadProgress, - responseType, - headers, - withCredentials = 'same-origin', - fetchOptions - } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(config); - - responseType = responseType ? (responseType + '').toLowerCase() : 'text'; - - let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__["default"])([signal, cancelToken && cancelToken.toAbortSignal()], timeout); - - let request; - - const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { - composedSignal.unsubscribe(); - }); - - let requestContentLength; - - try { - if ( - onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' && - (requestContentLength = await resolveBodyLength(headers, data)) !== 0 - ) { - let _request = new Request(url, { - method: 'POST', - body: data, - duplex: "half" - }); - - let contentTypeHeader; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { - headers.setContentType(contentTypeHeader) - } - - if (_request.body) { - const [onProgress, flush] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)( - requestContentLength, - (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onUploadProgress)) - ); - - data = (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); - } - } - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(withCredentials)) { - withCredentials = withCredentials ? 'include' : 'omit'; - } - - // Cloudflare Workers throws when credentials are defined - // see https://github.com/cloudflare/workerd/issues/902 - const isCredentialsSupported = "credentials" in Request.prototype; - request = new Request(url, { - ...fetchOptions, - signal: composedSignal, - method: method.toUpperCase(), - headers: headers.normalize().toJSON(), - body: data, - duplex: "half", - credentials: isCredentialsSupported ? withCredentials : undefined - }); - - let response = await fetch(request); - - const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); - - if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) { - const options = {}; - - ['status', 'statusText', 'headers'].forEach(prop => { - options[prop] = response[prop]; - }); - - const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length')); - - const [onProgress, flush] = onDownloadProgress && (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)( - responseContentLength, - (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onDownloadProgress), true) - ) || []; - - response = new Response( - (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { - flush && flush(); - unsubscribe && unsubscribe(); - }), - options - ); - } - - responseType = responseType || 'text'; - - let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].findKey(resolvers, responseType) || 'text'](response, config); - - !isStreamResponse && unsubscribe && unsubscribe(); - - return await new Promise((resolve, reject) => { - (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_7__["default"])(resolve, reject, { - data: responseData, - headers: _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].from(response.headers), - status: response.status, - statusText: response.statusText, - config, - request - }) - }) - } catch (err) { - unsubscribe && unsubscribe(); - - if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) { - throw Object.assign( - new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NETWORK, config, request), - { - cause: err.cause || err - } - ) - } - - throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(err, err && err.code, config, request); - } -})); - - - - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/xhr.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/adapters/xhr.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../core/settle.js */ "./node_modules/axios/lib/core/settle.js"); -/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaults/transitional.js */ "./node_modules/axios/lib/defaults/transitional.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../helpers/parseProtocol.js */ "./node_modules/axios/lib/helpers/parseProtocol.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/progressEventReducer.js */ "./node_modules/axios/lib/helpers/progressEventReducer.js"); -/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/resolveConfig.js */ "./node_modules/axios/lib/helpers/resolveConfig.js"); - - - - - - - - - - - -const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported && function (config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_0__["default"])(config); - let requestData = _config.data; - const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(_config.headers).normalize(); - let {responseType, onUploadProgress, onDownloadProgress} = _config; - let onCanceled; - let uploadThrottled, downloadThrottled; - let flushUpload, flushDownload; - - function done() { - flushUpload && flushUpload(); // flush events - flushDownload && flushDownload(); // flush events - - _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); - - _config.signal && _config.signal.removeEventListener('abort', onCanceled); - } - - let request = new XMLHttpRequest(); - - request.open(_config.method.toUpperCase(), _config.url, true); - - // Set the request timeout in MS - request.timeout = _config.timeout; - - function onloadend() { - if (!request) { - return; - } - // Prepare the response - const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from( - 'getAllResponseHeaders' in request && request.getAllResponseHeaders() - ); - const responseData = !responseType || responseType === 'text' || responseType === 'json' ? - request.responseText : request.response; - const response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config, - request - }; - - (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(function _resolve(value) { - resolve(value); - done(); - }, function _reject(err) { - reject(err); - done(); - }, response); - - // Clean up request - request = null; - } - - if ('onloadend' in request) { - // Use onloadend if available - request.onloadend = onloadend; - } else { - // Listen for ready state to emulate onloadend - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - // readystate handler is calling before onerror or ontimeout handlers, - // so we should call onloadend on the next 'tick' - setTimeout(onloadend); - }; - } - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, config, request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_NETWORK, config, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; - const transitional = _config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_4__["default"]; - if (_config.timeoutErrorMessage) { - timeoutErrorMessage = _config.timeoutErrorMessage; - } - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]( - timeoutErrorMessage, - transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, - config, - request)); - - // Clean up request - request = null; - }; - - // Remove Content-Type if data is undefined - requestData === undefined && requestHeaders.setContentType(null); - - // Add headers to the request - if ('setRequestHeader' in request) { - _utils_js__WEBPACK_IMPORTED_MODULE_5__["default"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { - request.setRequestHeader(key, val); - }); - } - - // Add withCredentials to request if needed - if (!_utils_js__WEBPACK_IMPORTED_MODULE_5__["default"].isUndefined(_config.withCredentials)) { - request.withCredentials = !!_config.withCredentials; - } - - // Add responseType to request if needed - if (responseType && responseType !== 'json') { - request.responseType = _config.responseType; - } - - // Handle progress if needed - if (onDownloadProgress) { - ([downloadThrottled, flushDownload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)(onDownloadProgress, true)); - request.addEventListener('progress', downloadThrottled); - } - - // Not all browsers support upload events - if (onUploadProgress && request.upload) { - ([uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)(onUploadProgress)); - - request.upload.addEventListener('progress', uploadThrottled); - - request.upload.addEventListener('loadend', flushUpload); - } - - if (_config.cancelToken || _config.signal) { - // Handle cancellation - // eslint-disable-next-line func-names - onCanceled = cancel => { - if (!request) { - return; - } - reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_7__["default"](null, config, request) : cancel); - request.abort(); - request = null; - }; - - _config.cancelToken && _config.cancelToken.subscribe(onCanceled); - if (_config.signal) { - _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); - } - } - - const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_config.url); - - if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_9__["default"].protocols.indexOf(protocol) === -1) { - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Unsupported protocol ' + protocol + ':', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_BAD_REQUEST, config)); - return; - } - - - // Send the request - request.send(requestData || null); - }); -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/axios.js": -/*!*****************************************!*\ - !*** ./node_modules/axios/lib/axios.js ***! - \*****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js"); -/* harmony import */ var _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/Axios.js */ "./node_modules/axios/lib/core/Axios.js"); -/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); -/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); -/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js"); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cancel/CancelToken.js */ "./node_modules/axios/lib/cancel/CancelToken.js"); -/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js"); -/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./env/data.js */ "./node_modules/axios/lib/env/data.js"); -/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/spread.js */ "./node_modules/axios/lib/helpers/spread.js"); -/* harmony import */ var _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/isAxiosError.js */ "./node_modules/axios/lib/helpers/isAxiosError.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js"); -/* harmony import */ var _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers/HttpStatusCode.js */ "./node_modules/axios/lib/helpers/HttpStatusCode.js"); - - - - - - - - - - - - - - - - - - - - -/** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * - * @returns {Axios} A new instance of Axios - */ -function createInstance(defaultConfig) { - const context = new _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"](defaultConfig); - const instance = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.request, context); - - // Copy axios.prototype to instance - _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype, context, {allOwnKeys: true}); - - // Copy context to instance - _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, context, null, {allOwnKeys: true}); - - // Factory for creating new instances - instance.create = function create(instanceConfig) { - return createInstance((0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(defaultConfig, instanceConfig)); - }; - - return instance; -} - -// Create the default instance to be exported -const axios = createInstance(_defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"]); - -// Expose Axios class to allow class inheritance -axios.Axios = _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"]; - -// Expose Cancel & CancelToken -axios.CanceledError = _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__["default"]; -axios.CancelToken = _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__["default"]; -axios.isCancel = _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__["default"]; -axios.VERSION = _env_data_js__WEBPACK_IMPORTED_MODULE_8__.VERSION; -axios.toFormData = _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__["default"]; - -// Expose AxiosError class -axios.AxiosError = _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__["default"]; - -// alias for CanceledError for backward compatibility -axios.Cancel = axios.CanceledError; - -// Expose all/spread -axios.all = function all(promises) { - return Promise.all(promises); -}; - -axios.spread = _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__["default"]; - -// Expose isAxiosError -axios.isAxiosError = _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__["default"]; - -// Expose mergeConfig -axios.mergeConfig = _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"]; - -axios.AxiosHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__["default"]; - -axios.formToJSON = thing => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isHTMLForm(thing) ? new FormData(thing) : thing); - -axios.getAdapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__["default"].getAdapter; - -axios.HttpStatusCode = _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__["default"]; - -axios.default = axios; - -// this module should only have a default export -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (axios); - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/CancelToken.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/cancel/CancelToken.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); - - - - -/** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @param {Function} executor The executor function. - * - * @returns {CancelToken} - */ -class CancelToken { - constructor(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - let resolvePromise; - - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - const token = this; - - // eslint-disable-next-line func-names - this.promise.then(cancel => { - if (!token._listeners) return; - - let i = token._listeners.length; - - while (i-- > 0) { - token._listeners[i](cancel); - } - token._listeners = null; - }); - - // eslint-disable-next-line func-names - this.promise.then = onfulfilled => { - let _resolve; - // eslint-disable-next-line func-names - const promise = new Promise(resolve => { - token.subscribe(resolve); - _resolve = resolve; - }).then(onfulfilled); - - promise.cancel = function reject() { - token.unsubscribe(_resolve); - }; - - return promise; - }; - - executor(function cancel(message, config, request) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](message, config, request); - resolvePromise(token.reason); - }); - } - - /** - * Throws a `CanceledError` if cancellation has been requested. - */ - throwIfRequested() { - if (this.reason) { - throw this.reason; - } - } - - /** - * Subscribe to the cancel signal - */ - - subscribe(listener) { - if (this.reason) { - listener(this.reason); - return; - } - - if (this._listeners) { - this._listeners.push(listener); - } else { - this._listeners = [listener]; - } - } - - /** - * Unsubscribe from the cancel signal - */ - - unsubscribe(listener) { - if (!this._listeners) { - return; - } - const index = this._listeners.indexOf(listener); - if (index !== -1) { - this._listeners.splice(index, 1); - } - } - - toAbortSignal() { - const controller = new AbortController(); - - const abort = (err) => { - controller.abort(err); - }; - - this.subscribe(abort); - - controller.signal.unsubscribe = () => this.unsubscribe(abort); - - return controller.signal; - } - - /** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ - static source() { - let cancel; - const token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token, - cancel - }; - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CancelToken); - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/CanceledError.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/cancel/CanceledError.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - - -/** - * A `CanceledError` is an object that is thrown when an operation is canceled. - * - * @param {string=} message The message. - * @param {Object=} config The config. - * @param {Object=} request The request. - * - * @returns {CanceledError} The created error. - */ -function CanceledError(message, config, request) { - // eslint-disable-next-line no-eq-null,eqeqeq - _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, message == null ? 'canceled' : message, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_CANCELED, config, request); - this.name = 'CanceledError'; -} - -_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].inherits(CanceledError, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"], { - __CANCEL__: true -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CanceledError); - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/isCancel.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/cancel/isCancel.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ isCancel) -/* harmony export */ }); - - -function isCancel(value) { - return !!(value && value.__CANCEL__); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/Axios.js": -/*!**********************************************!*\ - !*** ./node_modules/axios/lib/core/Axios.js ***! - \**********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js"); -/* harmony import */ var _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InterceptorManager.js */ "./node_modules/axios/lib/core/InterceptorManager.js"); -/* harmony import */ var _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dispatchRequest.js */ "./node_modules/axios/lib/core/dispatchRequest.js"); -/* harmony import */ var _mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); -/* harmony import */ var _buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js"); -/* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/validator.js */ "./node_modules/axios/lib/helpers/validator.js"); -/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - - - - - - - - - - - -const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].validators; - -/** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - * - * @return {Axios} A new instance of Axios - */ -class Axios { - constructor(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"](), - response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"]() - }; - } - - /** - * Dispatch a request - * - * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) - * @param {?Object} config - * - * @returns {Promise} The Promise to be fulfilled - */ - async request(configOrUrl, config) { - try { - return await this._request(configOrUrl, config); - } catch (err) { - if (err instanceof Error) { - let dummy; - - Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error()); - - // slice off the Error: ... line - const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; - try { - if (!err.stack) { - err.stack = stack; - // match without the 2 top stack lines - } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) { - err.stack += '\n' + stack - } - } catch (e) { - // ignore the case where "stack" is an un-writable property - } - } - - throw err; - } - } - - _request(configOrUrl, config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof configOrUrl === 'string') { - config = config || {}; - config.url = configOrUrl; - } else { - config = configOrUrl || {}; - } - - config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config); - - const {transitional, paramsSerializer, headers} = config; - - if (transitional !== undefined) { - _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(transitional, { - silentJSONParsing: validators.transitional(validators.boolean), - forcedJSONParsing: validators.transitional(validators.boolean), - clarifyTimeoutError: validators.transitional(validators.boolean) - }, false); - } - - if (paramsSerializer != null) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(paramsSerializer)) { - config.paramsSerializer = { - serialize: paramsSerializer - } - } else { - _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(paramsSerializer, { - encode: validators.function, - serialize: validators.function - }, true); - } - } - - // Set config.method - config.method = (config.method || this.defaults.method || 'get').toLowerCase(); - - // Flatten headers - let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].merge( - headers.common, - headers[config.method] - ); - - headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - (method) => { - delete headers[method]; - } - ); - - config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].concat(contextHeaders, headers); - - // filter out skipped interceptors - const requestInterceptorChain = []; - let synchronousRequestInterceptors = true; - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { - return; - } - - synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - const responseInterceptorChain = []; - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); - }); - - let promise; - let i = 0; - let len; - - if (!synchronousRequestInterceptors) { - const chain = [_dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].bind(this), undefined]; - chain.unshift.apply(chain, requestInterceptorChain); - chain.push.apply(chain, responseInterceptorChain); - len = chain.length; - - promise = Promise.resolve(config); - - while (i < len) { - promise = promise.then(chain[i++], chain[i++]); - } - - return promise; - } - - len = requestInterceptorChain.length; - - let newConfig = config; - - i = 0; - - while (i < len) { - const onFulfilled = requestInterceptorChain[i++]; - const onRejected = requestInterceptorChain[i++]; - try { - newConfig = onFulfilled(newConfig); - } catch (error) { - onRejected.call(this, error); - break; - } - } - - try { - promise = _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].call(this, newConfig); - } catch (error) { - return Promise.reject(error); - } - - i = 0; - len = responseInterceptorChain.length; - - while (i < len) { - promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); - } - - return promise; - } - - getUri(config) { - config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config); - const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__["default"])(config.baseURL, config.url); - return (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(fullPath, config.params, config.paramsSerializer); - } -} - -// Provide aliases for supported request methods -_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, { - method, - url, - data: (config || {}).data - })); - }; -}); - -_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - - function generateHTTPMethod(isForm) { - return function httpMethod(url, data, config) { - return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, { - method, - headers: isForm ? { - 'Content-Type': 'multipart/form-data' - } : {}, - url, - data - })); - }; - } - - Axios.prototype[method] = generateHTTPMethod(); - - Axios.prototype[method + 'Form'] = generateHTTPMethod(true); -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Axios); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/AxiosError.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/core/AxiosError.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [config] The config. - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * - * @returns {Error} The created error. - */ -function AxiosError(message, code, config, request, response) { - Error.call(this); - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = (new Error()).stack; - } - - this.message = message; - this.name = 'AxiosError'; - code && (this.code = code); - config && (this.config = config); - request && (this.request = request); - if (response) { - this.response = response; - this.status = response.status ? response.status : null; - } -} - -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].inherits(AxiosError, Error, { - toJSON: function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(this.config), - code: this.code, - status: this.status - }; - } -}); - -const prototype = AxiosError.prototype; -const descriptors = {}; - -[ - 'ERR_BAD_OPTION_VALUE', - 'ERR_BAD_OPTION', - 'ECONNABORTED', - 'ETIMEDOUT', - 'ERR_NETWORK', - 'ERR_FR_TOO_MANY_REDIRECTS', - 'ERR_DEPRECATED', - 'ERR_BAD_RESPONSE', - 'ERR_BAD_REQUEST', - 'ERR_CANCELED', - 'ERR_NOT_SUPPORT', - 'ERR_INVALID_URL' -// eslint-disable-next-line func-names -].forEach(code => { - descriptors[code] = {value: code}; -}); - -Object.defineProperties(AxiosError, descriptors); -Object.defineProperty(prototype, 'isAxiosError', {value: true}); - -// eslint-disable-next-line func-names -AxiosError.from = (error, code, config, request, response, customProps) => { - const axiosError = Object.create(prototype); - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(error, axiosError, function filter(obj) { - return obj !== Error.prototype; - }, prop => { - return prop !== 'isAxiosError'; - }); - - AxiosError.call(axiosError, error.message, code, config, request, response); - - axiosError.cause = error; - - axiosError.name = error.name; - - customProps && Object.assign(axiosError, customProps); - - return axiosError; -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/AxiosHeaders.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/core/AxiosHeaders.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/parseHeaders.js */ "./node_modules/axios/lib/helpers/parseHeaders.js"); - - - - - -const $internals = Symbol('internals'); - -function normalizeHeader(header) { - return header && String(header).trim().toLowerCase(); -} - -function normalizeValue(value) { - if (value === false || value == null) { - return value; - } - - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : String(value); -} - -function parseTokens(str) { - const tokens = Object.create(null); - const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; - let match; - - while ((match = tokensRE.exec(str))) { - tokens[match[1]] = match[2]; - } - - return tokens; -} - -const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); - -function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(filter)) { - return filter.call(this, value, header); - } - - if (isHeaderNameFilter) { - value = header; - } - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(value)) return; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(filter)) { - return value.indexOf(filter) !== -1; - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(filter)) { - return filter.test(value); - } -} - -function formatHeader(header) { - return header.trim() - .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { - return char.toUpperCase() + str; - }); -} - -function buildAccessors(obj, header) { - const accessorName = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toCamelCase(' ' + header); - - ['get', 'set', 'has'].forEach(methodName => { - Object.defineProperty(obj, methodName + accessorName, { - value: function(arg1, arg2, arg3) { - return this[methodName].call(this, header, arg1, arg2, arg3); - }, - configurable: true - }); - }); -} - -class AxiosHeaders { - constructor(headers) { - headers && this.set(headers); - } - - set(header, valueOrRewrite, rewrite) { - const self = this; - - function setHeader(_value, _header, _rewrite) { - const lHeader = normalizeHeader(_header); - - if (!lHeader) { - throw new Error('header name must be a non-empty string'); - } - - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, lHeader); - - if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { - self[key || _header] = normalizeValue(_value); - } - } - - const setHeaders = (headers, _rewrite) => - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(header) || header instanceof this.constructor) { - setHeaders(header, valueOrRewrite) - } else if(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { - setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"])(header), valueOrRewrite); - } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHeaders(header)) { - for (const [key, value] of header.entries()) { - setHeader(value, key, rewrite); - } - } else { - header != null && setHeader(valueOrRewrite, header, rewrite); - } - - return this; - } - - get(header, parser) { - header = normalizeHeader(header); - - if (header) { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header); - - if (key) { - const value = this[key]; - - if (!parser) { - return value; - } - - if (parser === true) { - return parseTokens(value); - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(parser)) { - return parser.call(this, value, key); - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(parser)) { - return parser.exec(value); - } - - throw new TypeError('parser must be boolean|regexp|function'); - } - } - } - - has(header, matcher) { - header = normalizeHeader(header); - - if (header) { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header); - - return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); - } - - return false; - } - - delete(header, matcher) { - const self = this; - let deleted = false; - - function deleteHeader(_header) { - _header = normalizeHeader(_header); - - if (_header) { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, _header); - - if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { - delete self[key]; - - deleted = true; - } - } - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header)) { - header.forEach(deleteHeader); - } else { - deleteHeader(header); - } - - return deleted; - } - - clear(matcher) { - const keys = Object.keys(this); - let i = keys.length; - let deleted = false; - - while (i--) { - const key = keys[i]; - if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { - delete this[key]; - deleted = true; - } - } - - return deleted; - } - - normalize(format) { - const self = this; - const headers = {}; - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(headers, header); - - if (key) { - self[key] = normalizeValue(value); - delete self[header]; - return; - } - - const normalized = format ? formatHeader(header) : String(header).trim(); - - if (normalized !== header) { - delete self[header]; - } - - self[normalized] = normalizeValue(value); - - headers[normalized] = true; - }); - - return this; - } - - concat(...targets) { - return this.constructor.concat(this, ...targets); - } - - toJSON(asStrings) { - const obj = Object.create(null); - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => { - value != null && value !== false && (obj[header] = asStrings && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.join(', ') : value); - }); - - return obj; - } - - [Symbol.iterator]() { - return Object.entries(this.toJSON())[Symbol.iterator](); - } - - toString() { - return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); - } - - get [Symbol.toStringTag]() { - return 'AxiosHeaders'; - } - - static from(thing) { - return thing instanceof this ? thing : new this(thing); - } - - static concat(first, ...targets) { - const computed = new this(first); - - targets.forEach((target) => computed.set(target)); - - return computed; - } - - static accessor(header) { - const internals = this[$internals] = (this[$internals] = { - accessors: {} - }); - - const accessors = internals.accessors; - const prototype = this.prototype; - - function defineAccessor(_header) { - const lHeader = normalizeHeader(_header); - - if (!accessors[lHeader]) { - buildAccessors(prototype, _header); - accessors[lHeader] = true; - } - } - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); - - return this; - } -} - -AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); - -// reserved names hotfix -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => { - let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` - return { - get: () => value, - set(headerValue) { - this[mapped] = headerValue; - } - } -}); - -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosHeaders); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/InterceptorManager.js": -/*!***********************************************************!*\ - !*** ./node_modules/axios/lib/core/InterceptorManager.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -class InterceptorManager { - constructor() { - this.handlers = []; - } - - /** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ - use(fulfilled, rejected, options) { - this.handlers.push({ - fulfilled, - rejected, - synchronous: options ? options.synchronous : false, - runWhen: options ? options.runWhen : null - }); - return this.handlers.length - 1; - } - - /** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - * - * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise - */ - eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } - } - - /** - * Clear all interceptors from the stack - * - * @returns {void} - */ - clear() { - if (this.handlers) { - this.handlers = []; - } - } - - /** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - * - * @returns {void} - */ - forEach(fn) { - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InterceptorManager); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/buildFullPath.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/core/buildFullPath.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ buildFullPath) -/* harmony export */ }); -/* harmony import */ var _helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/isAbsoluteURL.js */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js"); -/* harmony import */ var _helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/combineURLs.js */ "./node_modules/axios/lib/helpers/combineURLs.js"); - - - - - -/** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * - * @returns {string} The combined full path - */ -function buildFullPath(baseURL, requestedURL) { - if (baseURL && !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL)) { - return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL); - } - return requestedURL; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/dispatchRequest.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/core/dispatchRequest.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ dispatchRequest) -/* harmony export */ }); -/* harmony import */ var _transformData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transformData.js */ "./node_modules/axios/lib/core/transformData.js"); -/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js"); -/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js"); - - - - - - - - - -/** - * Throws a `CanceledError` if cancellation has been requested. - * - * @param {Object} config The config that is to be used for the request - * - * @returns {void} - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } - - if (config.signal && config.signal.aborted) { - throw new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](null, config); - } -} - -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * - * @returns {Promise} The Promise to be fulfilled - */ -function dispatchRequest(config) { - throwIfCancellationRequested(config); - - config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(config.headers); - - // Transform request data - config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( - config, - config.transformRequest - ); - - if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { - config.headers.setContentType('application/x-www-form-urlencoded', false); - } - - const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].adapter); - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( - config, - config.transformResponse, - response - ); - - response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(response.headers); - - return response; - }, function onAdapterRejection(reason) { - if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__["default"])(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( - config, - config.transformResponse, - reason.response - ); - reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(reason.response.headers); - } - } - - return Promise.reject(reason); - }); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/mergeConfig.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/core/mergeConfig.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ mergeConfig) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - - - - - -const headersToObject = (thing) => thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? { ...thing } : thing; - -/** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * - * @returns {Object} New object resulting from merging config2 to config1 - */ -function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - const config = {}; - - function getMergedValue(target, source, caseless) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) { - return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call({caseless}, target, source); - } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) { - return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge({}, source); - } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArray(source)) { - return source.slice(); - } - return source; - } - - // eslint-disable-next-line consistent-return - function mergeDeepProperties(a, b, caseless) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { - return getMergedValue(a, b, caseless); - } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) { - return getMergedValue(undefined, a, caseless); - } - } - - // eslint-disable-next-line consistent-return - function valueFromConfig2(a, b) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { - return getMergedValue(undefined, b); - } - } - - // eslint-disable-next-line consistent-return - function defaultToConfig2(a, b) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { - return getMergedValue(undefined, b); - } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) { - return getMergedValue(undefined, a); - } - } - - // eslint-disable-next-line consistent-return - function mergeDirectKeys(a, b, prop) { - if (prop in config2) { - return getMergedValue(a, b); - } else if (prop in config1) { - return getMergedValue(undefined, a); - } - } - - const mergeMap = { - url: valueFromConfig2, - method: valueFromConfig2, - data: valueFromConfig2, - baseURL: defaultToConfig2, - transformRequest: defaultToConfig2, - transformResponse: defaultToConfig2, - paramsSerializer: defaultToConfig2, - timeout: defaultToConfig2, - timeoutMessage: defaultToConfig2, - withCredentials: defaultToConfig2, - withXSRFToken: defaultToConfig2, - adapter: defaultToConfig2, - responseType: defaultToConfig2, - xsrfCookieName: defaultToConfig2, - xsrfHeaderName: defaultToConfig2, - onUploadProgress: defaultToConfig2, - onDownloadProgress: defaultToConfig2, - decompress: defaultToConfig2, - maxContentLength: defaultToConfig2, - maxBodyLength: defaultToConfig2, - beforeRedirect: defaultToConfig2, - transport: defaultToConfig2, - httpAgent: defaultToConfig2, - httpsAgent: defaultToConfig2, - cancelToken: defaultToConfig2, - socketPath: defaultToConfig2, - responseEncoding: defaultToConfig2, - validateStatus: mergeDirectKeys, - headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true) - }; - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { - const merge = mergeMap[prop] || mergeDeepProperties; - const configValue = merge(config1[prop], config2[prop], prop); - (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); - }); - - return config; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/settle.js": -/*!***********************************************!*\ - !*** ./node_modules/axios/lib/core/settle.js ***! - \***********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ settle) -/* harmony export */ }); -/* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - - - - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - * - * @returns {object} The response. - */ -function settle(resolve, reject, response) { - const validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"]( - 'Request failed with status code ' + response.status, - [_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST, _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], - response.config, - response.request, - response - )); - } -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/transformData.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/core/transformData.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ transformData) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - - - - - - -/** - * Transform the data for a request or a response - * - * @param {Array|Function} fns A single function or Array of functions - * @param {?Object} response The response object - * - * @returns {*} The resulting transformed data - */ -function transformData(fns, response) { - const config = this || _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__["default"]; - const context = response || config; - const headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(context.headers); - let data = context.data; - - _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(fns, function transform(fn) { - data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); - }); - - headers.normalize(); - - return data; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/defaults/index.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/defaults/index.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _transitional_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transitional.js */ "./node_modules/axios/lib/defaults/transitional.js"); -/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -/* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/toURLEncodedForm.js */ "./node_modules/axios/lib/helpers/toURLEncodedForm.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js"); - - - - - - - - - - -/** - * It takes a string, tries to parse it, and if it fails, it returns the stringified version - * of the input - * - * @param {any} rawValue - The value to be stringified. - * @param {Function} parser - A function that parses a string into a JavaScript object. - * @param {Function} encoder - A function that takes a value and returns a string. - * - * @returns {string} A stringified version of the rawValue. - */ -function stringifySafely(rawValue, parser, encoder) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(rawValue)) { - try { - (parser || JSON.parse)(rawValue); - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].trim(rawValue); - } catch (e) { - if (e.name !== 'SyntaxError') { - throw e; - } - } - } - - return (encoder || JSON.stringify)(rawValue); -} - -const defaults = { - - transitional: _transitional_js__WEBPACK_IMPORTED_MODULE_1__["default"], - - adapter: ['xhr', 'http', 'fetch'], - - transformRequest: [function transformRequest(data, headers) { - const contentType = headers.getContentType() || ''; - const hasJSONContentType = contentType.indexOf('application/json') > -1; - const isObjectPayload = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(data); - - if (isObjectPayload && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(data)) { - data = new FormData(data); - } - - const isFormData = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(data); - - if (isFormData) { - return hasJSONContentType ? JSON.stringify((0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__["default"])(data)) : data; - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStream(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFile(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data) - ) { - return data; - } - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBufferView(data)) { - return data.buffer; - } - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(data)) { - headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); - return data.toString(); - } - - let isFileList; - - if (isObjectPayload) { - if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { - return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__["default"])(data, this.formSerializer).toString(); - } - - if ((isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { - const _FormData = this.env && this.env.FormData; - - return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__["default"])( - isFileList ? {'files[]': data} : data, - _FormData && new _FormData(), - this.formSerializer - ); - } - } - - if (isObjectPayload || hasJSONContentType ) { - headers.setContentType('application/json', false); - return stringifySafely(data); - } - - return data; - }], - - transformResponse: [function transformResponse(data) { - const transitional = this.transitional || defaults.transitional; - const forcedJSONParsing = transitional && transitional.forcedJSONParsing; - const JSONRequested = this.responseType === 'json'; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isResponse(data) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)) { - return data; - } - - if (data && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { - const silentJSONParsing = transitional && transitional.silentJSONParsing; - const strictJSONParsing = !silentJSONParsing && JSONRequested; - - try { - return JSON.parse(data); - } catch (e) { - if (strictJSONParsing) { - if (e.name === 'SyntaxError') { - throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].ERR_BAD_RESPONSE, this, null, this.response); - } - throw e; - } - } - } - - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - maxBodyLength: -1, - - env: { - FormData: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.FormData, - Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.Blob - }, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - }, - - headers: { - common: { - 'Accept': 'application/json, text/plain, */*', - 'Content-Type': undefined - } - } -}; - -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { - defaults.headers[method] = {}; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); - - -/***/ }), - -/***/ "./node_modules/axios/lib/defaults/transitional.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/defaults/transitional.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - silentJSONParsing: true, - forcedJSONParsing: true, - clarifyTimeoutError: false -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/env/data.js": -/*!********************************************!*\ - !*** ./node_modules/axios/lib/env/data.js ***! - \********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ VERSION: () => (/* binding */ VERSION) -/* harmony export */ }); -const VERSION = "1.7.7"; - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js": -/*!****************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/AxiosURLSearchParams.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); - - - - -/** - * It encodes a string by replacing all characters that are not in the unreserved set with - * their percent-encoded equivalents - * - * @param {string} str - The string to encode. - * - * @returns {string} The encoded string. - */ -function encode(str) { - const charMap = { - '!': '%21', - "'": '%27', - '(': '%28', - ')': '%29', - '~': '%7E', - '%20': '+', - '%00': '\x00' - }; - return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { - return charMap[match]; - }); -} - -/** - * It takes a params object and converts it to a FormData object - * - * @param {Object} params - The parameters to be converted to a FormData object. - * @param {Object} options - The options object passed to the Axios constructor. - * - * @returns {void} - */ -function AxiosURLSearchParams(params, options) { - this._pairs = []; - - params && (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, this, options); -} - -const prototype = AxiosURLSearchParams.prototype; - -prototype.append = function append(name, value) { - this._pairs.push([name, value]); -}; - -prototype.toString = function toString(encoder) { - const _encode = encoder ? function(value) { - return encoder.call(this, value, encode); - } : encode; - - return this._pairs.map(function each(pair) { - return _encode(pair[0]) + '=' + _encode(pair[1]); - }, '').join('&'); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosURLSearchParams); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/HttpStatusCode.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/HttpStatusCode.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -const HttpStatusCode = { - Continue: 100, - SwitchingProtocols: 101, - Processing: 102, - EarlyHints: 103, - Ok: 200, - Created: 201, - Accepted: 202, - NonAuthoritativeInformation: 203, - NoContent: 204, - ResetContent: 205, - PartialContent: 206, - MultiStatus: 207, - AlreadyReported: 208, - ImUsed: 226, - MultipleChoices: 300, - MovedPermanently: 301, - Found: 302, - SeeOther: 303, - NotModified: 304, - UseProxy: 305, - Unused: 306, - TemporaryRedirect: 307, - PermanentRedirect: 308, - BadRequest: 400, - Unauthorized: 401, - PaymentRequired: 402, - Forbidden: 403, - NotFound: 404, - MethodNotAllowed: 405, - NotAcceptable: 406, - ProxyAuthenticationRequired: 407, - RequestTimeout: 408, - Conflict: 409, - Gone: 410, - LengthRequired: 411, - PreconditionFailed: 412, - PayloadTooLarge: 413, - UriTooLong: 414, - UnsupportedMediaType: 415, - RangeNotSatisfiable: 416, - ExpectationFailed: 417, - ImATeapot: 418, - MisdirectedRequest: 421, - UnprocessableEntity: 422, - Locked: 423, - FailedDependency: 424, - TooEarly: 425, - UpgradeRequired: 426, - PreconditionRequired: 428, - TooManyRequests: 429, - RequestHeaderFieldsTooLarge: 431, - UnavailableForLegalReasons: 451, - InternalServerError: 500, - NotImplemented: 501, - BadGateway: 502, - ServiceUnavailable: 503, - GatewayTimeout: 504, - HttpVersionNotSupported: 505, - VariantAlsoNegotiates: 506, - InsufficientStorage: 507, - LoopDetected: 508, - NotExtended: 510, - NetworkAuthenticationRequired: 511, -}; - -Object.entries(HttpStatusCode).forEach(([key, value]) => { - HttpStatusCode[value] = key; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HttpStatusCode); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/bind.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/helpers/bind.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ bind) -/* harmony export */ }); - - -function bind(fn, thisArg) { - return function wrap() { - return fn.apply(thisArg, arguments); - }; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/buildURL.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/buildURL.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ buildURL) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js"); - - - - - -/** - * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their - * URI encoded counterparts - * - * @param {string} val The value to be encoded. - * - * @returns {string} The encoded value. - */ -function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @param {?object} options - * - * @returns {string} The formatted url - */ -function buildURL(url, params, options) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - const _encode = options && options.encode || encode; - - const serializeFn = options && options.serialize; - - let serializedParams; - - if (serializeFn) { - serializedParams = serializeFn(params, options); - } else { - serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(params) ? - params.toString() : - new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"](params, options).toString(_encode); - } - - if (serializedParams) { - const hashmarkIndex = url.indexOf("#"); - - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/combineURLs.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/combineURLs.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ combineURLs) -/* harmony export */ }); - - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * - * @returns {string} The combined URL - */ -function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/composeSignals.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/composeSignals.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -const composeSignals = (signals, timeout) => { - const {length} = (signals = signals ? signals.filter(Boolean) : []); - - if (timeout || length) { - let controller = new AbortController(); - - let aborted; - - const onabort = function (reason) { - if (!aborted) { - aborted = true; - unsubscribe(); - const err = reason instanceof Error ? reason : this.reason; - controller.abort(err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? err : new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_1__["default"](err instanceof Error ? err.message : err)); - } - } - - let timer = timeout && setTimeout(() => { - timer = null; - onabort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](`timeout ${timeout} of ms exceeded`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ETIMEDOUT)) - }, timeout) - - const unsubscribe = () => { - if (signals) { - timer && clearTimeout(timer); - timer = null; - signals.forEach(signal => { - signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort); - }); - signals = null; - } - } - - signals.forEach((signal) => signal.addEventListener('abort', onabort)); - - const {signal} = controller; - - signal.unsubscribe = () => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(unsubscribe); - - return signal; - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (composeSignals); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/cookies.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/helpers/cookies.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ? - - // Standard browser envs support document.cookie - { - write(name, value, expires, path, domain, secure) { - const cookie = [name + '=' + encodeURIComponent(value)]; - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(path) && cookie.push('path=' + path); - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(domain) && cookie.push('domain=' + domain); - - secure === true && cookie.push('secure'); - - document.cookie = cookie.join('; '); - }, - - read(name) { - const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove(name) { - this.write(name, '', Date.now() - 86400000); - } - } - - : - - // Non-standard browser env (web workers, react-native) lack needed support. - { - write() {}, - read() { - return null; - }, - remove() {} - }); - - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/formDataToJSON.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/formDataToJSON.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -/** - * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] - * - * @param {string} name - The name of the property to get. - * - * @returns An array of strings. - */ -function parsePropPath(name) { - // foo[x][y][z] - // foo.x.y.z - // foo-x-y-z - // foo x y z - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map(match => { - return match[0] === '[]' ? '' : match[1] || match[0]; - }); -} - -/** - * Convert an array to an object. - * - * @param {Array} arr - The array to convert to an object. - * - * @returns An object with the same keys and values as the array. - */ -function arrayToObject(arr) { - const obj = {}; - const keys = Object.keys(arr); - let i; - const len = keys.length; - let key; - for (i = 0; i < len; i++) { - key = keys[i]; - obj[key] = arr[key]; - } - return obj; -} - -/** - * It takes a FormData object and returns a JavaScript object - * - * @param {string} formData The FormData object to convert to JSON. - * - * @returns {Object | null} The converted object. - */ -function formDataToJSON(formData) { - function buildPath(path, value, target, index) { - let name = path[index++]; - - if (name === '__proto__') return true; - - const isNumericKey = Number.isFinite(+name); - const isLast = index >= path.length; - name = !name && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target) ? target.length : name; - - if (isLast) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name)) { - target[name] = [target[name], value]; - } else { - target[name] = value; - } - - return !isNumericKey; - } - - if (!target[name] || !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(target[name])) { - target[name] = []; - } - - const result = buildPath(path, value, target[name], index); - - if (result && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target[name])) { - target[name] = arrayToObject(target[name]); - } - - return !isNumericKey; - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(formData) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(formData.entries)) { - const obj = {}; - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEachEntry(formData, (name, value) => { - buildPath(parsePropPath(name), value, obj, 0); - }); - - return obj; - } - - return null; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (formDataToJSON); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ isAbsoluteURL) -/* harmony export */ }); - - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isAxiosError.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isAxiosError.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ isAxiosError) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -/** - * Determines whether the payload is an error thrown by Axios - * - * @param {*} payload The value to test - * - * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false - */ -function isAxiosError(payload) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(payload) && (payload.isAxiosError === true); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js": -/*!***********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); - - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ? - -// Standard browser envs have full support of the APIs needed to test -// whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - const msie = _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent); - const urlParsingNode = document.createElement('a'); - let originURL; - - /** - * Parse a URL to discover its components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - let href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - const parsed = (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })()); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/null.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/helpers/null.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -// eslint-disable-next-line strict -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (null); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/parseHeaders.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -// RawAxiosHeaders whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toObjectSet([ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]); - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} rawHeaders Headers needing to be parsed - * - * @returns {Object} Headers parsed into an object - */ -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rawHeaders => { - const parsed = {}; - let key; - let val; - let i; - - rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { - i = line.indexOf(':'); - key = line.substring(0, i).trim().toLowerCase(); - val = line.substring(i + 1).trim(); - - if (!key || (parsed[key] && ignoreDuplicateOf[key])) { - return; - } - - if (key === 'set-cookie') { - if (parsed[key]) { - parsed[key].push(val); - } else { - parsed[key] = [val]; - } - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - }); - - return parsed; -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/parseProtocol.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/parseProtocol.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ parseProtocol) -/* harmony export */ }); - - -function parseProtocol(url) { - const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); - return match && match[1] || ''; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/progressEventReducer.js": -/*!****************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/progressEventReducer.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ asyncDecorator: () => (/* binding */ asyncDecorator), -/* harmony export */ progressEventDecorator: () => (/* binding */ progressEventDecorator), -/* harmony export */ progressEventReducer: () => (/* binding */ progressEventReducer) -/* harmony export */ }); -/* harmony import */ var _speedometer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./speedometer.js */ "./node_modules/axios/lib/helpers/speedometer.js"); -/* harmony import */ var _throttle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./throttle.js */ "./node_modules/axios/lib/helpers/throttle.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -const progressEventReducer = (listener, isDownloadStream, freq = 3) => { - let bytesNotified = 0; - const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250); - - return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e => { - const loaded = e.loaded; - const total = e.lengthComputable ? e.total : undefined; - const progressBytes = loaded - bytesNotified; - const rate = _speedometer(progressBytes); - const inRange = loaded <= total; - - bytesNotified = loaded; - - const data = { - loaded, - total, - progress: total ? (loaded / total) : undefined, - bytes: progressBytes, - rate: rate ? rate : undefined, - estimated: rate && total && inRange ? (total - loaded) / rate : undefined, - event: e, - lengthComputable: total != null, - [isDownloadStream ? 'download' : 'upload']: true - }; - - listener(data); - }, freq); -} - -const progressEventDecorator = (total, throttled) => { - const lengthComputable = total != null; - - return [(loaded) => throttled[0]({ - lengthComputable, - total, - loaded - }), throttled[1]]; -} - -const asyncDecorator = (fn) => (...args) => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(() => fn(...args)); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/resolveConfig.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/resolveConfig.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./isURLSameOrigin.js */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js"); -/* harmony import */ var _cookies_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cookies.js */ "./node_modules/axios/lib/helpers/cookies.js"); -/* harmony import */ var _core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js"); -/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _buildURL_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js"); - - - - - - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((config) => { - const newConfig = (0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, config); - - let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig; - - newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(headers); - - newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__["default"])(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer); - - // HTTP basic authentication - if (auth) { - headers.set('Authorization', 'Basic ' + - btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')) - ); - } - - let contentType; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_4__["default"].isFormData(data)) { - if (_platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserWebWorkerEnv) { - headers.setContentType(undefined); // Let the browser set it - } else if ((contentType = headers.getContentType()) !== false) { - // fix semicolon duplication issue for ReactNative FormData implementation - const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; - headers.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); - } - } - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - - if (_platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserEnv) { - withXSRFToken && _utils_js__WEBPACK_IMPORTED_MODULE_4__["default"].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); - - if (withXSRFToken || (withXSRFToken !== false && (0,_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_6__["default"])(newConfig.url))) { - // Add xsrf header - const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__WEBPACK_IMPORTED_MODULE_7__["default"].read(xsrfCookieName); - - if (xsrfValue) { - headers.set(xsrfHeaderName, xsrfValue); - } - } - } - - return newConfig; -}); - - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/speedometer.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/speedometer.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/** - * Calculate data maxRate - * @param {Number} [samplesCount= 10] - * @param {Number} [min= 1000] - * @returns {Function} - */ -function speedometer(samplesCount, min) { - samplesCount = samplesCount || 10; - const bytes = new Array(samplesCount); - const timestamps = new Array(samplesCount); - let head = 0; - let tail = 0; - let firstSampleTS; - - min = min !== undefined ? min : 1000; - - return function push(chunkLength) { - const now = Date.now(); - - const startedAt = timestamps[tail]; - - if (!firstSampleTS) { - firstSampleTS = now; - } - - bytes[head] = chunkLength; - timestamps[head] = now; - - let i = tail; - let bytesCount = 0; - - while (i !== head) { - bytesCount += bytes[i++]; - i = i % samplesCount; - } - - head = (head + 1) % samplesCount; - - if (head === tail) { - tail = (tail + 1) % samplesCount; - } - - if (now - firstSampleTS < min) { - return; - } - - const passed = startedAt && now - startedAt; - - return passed ? Math.round(bytesCount * 1000 / passed) : undefined; - }; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (speedometer); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/spread.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/helpers/spread.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ spread) -/* harmony export */ }); - - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * - * @returns {Function} - */ -function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/throttle.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/throttle.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Throttle decorator - * @param {Function} fn - * @param {Number} freq - * @return {Function} - */ -function throttle(fn, freq) { - let timestamp = 0; - let threshold = 1000 / freq; - let lastArgs; - let timer; - - const invoke = (args, now = Date.now()) => { - timestamp = now; - lastArgs = null; - if (timer) { - clearTimeout(timer); - timer = null; - } - fn.apply(null, args); - } - - const throttled = (...args) => { - const now = Date.now(); - const passed = now - timestamp; - if ( passed >= threshold) { - invoke(args, now); - } else { - lastArgs = args; - if (!timer) { - timer = setTimeout(() => { - timer = null; - invoke(lastArgs) - }, threshold - passed); - } - } - } - - const flush = () => lastArgs && invoke(lastArgs); - - return [throttled, flush]; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (throttle); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/toFormData.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/toFormData.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/node/classes/FormData.js */ "./node_modules/axios/lib/helpers/null.js"); - - - - -// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored - - -/** - * Determines if the given thing is a array or js object. - * - * @param {string} thing - The object or array to be visited. - * - * @returns {boolean} - */ -function isVisitable(thing) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(thing) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(thing); -} - -/** - * It removes the brackets from the end of a string - * - * @param {string} key - The key of the parameter. - * - * @returns {string} the key without the brackets. - */ -function removeBrackets(key) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]') ? key.slice(0, -2) : key; -} - -/** - * It takes a path, a key, and a boolean, and returns a string - * - * @param {string} path - The path to the current key. - * @param {string} key - The key of the current object being iterated over. - * @param {string} dots - If true, the key will be rendered with dots instead of brackets. - * - * @returns {string} The path to the current key. - */ -function renderKey(path, key, dots) { - if (!path) return key; - return path.concat(key).map(function each(token, i) { - // eslint-disable-next-line no-param-reassign - token = removeBrackets(token); - return !dots && i ? '[' + token + ']' : token; - }).join(dots ? '.' : ''); -} - -/** - * If the array is an array and none of its elements are visitable, then it's a flat array. - * - * @param {Array} arr - The array to check - * - * @returns {boolean} - */ -function isFlatArray(arr) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(arr) && !arr.some(isVisitable); -} - -const predicates = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"], {}, null, function filter(prop) { - return /^is[A-Z]/.test(prop); -}); - -/** - * Convert a data object to FormData - * - * @param {Object} obj - * @param {?Object} [formData] - * @param {?Object} [options] - * @param {Function} [options.visitor] - * @param {Boolean} [options.metaTokens = true] - * @param {Boolean} [options.dots = false] - * @param {?Boolean} [options.indexes = false] - * - * @returns {Object} - **/ - -/** - * It converts an object into a FormData object - * - * @param {Object} obj - The object to convert to form data. - * @param {string} formData - The FormData object to append to. - * @param {Object} options - * - * @returns - */ -function toFormData(obj, formData, options) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) { - throw new TypeError('target must be an object'); - } - - // eslint-disable-next-line no-param-reassign - formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"] || FormData)(); - - // eslint-disable-next-line no-param-reassign - options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(options, { - metaTokens: true, - dots: false, - indexes: false - }, false, function defined(option, source) { - // eslint-disable-next-line no-eq-null,eqeqeq - return !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(source[option]); - }); - - const metaTokens = options.metaTokens; - // eslint-disable-next-line no-use-before-define - const visitor = options.visitor || defaultVisitor; - const dots = options.dots; - const indexes = options.indexes; - const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; - const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData); - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) { - throw new TypeError('visitor must be a function'); - } - - function convertValue(value) { - if (value === null) return ''; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isDate(value)) { - return value.toISOString(); - } - - if (!useBlob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(value)) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Blob is not supported. Use a Buffer instead.'); - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isTypedArray(value)) { - return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); - } - - return value; - } - - /** - * Default visitor. - * - * @param {*} value - * @param {String|Number} key - * @param {Array} path - * @this {FormData} - * - * @returns {boolean} return true to visit the each prop of the value recursively - */ - function defaultVisitor(value, key, path) { - let arr = value; - - if (value && !path && typeof value === 'object') { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '{}')) { - // eslint-disable-next-line no-param-reassign - key = metaTokens ? key : key.slice(0, -2); - // eslint-disable-next-line no-param-reassign - value = JSON.stringify(value); - } else if ( - (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) && isFlatArray(value)) || - ((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value)) - )) { - // eslint-disable-next-line no-param-reassign - key = removeBrackets(key); - - arr.forEach(function each(el, index) { - !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && formData.append( - // eslint-disable-next-line no-nested-ternary - indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), - convertValue(el) - ); - }); - return false; - } - } - - if (isVisitable(value)) { - return true; - } - - formData.append(renderKey(path, key, dots), convertValue(value)); - - return false; - } - - const stack = []; - - const exposedHelpers = Object.assign(predicates, { - defaultVisitor, - convertValue, - isVisitable - }); - - function build(value, path) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value)) return; - - if (stack.indexOf(value) !== -1) { - throw Error('Circular reference detected in ' + path.join('.')); - } - - stack.push(value); - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(value, function each(el, key) { - const result = !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && visitor.call( - formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(key) ? key.trim() : key, path, exposedHelpers - ); - - if (result === true) { - build(el, path ? path.concat(key) : [key]); - } - }); - - stack.pop(); - } - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) { - throw new TypeError('data must be an object'); - } - - build(obj); - - return formData; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toFormData); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/toURLEncodedForm.js": -/*!************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/toURLEncodedForm.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ toURLEncodedForm) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); - - - - - - -function toURLEncodedForm(data, options) { - return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].classes.URLSearchParams(), Object.assign({ - visitor: function(value, key, path, helpers) { - if (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isBuffer(value)) { - this.append(key, value.toString('base64')); - return false; - } - - return helpers.defaultVisitor.apply(this, arguments); - } - }, options)); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/trackStream.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/trackStream.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ readBytes: () => (/* binding */ readBytes), -/* harmony export */ streamChunk: () => (/* binding */ streamChunk), -/* harmony export */ trackStream: () => (/* binding */ trackStream) -/* harmony export */ }); - -const streamChunk = function* (chunk, chunkSize) { - let len = chunk.byteLength; - - if (!chunkSize || len < chunkSize) { - yield chunk; - return; - } - - let pos = 0; - let end; - - while (pos < len) { - end = pos + chunkSize; - yield chunk.slice(pos, end); - pos = end; - } -} - -const readBytes = async function* (iterable, chunkSize) { - for await (const chunk of readStream(iterable)) { - yield* streamChunk(chunk, chunkSize); - } -} - -const readStream = async function* (stream) { - if (stream[Symbol.asyncIterator]) { - yield* stream; - return; - } - - const reader = stream.getReader(); - try { - for (;;) { - const {done, value} = await reader.read(); - if (done) { - break; - } - yield value; - } - } finally { - await reader.cancel(); - } -} - -const trackStream = (stream, chunkSize, onProgress, onFinish) => { - const iterator = readBytes(stream, chunkSize); - - let bytes = 0; - let done; - let _onFinish = (e) => { - if (!done) { - done = true; - onFinish && onFinish(e); - } - } - - return new ReadableStream({ - async pull(controller) { - try { - const {done, value} = await iterator.next(); - - if (done) { - _onFinish(); - controller.close(); - return; - } - - let len = value.byteLength; - if (onProgress) { - let loadedBytes = bytes += len; - onProgress(loadedBytes); - } - controller.enqueue(new Uint8Array(value)); - } catch (err) { - _onFinish(err); - throw err; - } - }, - cancel(reason) { - _onFinish(reason); - return iterator.return(); - } - }, { - highWaterMark: 2 - }) -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/validator.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/validator.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../env/data.js */ "./node_modules/axios/lib/env/data.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - - - - - -const validators = {}; - -// eslint-disable-next-line func-names -['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { - validators[type] = function validator(thing) { - return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; - }; -}); - -const deprecatedWarnings = {}; - -/** - * Transitional option validator - * - * @param {function|boolean?} validator - set to false if the transitional option has been removed - * @param {string?} version - deprecated version / removed since version - * @param {string?} message - some message with additional info - * - * @returns {function} - */ -validators.transitional = function transitional(validator, version, message) { - function formatMessage(opt, desc) { - return '[Axios v' + _env_data_js__WEBPACK_IMPORTED_MODULE_0__.VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); - } - - // eslint-disable-next-line func-names - return (value, opt, opts) => { - if (validator === false) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]( - formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), - _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_DEPRECATED - ); - } - - if (version && !deprecatedWarnings[opt]) { - deprecatedWarnings[opt] = true; - // eslint-disable-next-line no-console - console.warn( - formatMessage( - opt, - ' has been deprecated since v' + version + ' and will be removed in the near future' - ) - ); - } - - return validator ? validator(value, opt, opts) : true; - }; -}; - -/** - * Assert object's properties type - * - * @param {object} options - * @param {object} schema - * @param {boolean?} allowUnknown - * - * @returns {object} - */ - -function assertOptions(options, schema, allowUnknown) { - if (typeof options !== 'object') { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('options must be an object', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE); - } - const keys = Object.keys(options); - let i = keys.length; - while (i-- > 0) { - const opt = keys[i]; - const validator = schema[opt]; - if (validator) { - const value = options[opt]; - const result = value === undefined || validator(value, opt, options); - if (result !== true) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('option ' + opt + ' must be ' + result, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE); - } - continue; - } - if (allowUnknown !== true) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('Unknown option ' + opt, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION); - } - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - assertOptions, - validators -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/classes/Blob.js": -/*!*****************************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/classes/Blob.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof Blob !== 'undefined' ? Blob : null); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/classes/FormData.js": -/*!*********************************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/classes/FormData.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof FormData !== 'undefined' ? FormData : null); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js": -/*!****************************************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js ***! - \****************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/index.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"); -/* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/FormData.js */ "./node_modules/axios/lib/platform/browser/classes/FormData.js"); -/* harmony import */ var _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./classes/Blob.js */ "./node_modules/axios/lib/platform/browser/classes/Blob.js"); - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - isBrowser: true, - classes: { - URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"], - FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"], - Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"] - }, - protocols: ['http', 'https', 'file', 'blob', 'url', 'data'] -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/common/utils.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/platform/common/utils.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ hasBrowserEnv: () => (/* binding */ hasBrowserEnv), -/* harmony export */ hasStandardBrowserEnv: () => (/* binding */ hasStandardBrowserEnv), -/* harmony export */ hasStandardBrowserWebWorkerEnv: () => (/* binding */ hasStandardBrowserWebWorkerEnv), -/* harmony export */ navigator: () => (/* binding */ _navigator), -/* harmony export */ origin: () => (/* binding */ origin) -/* harmony export */ }); -const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; - -const _navigator = typeof navigator === 'object' && navigator || undefined; - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - * - * @returns {boolean} - */ -const hasStandardBrowserEnv = hasBrowserEnv && - (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); - -/** - * Determine if we're running in a standard browser webWorker environment - * - * Although the `isStandardBrowserEnv` method indicates that - * `allows axios to run in a web worker`, the WebWorker will still be - * filtered out due to its judgment standard - * `typeof window !== 'undefined' && typeof document !== 'undefined'`. - * This leads to a problem when axios post `FormData` in webWorker - */ -const hasStandardBrowserWebWorkerEnv = (() => { - return ( - typeof WorkerGlobalScope !== 'undefined' && - // eslint-disable-next-line no-undef - self instanceof WorkerGlobalScope && - typeof self.importScripts === 'function' - ); -})(); - -const origin = hasBrowserEnv && window.location.href || 'http://localhost'; - - - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/index.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/platform/index.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _node_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node/index.js */ "./node_modules/axios/lib/platform/browser/index.js"); -/* harmony import */ var _common_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/utils.js */ "./node_modules/axios/lib/platform/common/utils.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - ..._common_utils_js__WEBPACK_IMPORTED_MODULE_0__, - ..._node_index_js__WEBPACK_IMPORTED_MODULE_1__["default"] -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/utils.js": -/*!*****************************************!*\ - !*** ./node_modules/axios/lib/utils.js ***! - \*****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js"); - - - - -// utils is a library of generic helper functions non-specific to axios - -const {toString} = Object.prototype; -const {getPrototypeOf} = Object; - -const kindOf = (cache => thing => { - const str = toString.call(thing); - return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); -})(Object.create(null)); - -const kindOfTest = (type) => { - type = type.toLowerCase(); - return (thing) => kindOf(thing) === type -} - -const typeOfTest = type => thing => typeof thing === type; - -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * - * @returns {boolean} True if value is an Array, otherwise false - */ -const {isArray} = Array; - -/** - * Determine if a value is undefined - * - * @param {*} val The value to test - * - * @returns {boolean} True if the value is undefined, otherwise false - */ -const isUndefined = typeOfTest('undefined'); - -/** - * Determine if a value is a Buffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Buffer, otherwise false - */ -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); -} - -/** - * Determine if a value is an ArrayBuffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -const isArrayBuffer = kindOfTest('ArrayBuffer'); - - -/** - * Determine if a value is a view on an ArrayBuffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - let result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); - } - return result; -} - -/** - * Determine if a value is a String - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a String, otherwise false - */ -const isString = typeOfTest('string'); - -/** - * Determine if a value is a Function - * - * @param {*} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -const isFunction = typeOfTest('function'); - -/** - * Determine if a value is a Number - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Number, otherwise false - */ -const isNumber = typeOfTest('number'); - -/** - * Determine if a value is an Object - * - * @param {*} thing The value to test - * - * @returns {boolean} True if value is an Object, otherwise false - */ -const isObject = (thing) => thing !== null && typeof thing === 'object'; - -/** - * Determine if a value is a Boolean - * - * @param {*} thing The value to test - * @returns {boolean} True if value is a Boolean, otherwise false - */ -const isBoolean = thing => thing === true || thing === false; - -/** - * Determine if a value is a plain Object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a plain Object, otherwise false - */ -const isPlainObject = (val) => { - if (kindOf(val) !== 'object') { - return false; - } - - const prototype = getPrototypeOf(val); - return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); -} - -/** - * Determine if a value is a Date - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Date, otherwise false - */ -const isDate = kindOfTest('Date'); - -/** - * Determine if a value is a File - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a File, otherwise false - */ -const isFile = kindOfTest('File'); - -/** - * Determine if a value is a Blob - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Blob, otherwise false - */ -const isBlob = kindOfTest('Blob'); - -/** - * Determine if a value is a FileList - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a File, otherwise false - */ -const isFileList = kindOfTest('FileList'); - -/** - * Determine if a value is a Stream - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Stream, otherwise false - */ -const isStream = (val) => isObject(val) && isFunction(val.pipe); - -/** - * Determine if a value is a FormData - * - * @param {*} thing The value to test - * - * @returns {boolean} True if value is an FormData, otherwise false - */ -const isFormData = (thing) => { - let kind; - return thing && ( - (typeof FormData === 'function' && thing instanceof FormData) || ( - isFunction(thing.append) && ( - (kind = kindOf(thing)) === 'formdata' || - // detect form-data instance - (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') - ) - ) - ) -} - -/** - * Determine if a value is a URLSearchParams object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -const isURLSearchParams = kindOfTest('URLSearchParams'); - -const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest); - -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * - * @returns {String} The String freed of excess whitespace - */ -const trim = (str) => str.trim ? - str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - * - * @param {Boolean} [allOwnKeys = false] - * @returns {any} - */ -function forEach(obj, fn, {allOwnKeys = false} = {}) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - let i; - let l; - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); - const len = keys.length; - let key; - - for (i = 0; i < len; i++) { - key = keys[i]; - fn.call(null, obj[key], key, obj); - } - } -} - -function findKey(obj, key) { - key = key.toLowerCase(); - const keys = Object.keys(obj); - let i = keys.length; - let _key; - while (i-- > 0) { - _key = keys[i]; - if (key === _key.toLowerCase()) { - return _key; - } - } - return null; -} - -const _global = (() => { - /*eslint no-undef:0*/ - if (typeof globalThis !== "undefined") return globalThis; - return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global) -})(); - -const isContextDefined = (context) => !isUndefined(context) && context !== _global; - -/** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - const {caseless} = isContextDefined(this) && this || {}; - const result = {}; - const assignValue = (val, key) => { - const targetKey = caseless && findKey(result, key) || key; - if (isPlainObject(result[targetKey]) && isPlainObject(val)) { - result[targetKey] = merge(result[targetKey], val); - } else if (isPlainObject(val)) { - result[targetKey] = merge({}, val); - } else if (isArray(val)) { - result[targetKey] = val.slice(); - } else { - result[targetKey] = val; - } - } - - for (let i = 0, l = arguments.length; i < l; i++) { - arguments[i] && forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * - * @param {Boolean} [allOwnKeys] - * @returns {Object} The resulting value of object a - */ -const extend = (a, b, thisArg, {allOwnKeys}= {}) => { - forEach(b, (val, key) => { - if (thisArg && isFunction(val)) { - a[key] = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__["default"])(val, thisArg); - } else { - a[key] = val; - } - }, {allOwnKeys}); - return a; -} - -/** - * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - * - * @param {string} content with BOM - * - * @returns {string} content value without BOM - */ -const stripBOM = (content) => { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -} - -/** - * Inherit the prototype methods from one constructor into another - * @param {function} constructor - * @param {function} superConstructor - * @param {object} [props] - * @param {object} [descriptors] - * - * @returns {void} - */ -const inherits = (constructor, superConstructor, props, descriptors) => { - constructor.prototype = Object.create(superConstructor.prototype, descriptors); - constructor.prototype.constructor = constructor; - Object.defineProperty(constructor, 'super', { - value: superConstructor.prototype - }); - props && Object.assign(constructor.prototype, props); -} - -/** - * Resolve object with deep prototype chain to a flat object - * @param {Object} sourceObj source object - * @param {Object} [destObj] - * @param {Function|Boolean} [filter] - * @param {Function} [propFilter] - * - * @returns {Object} - */ -const toFlatObject = (sourceObj, destObj, filter, propFilter) => { - let props; - let i; - let prop; - const merged = {}; - - destObj = destObj || {}; - // eslint-disable-next-line no-eq-null,eqeqeq - if (sourceObj == null) return destObj; - - do { - props = Object.getOwnPropertyNames(sourceObj); - i = props.length; - while (i-- > 0) { - prop = props[i]; - if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { - destObj[prop] = sourceObj[prop]; - merged[prop] = true; - } - } - sourceObj = filter !== false && getPrototypeOf(sourceObj); - } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); - - return destObj; -} - -/** - * Determines whether a string ends with the characters of a specified string - * - * @param {String} str - * @param {String} searchString - * @param {Number} [position= 0] - * - * @returns {boolean} - */ -const endsWith = (str, searchString, position) => { - str = String(str); - if (position === undefined || position > str.length) { - position = str.length; - } - position -= searchString.length; - const lastIndex = str.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; -} - - -/** - * Returns new array from array like object or null if failed - * - * @param {*} [thing] - * - * @returns {?Array} - */ -const toArray = (thing) => { - if (!thing) return null; - if (isArray(thing)) return thing; - let i = thing.length; - if (!isNumber(i)) return null; - const arr = new Array(i); - while (i-- > 0) { - arr[i] = thing[i]; - } - return arr; -} - -/** - * Checking if the Uint8Array exists and if it does, it returns a function that checks if the - * thing passed in is an instance of Uint8Array - * - * @param {TypedArray} - * - * @returns {Array} - */ -// eslint-disable-next-line func-names -const isTypedArray = (TypedArray => { - // eslint-disable-next-line func-names - return thing => { - return TypedArray && thing instanceof TypedArray; - }; -})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); - -/** - * For each entry in the object, call the function with the key and value. - * - * @param {Object} obj - The object to iterate over. - * @param {Function} fn - The function to call for each entry. - * - * @returns {void} - */ -const forEachEntry = (obj, fn) => { - const generator = obj && obj[Symbol.iterator]; - - const iterator = generator.call(obj); - - let result; - - while ((result = iterator.next()) && !result.done) { - const pair = result.value; - fn.call(obj, pair[0], pair[1]); - } -} - -/** - * It takes a regular expression and a string, and returns an array of all the matches - * - * @param {string} regExp - The regular expression to match against. - * @param {string} str - The string to search. - * - * @returns {Array} - */ -const matchAll = (regExp, str) => { - let matches; - const arr = []; - - while ((matches = regExp.exec(str)) !== null) { - arr.push(matches); - } - - return arr; -} - -/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ -const isHTMLForm = kindOfTest('HTMLFormElement'); - -const toCamelCase = str => { - return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, - function replacer(m, p1, p2) { - return p1.toUpperCase() + p2; - } - ); -}; - -/* Creating a function that will check if an object has a property. */ -const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); - -/** - * Determine if a value is a RegExp object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a RegExp object, otherwise false - */ -const isRegExp = kindOfTest('RegExp'); - -const reduceDescriptors = (obj, reducer) => { - const descriptors = Object.getOwnPropertyDescriptors(obj); - const reducedDescriptors = {}; - - forEach(descriptors, (descriptor, name) => { - let ret; - if ((ret = reducer(descriptor, name, obj)) !== false) { - reducedDescriptors[name] = ret || descriptor; - } - }); - - Object.defineProperties(obj, reducedDescriptors); -} - -/** - * Makes all methods read-only - * @param {Object} obj - */ - -const freezeMethods = (obj) => { - reduceDescriptors(obj, (descriptor, name) => { - // skip restricted props in strict mode - if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { - return false; - } - - const value = obj[name]; - - if (!isFunction(value)) return; - - descriptor.enumerable = false; - - if ('writable' in descriptor) { - descriptor.writable = false; - return; - } - - if (!descriptor.set) { - descriptor.set = () => { - throw Error('Can not rewrite read-only method \'' + name + '\''); - }; - } - }); -} - -const toObjectSet = (arrayOrString, delimiter) => { - const obj = {}; - - const define = (arr) => { - arr.forEach(value => { - obj[value] = true; - }); - } - - isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); - - return obj; -} - -const noop = () => {} - -const toFiniteNumber = (value, defaultValue) => { - return value != null && Number.isFinite(value = +value) ? value : defaultValue; -} - -const ALPHA = 'abcdefghijklmnopqrstuvwxyz' - -const DIGIT = '0123456789'; - -const ALPHABET = { - DIGIT, - ALPHA, - ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT -} - -const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str = ''; - const {length} = alphabet; - while (size--) { - str += alphabet[Math.random() * length|0] - } - - return str; -} - -/** - * If the thing is a FormData object, return true, otherwise return false. - * - * @param {unknown} thing - The thing to check. - * - * @returns {boolean} - */ -function isSpecCompliantForm(thing) { - return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]); -} - -const toJSONObject = (obj) => { - const stack = new Array(10); - - const visit = (source, i) => { - - if (isObject(source)) { - if (stack.indexOf(source) >= 0) { - return; - } - - if(!('toJSON' in source)) { - stack[i] = source; - const target = isArray(source) ? [] : {}; - - forEach(source, (value, key) => { - const reducedValue = visit(value, i + 1); - !isUndefined(reducedValue) && (target[key] = reducedValue); - }); - - stack[i] = undefined; - - return target; - } - } - - return source; - } - - return visit(obj, 0); -} - -const isAsyncFn = kindOfTest('AsyncFunction'); - -const isThenable = (thing) => - thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); - -// original code -// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 - -const _setImmediate = ((setImmediateSupported, postMessageSupported) => { - if (setImmediateSupported) { - return setImmediate; - } - - return postMessageSupported ? ((token, callbacks) => { - _global.addEventListener("message", ({source, data}) => { - if (source === _global && data === token) { - callbacks.length && callbacks.shift()(); - } - }, false); - - return (cb) => { - callbacks.push(cb); - _global.postMessage(token, "*"); - } - })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); -})( - typeof setImmediate === 'function', - isFunction(_global.postMessage) -); - -const asap = typeof queueMicrotask !== 'undefined' ? - queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate); - -// ********************* - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - isArray, - isArrayBuffer, - isBuffer, - isFormData, - isArrayBufferView, - isString, - isNumber, - isBoolean, - isObject, - isPlainObject, - isReadableStream, - isRequest, - isResponse, - isHeaders, - isUndefined, - isDate, - isFile, - isBlob, - isRegExp, - isFunction, - isStream, - isURLSearchParams, - isTypedArray, - isFileList, - forEach, - merge, - extend, - trim, - stripBOM, - inherits, - toFlatObject, - kindOf, - kindOfTest, - endsWith, - toArray, - forEachEntry, - matchAll, - isHTMLForm, - hasOwnProperty, - hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection - reduceDescriptors, - freezeMethods, - toObjectSet, - toCamelCase, - noop, - toFiniteNumber, - findKey, - global: _global, - isContextDefined, - ALPHABET, - generateString, - isSpecCompliantForm, - toJSONObject, - isAsyncFn, - isThenable, - setImmediate: _setImmediate, - asap -}); - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/compat get default export */ -/******/ (() => { -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = (module) => { -/******/ var getter = module && module.__esModule ? -/******/ () => (module['default']) : -/******/ () => (module); -/******/ __webpack_require__.d(getter, { a: getter }); -/******/ return getter; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; -// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. -(() => { -/*!*******************************!*\ - !*** ./admin/src/js/admin.js ***! - \*******************************/ -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _licenses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./licenses */ "./admin/src/js/licenses.js"); - -var instant_images = instant_images || {}; -jQuery(document).ready(function ($) { - 'use strict'; - - // Media Uploader Modal - instant_images.setEditor = function (frame) { - var Parent = wp.media.view.Router; - wp.media.view.Router = Parent.extend({ - addNav: function addNav() { - // Button - var $a = $(' ' + instant_img_localize.instant_images + ''); - - // Click event - $a.on('click', function (e) { - e.preventDefault(); - // Set active state of #instant_images_modal - frame.addClass('active'); - }); - this.$el.append($a); // append - }, - initialize: function initialize() { - Parent.prototype.initialize.apply(this, arguments); - this.addNav(); // add buttons - return this; // return - } - }); - if (frame.length) { - $('.close-ii-modal').on('click', function (e) { - e.preventDefault(); - frame.removeClass('active'); - }); - } - }; - if (wp.media) { - var _frame = $('#instant_images_modal'); - if (_frame.length) { - instant_images.setEditor(_frame); - } - } - - // Close Modal. - $(document).on('click', '.media-modal-backdrop', function (e) { - e.preventDefault(); - frame.removeClass('active'); - }); - - // Save Settings Form. - $('.instant-images-settings form.settings').on('submit', function () { - var form = $(this); - form.addClass('saving'); - $('.save-settings .loading', form).addClass('active'); - $('.save-settings #submit', form).prop('disabled', true); - $(this).ajaxSubmit({ - success: function success() { - $('.save-settings .loading', form).removeClass('active'); - setTimeout(function () { - $('.save-settings .saved', form).addClass('active'); - setTimeout(function () { - $('.save-settings .saved', form).removeClass('active'); - form.removeClass('saving'); - $('.save-settings #submit', form).prop('disabled', false); - }, 2000); - }, 250); - }, - error: function error() { - form.removeClass('saving'); - $('.save-settings .loading', form).removeClass('active'); - $('.save-settings #submit', form).prop('disabled', false); - alert('An error occured and the settings could not be saved'); // eslint-disable-line no-alert - } - }); - return false; - }); - - // Settings anchor links. - var settings = document.querySelectorAll('.settings_page_instant-images-settings .settings-entry'); - if (settings) { - var hash = window.location.hash; - if (hash) { - scrollToSection(hash); - } - var nav = document.querySelector('.settings_page_instant-images-settings nav.jump-nav'); - settings.forEach(function (setting) { - var anchor = setting.getAttribute('id'); - var icon = setting.querySelector('.settings-entry--title .fa'); - var text = setting.querySelector('.settings-entry--title h2').innerText; - var button = document.createElement('button'); - button.setAttribute('data-anchor', anchor); - button.innerHTML = icon.outerHTML + text; - nav.appendChild(button); - - // Scroll to section. - button.addEventListener('click', function () { - scrollToSection('#' + anchor); - }); - }); - } -}); - -/** - * Scroll to section hash. - * - * @param {string} hash The section ID. - */ -function scrollToSection(hash) { - var target = document.querySelector(hash); - if (target) { - history.replaceState({}, '', hash); - window.scrollTo({ - top: target.offsetTop - 20, - behavior: 'smooth' - }); - } -} -})(); - -/******/ })() -; -//# sourceMappingURL=index.js.map \ No newline at end of file +(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e,t){return function(){return e.apply(t,arguments)}}e.r(t),e.d(t,{hasBrowserEnv:()=>fe,hasStandardBrowserEnv:()=>pe,hasStandardBrowserWebWorkerEnv:()=>he,navigator:()=>de,origin:()=>me});const{toString:r}=Object.prototype,{getPrototypeOf:o}=Object,s=(i=Object.create(null),e=>{const t=r.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())});var i;const a=e=>(e=e.toLowerCase(),t=>s(t)===e),c=e=>t=>typeof t===e,{isArray:u}=Array,l=c("undefined"),f=a("ArrayBuffer"),d=c("string"),p=c("function"),h=c("number"),m=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==s(e))return!1;const t=o(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},g=a("Date"),b=a("File"),w=a("Blob"),E=a("FileList"),S=a("URLSearchParams"),[v,O,R,T]=["ReadableStream","Request","Response","Headers"].map(a);function A(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),u(e))for(r=0,o=e.length;r0;)if(r=n[o],t===r.toLowerCase())return r;return null}const j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,x=e=>!l(e)&&e!==j,N=(P="undefined"!=typeof Uint8Array&&o(Uint8Array),e=>P&&e instanceof P);var P;const _=a("HTMLFormElement"),L=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),F=a("RegExp"),U=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};A(n,((n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)})),Object.defineProperties(e,r)},B="abcdefghijklmnopqrstuvwxyz",k="0123456789",D={DIGIT:k,ALPHA:B,ALPHA_DIGIT:B+B.toUpperCase()+k},q=a("AsyncFunction"),M=(I="function"==typeof setImmediate,z=p(j.postMessage),I?setImmediate:z?(H=`axios@${Math.random()}`,J=[],j.addEventListener("message",(({source:e,data:t})=>{e===j&&t===H&&J.length&&J.shift()()}),!1),e=>{J.push(e),j.postMessage(H,"*")}):e=>setTimeout(e));var I,z,H,J;const W="undefined"!=typeof queueMicrotask?queueMicrotask.bind(j):"undefined"!=typeof process&&process.nextTick||M,K={isArray:u,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||p(e.append)&&("formdata"===(t=s(e))||"object"===t&&p(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:d,isNumber:h,isBoolean:e=>!0===e||!1===e,isObject:m,isPlainObject:y,isReadableStream:v,isRequest:O,isResponse:R,isHeaders:T,isUndefined:l,isDate:g,isFile:b,isBlob:w,isRegExp:F,isFunction:p,isStream:e=>m(e)&&p(e.pipe),isURLSearchParams:S,isTypedArray:N,isFileList:E,forEach:A,merge:function e(){const{caseless:t}=x(this)&&this||{},n={},r=(r,o)=>{const s=t&&C(n,o)||o;y(n[s])&&y(r)?n[s]=e(n[s],r):y(r)?n[s]=e({},r):u(r)?n[s]=r.slice():n[s]=r};for(let e=0,t=arguments.length;e(A(t,((t,o)=>{r&&p(t)?e[o]=n(t,r):e[o]=t}),{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let s,i,a;const c={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&o(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:a,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(u(e))return e;let t=e.length;if(!h(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:_,hasOwnProperty:L,hasOwnProp:L,reduceDescriptors:U,freezeMethods:e=>{U(e,((t,n)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];p(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return u(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:C,global:j,isContextDefined:x,ALPHABET:D,generateString:(e=16,t=D.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&p(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(m(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=u(e)?[]:{};return A(e,((e,t)=>{const s=n(e,r+1);!l(s)&&(o[t]=s)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:q,isThenable:e=>e&&(m(e)||p(e))&&p(e.then)&&p(e.catch),setImmediate:M,asap:W};function V(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}K.inherits(V,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});const $=V.prototype,G={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{G[e]={value:e}})),Object.defineProperties(V,G),Object.defineProperty($,"isAxiosError",{value:!0}),V.from=(e,t,n,r,o,s)=>{const i=Object.create($);return K.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),V.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const X=V;function Q(e){return K.isPlainObject(e)||K.isArray(e)}function Z(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function Y(e,t,n){return e?e.concat(t).map((function(e,t){return e=Z(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const ee=K.toFlatObject(K,{},null,(function(e){return/^is[A-Z]/.test(e)})),te=function(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!K.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(K.isDate(e))return e.toISOString();if(!a&&K.isBlob(e))throw new X("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(e)||K.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(K.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(K.isArray(e)&&function(e){return K.isArray(e)&&!e.some(Q)}(e)||(K.isFileList(e)||K.endsWith(n,"[]"))&&(a=K.toArray(e)))return n=Z(n),a.forEach((function(e,r){!K.isUndefined(e)&&null!==e&&t.append(!0===i?Y([n],r,s):null===i?n:n+"[]",c(e))})),!1;return!!Q(e)||(t.append(Y(o,n,s),c(e)),!1)}const l=[],f=Object.assign(ee,{defaultVisitor:u,convertValue:c,isVisitable:Q});if(!K.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!K.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),K.forEach(n,(function(n,s){!0===(!(K.isUndefined(n)||null===n)&&o.call(t,n,K.isString(s)?s.trim():s,r,f))&&e(n,r?r.concat(s):[s])})),l.pop()}}(e),t};function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function re(e,t){this._pairs=[],e&&te(e,this,t)}const oe=re.prototype;oe.append=function(e,t){this._pairs.push([e,t])},oe.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const se=re;function ie(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ae(e,t,n){if(!t)return e;const r=n&&n.encode||ie,o=n&&n.serialize;let s;if(s=o?o(t,n):K.isURLSearchParams(t)?t.toString():new se(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}const ce=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){K.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ue={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:se,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},fe="undefined"!=typeof window&&"undefined"!=typeof document,de="object"==typeof navigator&&navigator||void 0,pe=fe&&(!de||["ReactNative","NativeScript","NS"].indexOf(de.product)<0),he="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,me=fe&&window.location.href||"http://localhost",ye={...t,...le},ge=function(e){function t(e,n,r,o){let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;return s=!s&&K.isArray(r)?r.length:s,a?(K.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!i):(r[s]&&K.isObject(r[s])||(r[s]=[]),t(e,n,r[s],o)&&K.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r{t(function(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},be={transitional:ue,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=K.isObject(e);if(o&&K.isHTMLForm(e)&&(e=new FormData(e)),K.isFormData(e))return r?JSON.stringify(ge(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e)||K.isReadableStream(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new ye.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ye.isNode&&K.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=K.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e){if(K.isString(e))try{return(0,JSON.parse)(e),K.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||be.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(K.isResponse(e)||K.isReadableStream(e))return e;if(e&&K.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw X.from(e,X.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ye.classes.FormData,Blob:ye.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],(e=>{be.headers[e]={}}));const we=be,Ee=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Se=Symbol("internals");function ve(e){return e&&String(e).trim().toLowerCase()}function Oe(e){return!1===e||null==e?e:K.isArray(e)?e.map(Oe):String(e)}function Re(e,t,n,r,o){return K.isFunction(r)?r.call(this,t,n):(o&&(t=n),K.isString(t)?K.isString(r)?-1!==t.indexOf(r):K.isRegExp(r)?r.test(t):void 0:void 0)}class Te{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ve(t);if(!o)throw new Error("header name must be a non-empty string");const s=K.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=Oe(e))}const s=(e,t)=>K.forEach(e,((e,n)=>o(e,n,t)));if(K.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(K.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Ee[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(K.isHeaders(e))for(const[t,r]of e.entries())o(r,t,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=ve(e)){const n=K.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(K.isFunction(t))return t.call(this,e,n);if(K.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ve(e)){const n=K.findKey(this,e);return!(!n||void 0===this[n]||t&&!Re(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ve(e)){const o=K.findKey(n,e);!o||t&&!Re(0,n[o],o,t)||(delete n[o],r=!0)}}return K.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Re(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return K.forEach(this,((r,o)=>{const s=K.findKey(n,o);if(s)return t[s]=Oe(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();i!==o&&delete t[o],t[i]=Oe(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return K.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&K.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Se]=this[Se]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ve(e);t[r]||(function(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return K.isArray(e)?e.forEach(r):r(e),this}}Te.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(Te.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),K.freezeMethods(Te);const Ae=Te;function Ce(e,t){const n=this||we,r=t||n,o=Ae.from(r.headers);let s=r.data;return K.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function je(e){return!(!e||!e.__CANCEL__)}function xe(e,t,n){X.call(this,null==e?"canceled":e,X.ERR_CANCELED,t,n),this.name="CanceledError"}K.inherits(xe,X,{__CANCEL__:!0});const Ne=xe;function Pe(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new X("Request failed with status code "+n.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const _e=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[i];o||(o=c),n[s]=a,r[s]=c;let l=i,f=0;for(;l!==s;)f+=n[l++],l%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o{o=s,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=s?i(e,t):(n=e,r||(r=setTimeout((()=>{r=null,i(n)}),s-a)))},()=>n&&i(n)]}((n=>{const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=s-r,c=o(a);r=s,e({loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})}),n)},Le=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Fe=e=>(...t)=>K.asap((()=>e(...t))),Ue=ye.hasStandardBrowserEnv?function(){const e=ye.navigator&&/(msie|trident)/i.test(ye.navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=K.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},Be=ye.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];K.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),K.isString(r)&&i.push("path="+r),K.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function ke(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const De=e=>e instanceof Ae?{...e}:e;function qe(e,t){t=t||{};const n={};function r(e,t,n){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:n},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function o(e,t,n){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function s(e,t){if(!K.isUndefined(t))return r(void 0,t)}function i(e,t){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t)=>o(De(e),De(t),!0)};return K.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=c[r]||o,i=s(e[r],t[r],r);K.isUndefined(i)&&s!==a||(n[r]=i)})),n}const Me=e=>{const t=qe({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=t;if(t.headers=a=Ae.from(a),t.url=ae(ke(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),K.isFormData(r))if(ye.hasStandardBrowserEnv||ye.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(ye.hasStandardBrowserEnv&&(o&&K.isFunction(o)&&(o=o(t)),o||!1!==o&&Ue(t.url))){const e=s&&i&&Be.read(i);e&&a.set(s,e)}return t},Ie="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Me(e);let o=r.data;const s=Ae.from(r.headers).normalize();let i,a,c,u,l,{responseType:f,onUploadProgress:d,onDownloadProgress:p}=r;function h(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function y(){if(!m)return;const r=Ae.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Pe((function(e){t(e),h()}),(function(e){n(e),h()}),{data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(n(new X("Request aborted",X.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new X("Network Error",X.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ue;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new X(t,o.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,e,m)),m=null},void 0===o&&s.setContentType(null),"setRequestHeader"in m&&K.forEach(s.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),K.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),f&&"json"!==f&&(m.responseType=r.responseType),p&&([c,l]=_e(p,!0),m.addEventListener("progress",c)),d&&m.upload&&([a,u]=_e(d),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new Ne(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);g&&-1===ye.protocols.indexOf(g)?n(new X("Unsupported protocol "+g+":",X.ERR_BAD_REQUEST,e)):m.send(o||null)}))},ze=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof X?t:new Ne(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,o(new X(`timeout ${t} of ms exceeded`,X.ETIMEDOUT))}),t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:a}=r;return a.unsubscribe=()=>K.asap(i),a}},He=function*(e,t){let n=e.byteLength;if(!t||n{const o=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*He(n,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},We="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ke=We&&"function"==typeof ReadableStream,Ve=We&&("function"==typeof TextEncoder?($e=new TextEncoder,e=>$e.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var $e;const Ge=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Xe=Ke&&Ge((()=>{let e=!1;const t=new Request(ye.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Qe=Ke&&Ge((()=>K.isReadableStream(new Response("").body))),Ze={stream:Qe&&(e=>e.body)};var Ye;We&&(Ye=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Ze[e]&&(Ze[e]=K.isFunction(Ye[e])?t=>t[e]():(t,n)=>{throw new X(`Response type '${e}' is not supported`,X.ERR_NOT_SUPPORT,n)})})));const et={http:null,xhr:Ie,fetch:We&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:d}=Me(e);u=u?(u+"").toLowerCase():"text";let p,h=ze([o,s&&s.toAbortSignal()],i);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let y;try{if(c&&Xe&&"get"!==n&&"head"!==n&&0!==(y=await(async(e,t)=>{const n=K.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(K.isBlob(e))return e.size;if(K.isSpecCompliantForm(e)){const t=new Request(ye.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return K.isArrayBufferView(e)||K.isArrayBuffer(e)?e.byteLength:(K.isURLSearchParams(e)&&(e+=""),K.isString(e)?(await Ve(e)).byteLength:void 0)})(t):n})(l,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(K.isFormData(r)&&(e=n.headers.get("content-type"))&&l.setContentType(e),n.body){const[e,t]=Le(y,_e(Fe(c)));r=Je(n.body,65536,e,t)}}K.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...d,signal:h,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:o?f:void 0});let s=await fetch(p);const i=Qe&&("stream"===u||"response"===u);if(Qe&&(a||i&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=K.toFiniteNumber(s.headers.get("content-length")),[n,r]=a&&Le(t,_e(Fe(a),!0))||[];s=new Response(Je(s.body,65536,n,(()=>{r&&r(),m&&m()})),e)}u=u||"text";let g=await Ze[K.findKey(Ze,u)||"text"](s,e);return!i&&m&&m(),await new Promise(((t,n)=>{Pe(t,n,{data:g,headers:Ae.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:p})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new X("Network Error",X.ERR_NETWORK,e,p),{cause:t.cause||t});throw X.from(t,t&&t.code,e,p)}})};K.forEach(et,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const tt=e=>`- ${e}`,nt=e=>K.isFunction(e)||null===e||!1===e,rt=e=>{e=K.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(tt).join("\n"):" "+tt(e[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function ot(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ne(null,e)}function st(e){return ot(e),e.headers=Ae.from(e.headers),e.data=Ce.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rt(e.adapter||we.adapter)(e).then((function(t){return ot(e),t.data=Ce.call(e,e.transformResponse,t),t.headers=Ae.from(t.headers),t}),(function(t){return je(t)||(ot(e),t&&t.response&&(t.response.data=Ce.call(e,e.transformResponse,t.response),t.response.headers=Ae.from(t.response.headers))),Promise.reject(t)}))}const it={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{it[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const at={};it.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new X(r(o," has been removed"+(t?" in "+t:"")),X.ERR_DEPRECATED);return t&&!at[o]&&(at[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}};const ct={assertOptions:function(e,t,n){if("object"!=typeof e)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new X("option "+s+" must be "+n,X.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new X("Unknown option "+s,X.ERR_BAD_OPTION)}},validators:it},ut=ct.validators;class lt{constructor(e){this.defaults=e,this.interceptors={request:new ce,response:new ce}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=qe(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&ct.assertOptions(n,{silentJSONParsing:ut.transitional(ut.boolean),forcedJSONParsing:ut.transitional(ut.boolean),clarifyTimeoutError:ut.transitional(ut.boolean)},!1),null!=r&&(K.isFunction(r)?t.paramsSerializer={serialize:r}:ct.assertOptions(r,{encode:ut.function,serialize:ut.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&K.merge(o.common,o[t.method]);o&&K.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ae.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[st.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);f{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Ne(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new dt((function(t){e=t})),cancel:e}}}const pt=dt,ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ht).forEach((([e,t])=>{ht[t]=e}));const mt=ht,yt=function e(t){const r=new ft(t),o=n(ft.prototype.request,r);return K.extend(o,ft.prototype,r,{allOwnKeys:!0}),K.extend(o,r,null,{allOwnKeys:!0}),o.create=function(n){return e(qe(t,n))},o}(we);yt.Axios=ft,yt.CanceledError=Ne,yt.CancelToken=pt,yt.isCancel=je,yt.VERSION="1.7.7",yt.toFormData=te,yt.AxiosError=X,yt.Cancel=yt.CanceledError,yt.all=function(e){return Promise.all(e)},yt.spread=function(e){return function(t){return e.apply(null,t)}},yt.isAxiosError=function(e){return K.isObject(e)&&!0===e.isAxiosError},yt.mergeConfig=qe,yt.AxiosHeaders=Ae,yt.formToJSON=e=>ge(K.isHTMLForm(e)?new FormData(e):e),yt.getAdapter=rt,yt.HttpStatusCode=mt,yt.default=yt;const gt=yt,bt=window.wp.i18n;var wt=document.querySelectorAll(".license-settings form.license-settings--item");function Et(){setTimeout((function(){location.reload()}),2e3)}wt&&wt.forEach((function(e){e.addEventListener("submit",(function(t){t.preventDefault();var n,r,o,s,i=this.querySelector("input"),a=i.value,c=i.dataset.key,u=i.dataset.status,l=i.dataset.id,f=e.classList.contains("valid")?"deactivate":"activate";a?(e.querySelector("input[type=submit]").setAttribute("disabled","disabled"),e.querySelector(".loading").classList.add("active"),n={key:c,status:u,id:l,license:a,type:f},o=(r=instant_img_admin_localize).root+"instant-images/license/",s={headers:{"X-WP-Nonce":r.nonce,"Content-Type":"application/json"}},gt.post(o,JSON.stringify(n),s).then((function(e){null!=e&&e.data?location.reload():(console.warn((0,bt.__)("Are you sure you should be doing this?","instant-images")),Et())})).catch((function(e){console.warn(e),Et()}))):i.focus()}))}));var St=St||{};function vt(e){var t=document.querySelector(e);t&&(history.replaceState({},"",e),window.scrollTo({top:t.offsetTop-20,behavior:"smooth"}))}jQuery(document).ready((function(e){if(St.setEditor=function(t){var n=wp.media.view.Router;wp.media.view.Router=n.extend({addNav:function(){var n=e(' '+instant_img_localize.instant_images+"");n.on("click",(function(e){e.preventDefault(),t.addClass("active")})),this.$el.append(n)},initialize:function(){return n.prototype.initialize.apply(this,arguments),this.addNav(),this}}),t.length&&e(".close-ii-modal").on("click",(function(e){e.preventDefault(),t.removeClass("active")}))},wp.media){var t=e("#instant_images_modal");t.length&&St.setEditor(t)}e(document).on("click",".media-modal-backdrop",(function(e){e.preventDefault(),frame.removeClass("active")})),e(".instant-images-settings form.settings").on("submit",(function(){var t=e(this);return t.addClass("saving"),e(".save-settings .loading",t).addClass("active"),e(".save-settings #submit",t).prop("disabled",!0),e(this).ajaxSubmit({success:function(){e(".save-settings .loading",t).removeClass("active"),setTimeout((function(){e(".save-settings .saved",t).addClass("active"),setTimeout((function(){e(".save-settings .saved",t).removeClass("active"),t.removeClass("saving"),e(".save-settings #submit",t).prop("disabled",!1)}),2e3)}),250)},error:function(){t.removeClass("saving"),e(".save-settings .loading",t).removeClass("active"),e(".save-settings #submit",t).prop("disabled",!1),alert("An error occured and the settings could not be saved")}}),!1}));var n=document.querySelectorAll(".settings_page_instant-images-settings .settings-entry");if(n){var r=window.location.hash;r&&vt(r);var o=document.querySelector(".settings_page_instant-images-settings nav.jump-nav");n.forEach((function(e){var t=e.getAttribute("id"),n=e.querySelector(".settings-entry--title .fa"),r=e.querySelector(".settings-entry--title h2").innerText,s=document.createElement("button");s.setAttribute("data-anchor",t),s.innerHTML=n.outerHTML+r,o.appendChild(s),s.addEventListener("click",(function(){vt("#"+t)}))}))}}))})(); \ No newline at end of file diff --git a/build/block/index.asset.php b/build/block/index.asset.php index fb9c607..b248dc5 100644 --- a/build/block/index.asset.php +++ b/build/block/index.asset.php @@ -1 +1 @@ - array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '00be8f0e7ec40aeb754e'); + array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '094d91f9b6aad61a99b7'); diff --git a/build/block/index.js b/build/block/index.js index f98b7d7..2624aee 100644 --- a/build/block/index.js +++ b/build/block/index.js @@ -1,22410 +1 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ "./node_modules/@wordpress/icons/build-module/library/help.js": -/*!********************************************************************!*\ - !*** ./node_modules/@wordpress/icons/build-module/library/help.js ***! - \********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); -/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js"); -/** - * WordPress dependencies - */ - - -const help = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.SVG, { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 24 24", - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.Path, { - d: "M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z" - }) -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (help); -//# sourceMappingURL=help.js.map - -/***/ }), - -/***/ "./src/js/common/pluginProvider.js": -/*!*****************************************!*\ - !*** ./src/js/common/pluginProvider.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ PluginProvider: () => (/* binding */ PluginProvider), -/* harmony export */ usePluginContext: () => (/* binding */ usePluginContext) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); - - -// Create Context object. -var PluginContext = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createContext)(); - -// Export Provider. -function PluginProvider(props) { - var value = props.value, - children = props.children; - return /*#__PURE__*/React.createElement(PluginContext.Provider, { - value: value - }, children); -} - -// Export useContext Hook. -function usePluginContext() { - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useContext)(PluginContext); -} - -/***/ }), - -/***/ "./src/js/components/APILightbox.js": -/*!******************************************!*\ - !*** ./src/js/components/APILightbox.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ APILightbox) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _functions_buildURL__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../functions/buildURL */ "./src/js/functions/buildURL.js"); -/* harmony import */ var _functions_consoleStatus__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../functions/consoleStatus */ "./src/js/functions/consoleStatus.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _functions_updatePluginSetting__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../functions/updatePluginSetting */ "./src/js/functions/updatePluginSetting.js"); -/* harmony import */ var _ProviderIcons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ProviderIcons */ "./src/js/components/ProviderIcons.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } -function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - -/** - * Render the APILightbox component. - * Note: Component is display when switching providers and the API is invalid. - * - * @param {Object} props The component props. - * @return {JSX.Element} The APILightbox component. - */ -function APILightbox(props) { - var provider = props.provider, - callback = props.callback; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('invalid'), - _useState2 = _slicedToArray(_useState, 2), - apiStatus = _useState2[0], - setAPIStatus = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(''), - _useState4 = _slicedToArray(_useState3, 2), - response = _useState4[0], - setResponse = _useState4[1]; - var lightbox = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var inputRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var submitRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var api_key = instant_img_localize["".concat(provider, "_app_id")]; - var title = apiStatus === 'invalid' ? instant_img_localize.api_key_invalid : ''; - - /** - * Handler for the form submission. - * - * @param {Event} e The form event. - */ - function handleSubmit(_x) { - return _handleSubmit.apply(this, arguments); - } - /** - * Close the lightbox - */ - function _handleSubmit() { - _handleSubmit = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) { - var _inputRef$current; - var key, data, ok, status, headers; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - e.preventDefault(); - setAPIStatus('loading'); - - // Get API key value. - key = inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value; // Set API key to localized variable. - instant_img_localize["".concat(provider, "_app_id")] = key; - - // Update plugin settings via REST API. - (0,_functions_updatePluginSetting__WEBPACK_IMPORTED_MODULE_5__["default"])("".concat(provider, "_api"), key); - _context.prev = 5; - _context.next = 8; - return fetch((0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_2__.buildTestURL)(provider)); - case 8: - data = _context.sent; - // Handle response. - ok = data.ok, status = data.status, headers = data.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_4__.checkRateLimit)(headers); - - // Handle response actions. - if (ok) { - // Success. - setAPIStatus('valid'); - setResponse(instant_img_localize.api_success_msg); - setTimeout(function () { - setResponse(''); - setAPIStatus('invalid'); - callback(provider); - }, 1000); - } else { - setAPIStatus('invalid'); // Error/Invalid. - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_3__["default"])(provider, status); // Render console warning. - - if (status === 400 || status === 401) { - setResponse(instant_img_localize.api_invalid_msg); // Unsplash/Pixabay incorrect API key. - } - if (status === 429) { - setResponse(instant_img_localize.api_ratelimit_msg); // Pixabay - too many requests. - } - } - _context.next = 19; - break; - case 14: - _context.prev = 14; - _context.t0 = _context["catch"](5); - setAPIStatus('invalid'); // Error/Invalid. - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_3__["default"])(provider, 500); // Render console warning. - setResponse(instant_img_localize.api_invalid_500_msg); - case 19: - case "end": - return _context.stop(); - } - }, _callee, null, [[5, 14]]); - })); - return _handleSubmit.apply(this, arguments); - } - function closeLightbox() { - if (lightbox !== null && lightbox !== void 0 && lightbox.current) { - lightbox.current.classList.remove('active'); - setTimeout(function () { - callback(); - }, 150); - } - } - - /** - * Close the lightbox with a background click. - * - * @param {Event} e The form event. - */ - function bkgClick(e) { - var target = e.target; - // If clicked element is the background. - if (target === (lightbox === null || lightbox === void 0 ? void 0 : lightbox.current)) { - closeLightbox(); - } - } - - /** - * Escape handler. - * - * @param {Event} e The key press event. - */ - function escFunction(e) { - var key = e.key; - if (key === 'Escape') { - closeLightbox(); - } - } - - /** - * Reset the key to use Instant Images default. - */ - function getDefaultKey() { - inputRef.current.value = ''; - setTimeout(function () { - submitRef.current.click(); - }, 25); - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - var _lightbox$current; - document.addEventListener('keydown', escFunction, false); - lightbox === null || lightbox === void 0 || (_lightbox$current = lightbox.current) === null || _lightbox$current === void 0 || _lightbox$current.classList.add('active'); - return function () { - document.removeEventListener('keydown', escFunction, false); - }; - }, [provider]); //eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, provider ? - /*#__PURE__*/ - // eslint-disable-next-line - React.createElement("div", { - className: "api-lightbox", - ref: lightbox, - onClick: function onClick(e) { - return bkgClick(e); - }, - tabIndex: "-1" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", { - className: "api-lightbox--close", - onClick: function onClick() { - return closeLightbox(); - } - }, "\xD7", /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.btnClose)), /*#__PURE__*/React.createElement("div", { - className: "api-lightbox--details" - }, /*#__PURE__*/React.createElement("h3", null, (0,_ProviderIcons__WEBPACK_IMPORTED_MODULE_6__.getProviderIcon)(provider), provider), /*#__PURE__*/React.createElement("p", null, instant_img_localize["".concat(provider, "_api_desc")]), /*#__PURE__*/React.createElement("p", { - className: "action-controls" - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_4__.gotoURL)(instant_img_localize["".concat(provider, "_api_url")]); - } - }, instant_img_localize.get_api_key), provider !== 'giphy' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, "|"), /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return getDefaultKey(); - } - }, instant_img_localize.use_instant_images_key)) : null)), /*#__PURE__*/React.createElement("form", { - onSubmit: function onSubmit(e) { - return handleSubmit(e); - } - }, /*#__PURE__*/React.createElement("label", { - htmlFor: "key", - className: "offscreen" - }, instant_img_localize.enter_api_key), /*#__PURE__*/React.createElement("div", { - className: "api-lightbox--input-wrap" - }, /*#__PURE__*/React.createElement("span", { - className: apiStatus, - title: title && title - }, apiStatus === 'invalid' && /*#__PURE__*/React.createElement("i", { - className: "fa fa-exclamation-triangle", - "aria-hidden": "true" - }), apiStatus === 'valid' && /*#__PURE__*/React.createElement("i", { - className: "fa fa-check-circle", - "aria-hidden": "true" - }), apiStatus === 'loading' && /*#__PURE__*/React.createElement("i", { - className: "fa fa-spinner fa-spin", - "aria-hidden": "true" - })), /*#__PURE__*/React.createElement("input", { - type: "text", - id: "key", - ref: inputRef, - placeholder: "Enter API Key", - defaultValue: api_key - })), response && /*#__PURE__*/React.createElement("p", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('api-lightbox--response', apiStatus) - }, response), /*#__PURE__*/React.createElement("button", { - type: "submit", - ref: submitRef - }, instant_img_localize.btnVerify))))) : null); -} - -/***/ }), - -/***/ "./src/js/components/ErrorLightbox.js": -/*!********************************************!*\ - !*** ./src/js/components/ErrorLightbox.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ ErrorLightbox) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _functions_getErrorMessage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../functions/getErrorMessage */ "./src/js/functions/getErrorMessage.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _ProviderIcons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ProviderIcons */ "./src/js/components/ProviderIcons.js"); - - - - - - - -/** - * Render the ErrorLightbox component. - * Note: Component is display on initial plugin load if the default provider has an invalid API key. - * - * @return {JSX.Element} The ErrorLightbox component. - */ -function ErrorLightbox() { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider, - apiError = _usePluginContext.apiError; - var lightbox = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var status = apiError !== null && apiError !== void 0 && apiError.status ? apiError.status : null; - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, apiError && status && /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('api-lightbox', 'error-lightbox', 'active'), - ref: lightbox, - tabIndex: "-1" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('api-lightbox--details', 'error-lightbox') - }, /*#__PURE__*/React.createElement("h3", null, (0,_ProviderIcons__WEBPACK_IMPORTED_MODULE_5__.getProviderIcon)(provider), provider), /*#__PURE__*/React.createElement("p", { - className: "callout-warning" - }, status, " ", instant_img_localize.error), /*#__PURE__*/React.createElement("p", null, (0,_functions_getErrorMessage__WEBPACK_IMPORTED_MODULE_3__["default"])(status)), /*#__PURE__*/React.createElement("p", { - className: "more-info" - }, instant_img_localize.api_default_provider), /*#__PURE__*/React.createElement("p", { - className: "action-controls" - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_4__.gotoURL)(instant_img_localize["".concat(provider, "_api_url")]); - } - }, instant_img_localize.get_api_key)))))); -} - -/***/ }), - -/***/ "./src/js/components/Filter.js": -/*!*************************************!*\ - !*** ./src/js/components/Filter.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Filter) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hooks/useArrowControls */ "./src/js/hooks/useArrowControls.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - -/** - * Render the Filter component. - * - * @param {Object} props The component props. - * @param {Object} props.data The filter data. - * @param {string} props.filterKey The filter key. - * @param {Function} props.handler The change/click handler function. - * @return {JSX.Element} The Filter component. - */ -function Filter(props) { - var _data$filters; - var data = props.data, - filterKey = props.filterKey, - handler = props.handler; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider; - var defaultValue = data === null || data === void 0 ? void 0 : data["default"]; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - expanded = _useState2[0], - setExpanded = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultValue), - _useState4 = _slicedToArray(_useState3, 2), - selected = _useState4[0], - setSelected = _useState4[1]; - var dropdown = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var button = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var menu = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var id = "".concat(provider, "-").concat(filterKey); - var isColor = filterKey === 'colors' || filterKey === 'color'; - - // Use up/down arrow keys to navigate dropdown. - (0,_hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_3__.useArrowControls)(expanded, dropdown); - - /** - * Toggle menu open/closed. - * - * @param {Event} event The click event. - */ - function toggleMenu(event) { - event.preventDefault(); - - // If disabled, don't open menu. - var target = event.currentTarget; - if (target.disabled) { - return false; - } - if (expanded) { - setExpanded(false); - document.removeEventListener('click', closeMenuOutside); - } else { - setExpanded(true); - document.addEventListener('click', closeMenuOutside); - } - } - - /** - * Close menu when clicking outside. - * - * @param {Event} event The click event. - */ - function closeMenuOutside(event) { - var _menu$current, _button$current; - if (!(menu !== null && menu !== void 0 && (_menu$current = menu.current) !== null && _menu$current !== void 0 && _menu$current.contains(event.target)) && !(button !== null && button !== void 0 && (_button$current = button.current) !== null && _button$current !== void 0 && _button$current.contains(event.target))) { - setExpanded(false); - document.removeEventListener('click', closeMenuOutside); - } - } - - /** - * Checks for focus outside of component. - * - * @param {Event} event The click event. - */ - function focusOutside(event) { - if (!(dropdown !== null && dropdown !== void 0 && dropdown.current.contains(event.target))) { - closeMenuOutside(event); - } - } - - /** - * Detect esc key press. - * - * @param {Event} event The click event. - */ - function escClick(event) { - if (event.key === 'Escape') { - setExpanded(false); - } - } - - /** - * Click handler for the filter buttons. - * - * @param {string} filter The current filter key. - * @param {string} value The value to filter. - */ - function click(filter, value) { - var newValue = selected !== value ? value : defaultValue; - setSelected(newValue); - handler(filter, newValue); - setTimeout(function () { - var _button$current2; - button === null || button === void 0 || (_button$current2 = button.current) === null || _button$current2 === void 0 || _button$current2.click(); - }, 100); - } - - /** - * Convert a color to a CSS value. - * - * @see https://www.w3schools.com/colors/colors_names.asp - * - * @param {string} color The current color. - * @return {string} The color. - */ - function convertColor(color) { - if (color === 'lilac') { - color = 'DarkViolet'; - } - if (color === 'grayscale' || color === 'black_and_white') { - color = 'LightGray'; - } - return color; - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - // Initiate arrow menus. - // a11yarrows.init(dropdown?.current, { - // selector: "button", - // }); - - // Check for focus outside. - document.addEventListener('keyup', focusOutside); - document.addEventListener('keydown', escClick); - return function () { - document.removeEventListener('keyup', focusOutside); - document.removeEventListener('keydown', escClick); - }; - }, []); // eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement("div", { - className: "filter-dropdown", - id: id, - ref: dropdown - }, /*#__PURE__*/React.createElement("button", { - onClick: toggleMenu, - className: "filter-dropdown--button", - "aria-expanded": expanded ? 'true' : 'false', - ref: button - }, /*#__PURE__*/React.createElement("span", { - className: "filter-dropdown--button-label" - }, data === null || data === void 0 ? void 0 : data.label), /*#__PURE__*/React.createElement("span", { - className: "filter-dropdown--button-selected" - }, selected.replace(/_/g, ' '), /*#__PURE__*/React.createElement("i", { - className: "fa fa-caret-down", - "aria-hidden": "true" - }))), /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('filter-dropdown--menu', expanded ? 'expanded' : null), - "data-key": filterKey, - "aria-hidden": expanded ? 'false' : 'true', - ref: menu - }, (data === null || data === void 0 || (_data$filters = data.filters) === null || _data$filters === void 0 ? void 0 : _data$filters.length) && data.filters.map(function (filter, key) { - var label = filter.label, - value = filter.value; - return /*#__PURE__*/React.createElement("button", { - key: key, - disabled: selected === value, - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('filter-dropdown--item', selected === value ? 'selected' : null), - onClick: function onClick() { - return click(filterKey, value); - } - }, label, value !== 'all' && value !== 'transparent' && isColor ? /*#__PURE__*/React.createElement("span", { - className: "_color", - style: { - color: convertColor(value) - } - }) : null); - }))); -} - -/***/ }), - -/***/ "./src/js/components/Icon.js": -/*!***********************************!*\ - !*** ./src/js/components/Icon.js ***! - \***********************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ IconLogo: () => (/* binding */ IconLogo), -/* harmony export */ IconSVG: () => (/* binding */ IconSVG), -/* harmony export */ "default": () => (/* binding */ Icon) -/* harmony export */ }); -/** - * The Icon component. - * - * @return {JSX.Element} The Icon component. - */ -function Icon() { - return /*#__PURE__*/React.createElement("span", { - className: "instant-images-sidebar-icon" - }, /*#__PURE__*/React.createElement(IconSVG, null)); -} - -/** - * The SVG icon. - * - * @return {JSX.Element} The IconSVG component. - */ -function IconSVG() { - return /*#__PURE__*/React.createElement("svg", { - viewBox: "0 0 31 58", - width: "13px", - height: "24px" - }, /*#__PURE__*/React.createElement("polygon", { - points: "20 0 20 23 31 23 11 58 11 34 0 34 20 0", - fill: "#4a7bc5" - })); -} - -/** - * The SVG Logo. - * - * @return {JSX.Element} The IconLogo component. - */ -function IconLogo() { - return /*#__PURE__*/React.createElement("svg", { - width: "80", - height: "80", - viewBox: "0 0 80 80", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("title", null, "Instant Images Icon"), /*#__PURE__*/React.createElement("path", { - d: "M0 8C0 3.58172 3.58172 0 8 0H72C76.4183 0 80 3.58172 80 8V72C80 76.4183 76.4183 80 72 80H8C3.58172 80 0 76.4183 0 72V8Z", - fill: "#647FE8" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z", - fill: "white" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z", - fill: "white" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z", - fill: "#C7D2FF" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z", - fill: "#C7D2FF" - })); -} - -/***/ }), - -/***/ "./src/js/components/InstantImages.js": -/*!********************************************!*\ - !*** ./src/js/components/InstantImages.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ InstantImages) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! masonry-layout */ "./node_modules/masonry-layout/masonry.js"); -/* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(masonry_layout__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var react_intersection_observer__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! react-intersection-observer */ "./node_modules/react-intersection-observer/dist/index.mjs"); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _constants_filters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../constants/filters */ "./src/js/constants/filters.js"); -/* harmony import */ var _editor_block_components_Header__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../editor/block/components/Header */ "./src/js/editor/block/components/Header.js"); -/* harmony import */ var _functions_buildURL__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../functions/buildURL */ "./src/js/functions/buildURL.js"); -/* harmony import */ var _functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../functions/consoleStatus */ "./src/js/functions/consoleStatus.js"); -/* harmony import */ var _functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../functions/getQueryParams */ "./src/js/functions/getQueryParams.js"); -/* harmony import */ var _functions_getResults__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../functions/getResults */ "./src/js/functions/getResults.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _functions_session__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../functions/session */ "./src/js/functions/session.js"); -/* harmony import */ var _APILightbox__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./APILightbox */ "./src/js/components/APILightbox.js"); -/* harmony import */ var _ErrorLightbox__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ErrorLightbox */ "./src/js/components/ErrorLightbox.js"); -/* harmony import */ var _Filter__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Filter */ "./src/js/components/Filter.js"); -/* harmony import */ var _LoadMore__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./LoadMore */ "./src/js/components/LoadMore.js"); -/* harmony import */ var _NoResults__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./NoResults */ "./src/js/components/NoResults.js"); -/* harmony import */ var _ProviderNav__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./ProviderNav */ "./src/js/components/ProviderNav.js"); -/* harmony import */ var _RestAPIError__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./RestAPIError */ "./src/js/components/RestAPIError.js"); -/* harmony import */ var _Results__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Results */ "./src/js/components/Results.js"); -/* harmony import */ var _ResultsWPBlock__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./ResultsWPBlock */ "./src/js/components/ResultsWPBlock.js"); -/* harmony import */ var _Tooltip__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Tooltip */ "./src/js/components/Tooltip.js"); -/* harmony import */ var _cta_Extended__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./cta/Extended */ "./src/js/components/cta/Extended.js"); -/* harmony import */ var _search_SearchForm__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./search/SearchForm */ "./src/js/components/search/SearchForm.js"); -/* harmony import */ var _search_SearchHeader__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./search/SearchHeader */ "./src/js/components/search/SearchHeader.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } -function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } -function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } -function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - -var imagesLoaded = __webpack_require__(/*! imagesloaded */ "./node_modules/imagesloaded/imagesloaded.js"); -var page = 1; - -/** - * Render the main InstantImages application component. - * - * @param {Object} props The component props. - * @param {string} props.editor Editor type. - * @param {string} props.provider Image provider. - * @param {Array} props.data API results. - * @param {Element} props.container Instant Images container element. - * @param {Object} props.api_error API error object. - * @param {string} props.clientId WP block client ID. - * @return {JSX.Element} InstantImages component. - */ -function InstantImages(props) { - var _instant_img_localize4, _Object$entries; - var _props$editor = props.editor, - editor = _props$editor === void 0 ? 'classic' : _props$editor, - provider = props.provider, - data = props.data, - container = props.container, - _props$api_error = props.api_error, - api_error = _props$api_error === void 0 ? null : _props$api_error, - _props$clientId = props.clientId, - clientId = _props$clientId === void 0 ? null : _props$clientId; - var _instant_img_localize = (_instant_img_localize4 = instant_img_localize) === null || _instant_img_localize4 === void 0 || (_instant_img_localize4 = _instant_img_localize4.addons) === null || _instant_img_localize4 === void 0 ? void 0 : _instant_img_localize4.extended, - _instant_img_localize2 = _instant_img_localize.activated, - extended_activated = _instant_img_localize2 === void 0 ? false : _instant_img_localize2, - _instant_img_localize3 = _instant_img_localize.license, - extended_license = _instant_img_localize3 === void 0 ? false : _instant_img_localize3; - var delay = 250; - var searchClass = 'searching'; - var searchDefaults = { - active: false, - term: '', - type: '', - results: 0 - }; - - // App state. - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(data)), - _useState2 = _slicedToArray(_useState, 2), - results = _useState2[0], - setResults = _useState2[1]; // Image results. - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(provider), - _useState4 = _slicedToArray(_useState3, 2), - activeProvider = _useState4[0], - setActiveProvider = _useState4[1]; // Current provider. - var _useState5 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]), - _useState6 = _slicedToArray(_useState5, 2), - apiTested = _useState6[0], - setAPITested = _useState6[1]; // API key test results. - var _useState7 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState8 = _slicedToArray(_useState7, 2), - mounted = _useState8[0], - setMounted = _useState8[1]; // App mounted state. - var _useState9 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(true), - _useState10 = _slicedToArray(_useState9, 2), - loading = _useState10[0], - setLoading = _useState10[1]; // Loading state - var _useState11 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState12 = _slicedToArray(_useState11, 2), - loadingMore = _useState12[0], - setLoadingMore = _useState12[1]; // Load more state. - var _useState13 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState14 = _slicedToArray(_useState13, 2), - done = _useState14[0], - setDone = _useState14[1]; // Done state. - var _useState15 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(api_error), - _useState16 = _slicedToArray(_useState15, 2), - apiError = _useState16[0], - setAPIError = _useState16[1]; // API Error. - var _useState17 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState18 = _slicedToArray(_useState17, 2), - showAPILightbox = _useState18[0], - setShowAPILightbox = _useState18[1]; // Render API key lightbox. - var _useState19 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(searchDefaults), - _useState20 = _slicedToArray(_useState19, 2), - search = _useState20[0], - setSearch = _useState20[1]; - var _useState21 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]), - _useState22 = _slicedToArray(_useState21, 2), - suggestions = _useState22[0], - setSuggestions = _useState22[1]; - var _useState23 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(_constants_filters__WEBPACK_IMPORTED_MODULE_5__.FILTERS[activeProvider].filters), - _useState24 = _slicedToArray(_useState23, 2), - filterOptions = _useState24[0], - setFilterOptions = _useState24[1]; - var _useState25 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}), - _useState26 = _slicedToArray(_useState25, 2), - filters = _useState26[0], - setFilters = _useState26[1]; - var _useState27 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}), - _useState28 = _slicedToArray(_useState27, 2), - searchFilters = _useState28[0], - setSearchFilters = _useState28[1]; - - // Refs. - var _useInView = (0,react_intersection_observer__WEBPACK_IMPORTED_MODULE_26__.useInView)({ - rootMargin: '0px 0px' - }), - _useInView2 = _slicedToArray(_useInView, 2), - loadMoreRef = _useInView2[0], - inView = _useInView2[1]; - var photosRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var searchInputRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var msnryRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - - // WP Editor props. - var wpBlock = editor === 'block' ? true : false; - var blockSidebar = editor === 'sidebar' ? true : false; - var isBlockEditor = wpBlock || blockSidebar ? true : false; - var mediaModal = editor === 'media-modal' ? true : false; - var body = document.body; - var plugin = isBlockEditor ? container : container.parentNode.parentNode; - var wrapper = isBlockEditor ? container : plugin.querySelector('.instant-images-wrapper'); - - /** - * Get the initial set of photos for the current view (New/Popular/Filters/etc...). - * - * @param {boolean} reset Reset the current view. - * @since 3.0 - */ - function getPhotos() { - return _getPhotos.apply(this, arguments); - } - /** - * Load more photos in infinite scroll style. - * - * @since 3.0 - */ - function _getPhotos() { - _getPhotos = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() { - var _searchInputRef$curre2; - var reset, - params, - url, - sessionData, - response, - status, - headers, - apiResults, - _apiResults$error, - error, - _args = arguments; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - reset = _args.length > 0 && _args[0] !== undefined ? _args[0] : false; - if (!loadingMore) { - _context.next = 3; - break; - } - return _context.abrupt("return", false); - case 3: - if (!(!reset && (searchInputRef === null || searchInputRef === void 0 || (_searchInputRef$curre2 = searchInputRef.current) === null || _searchInputRef$curre2 === void 0 ? void 0 : _searchInputRef$curre2.value) !== '')) { - _context.next = 7; - break; - } - if (!(extended_activated && extended_license)) { - _context.next = 7; - break; - } - doSearch(searchInputRef.current.value); - return _context.abrupt("return"); - case 7: - setLoading(true); // Set loading state. - clearSearch(); // Reset search results. - - resetScrollPosition(); - page = 1; - - // Build URL. - params = (0,_functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__["default"])(activeProvider, filters); - url = (0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__["default"])('photos', params); // Get session storage. - sessionData = (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.getSession)(url); - if (!sessionData) { - _context.next = 18; - break; - } - // Display results from session. - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(sessionData), false, null); - _context.next = 37; - break; - case 18: - _context.next = 20; - return fetch(url); - case 20: - response = _context.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - _context.prev = 23; - _context.next = 26; - return response.json(); - case 26: - apiResults = _context.sent; - _apiResults$error = apiResults.error, error = _apiResults$error === void 0 ? null : _apiResults$error; - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(apiResults), false, error); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.saveSession)(url, apiResults); - _context.next = 37; - break; - case 32: - _context.prev = 32; - _context.t0 = _context["catch"](23); - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__["default"])(provider, status); - setLoading(false); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.deleteSession)(url); - case 37: - // Delay loading animatons for effect. - setTimeout(function () { - setLoading(false); - }, delay); - case 38: - case "end": - return _context.stop(); - } - }, _callee, null, [[23, 32]]); - })); - return _getPhotos.apply(this, arguments); - } - function loadMorePhotos() { - return _loadMorePhotos.apply(this, arguments); - } - /** - * Perform a photo search. - * - * @param {string} term Search term. - * @since 3.0 - */ - function _loadMorePhotos() { - _loadMorePhotos = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { - var searchQuery, type, activeFilters, loadmoreParams, params, url, sessionData, response, status, headers, apiResults, _apiResults$error2, error; - return _regeneratorRuntime().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - if (!(!mounted || loading || loadingMore || done)) { - _context2.next = 2; - break; - } - return _context2.abrupt("return"); - case 2: - setLoadingMore(true); - page = parseInt(page) + 1; - - // Get search query. - searchQuery = search !== null && search !== void 0 && search.active && search !== null && search !== void 0 && search.term ? { - term: search.term - } : {}; // Build URL. - type = search !== null && search !== void 0 && search.active ? 'search' : 'photos'; - activeFilters = search !== null && search !== void 0 && search.active ? searchFilters : filters; - loadmoreParams = _objectSpread(_objectSpread(_objectSpread({}, { - page: page - }), searchQuery), activeFilters); - params = (0,_functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__["default"])(activeProvider, loadmoreParams); - url = (0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__["default"])(type, params); // Get session storage. - sessionData = (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.getSession)(url); - if (!sessionData) { - _context2.next = 15; - break; - } - // Display results from session. - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(sessionData), true, null); - _context2.next = 34; - break; - case 15: - _context2.next = 17; - return fetch(url); - case 17: - response = _context2.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - _context2.prev = 20; - _context2.next = 23; - return response.json(); - case 23: - apiResults = _context2.sent; - _apiResults$error2 = apiResults.error, error = _apiResults$error2 === void 0 ? null : _apiResults$error2; - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(apiResults), true, error); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.saveSession)(url, apiResults); - _context2.next = 34; - break; - case 29: - _context2.prev = 29; - _context2.t0 = _context2["catch"](20); - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__["default"])(provider, status); - setLoadingMore(false); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.deleteSession)(url); - case 34: - case "end": - return _context2.stop(); - } - }, _callee2, null, [[20, 29]]); - })); - return _loadMorePhotos.apply(this, arguments); - } - function doSearch(_x) { - return _doSearch.apply(this, arguments); - } - /** - * Handle the display results. - * - * @param {Array} images Image array. - * @param {boolean} append Append images to existing results display. - * @param {string|null} error Error message. - */ - function _doSearch() { - _doSearch = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(term) { - var searchType, searchQuery, searchParams, params, url, sessionData, response, status, headers, apiResults, _apiResults$error3, error; - return _regeneratorRuntime().wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - setLoading(true); - resetScrollPosition(); - page = 1; // Reset current page num. - searchType = term.substring(0, 3) === 'id:' ? 'id' : 'term'; // Get search query. - searchQuery = searchType === 'id' ? { - id: term.replace('id:', '').replace(/\s+/, '') - } : { - term: term - }; // Build URL. - searchParams = _objectSpread(_objectSpread(_objectSpread({}, { - page: page - }), searchQuery), searchFilters); - params = (0,_functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__["default"])(activeProvider, searchParams); - url = (0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__["default"])('search', params); // Get session storage. - sessionData = (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.getSession)(url); - if (!sessionData) { - _context3.next = 14; - break; - } - // Display results from session. - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(sessionData), false, null); - setSearch({ - active: true, - term: term, - type: searchType, - results: (0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__.getSearchTotal)(sessionData) - }); - _context3.next = 35; - break; - case 14: - _context3.next = 16; - return fetch(url); - case 16: - response = _context3.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - _context3.prev = 19; - _context3.next = 22; - return response.json(); - case 22: - apiResults = _context3.sent; - _apiResults$error3 = apiResults.error, error = _apiResults$error3 === void 0 ? null : _apiResults$error3; - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(apiResults), false, error); - setSearch({ - active: true, - term: term, - type: searchType, - results: (0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__.getSearchTotal)(apiResults) - }); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.saveSession)(url, apiResults); - _context3.next = 35; - break; - case 29: - _context3.prev = 29; - _context3.t0 = _context3["catch"](19); - // Reset all search parameters. - setDone(true); - setLoading(false); - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__["default"])(provider, status); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.deleteSession)(url); - case 35: - searchInputRef.current.classList.remove(searchClass); - case 36: - case "end": - return _context3.stop(); - } - }, _callee3, null, [[19, 29]]); - })); - return _doSearch.apply(this, arguments); - } - function displayResults() { - var images = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - var append = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - var error = arguments.length > 2 ? arguments[2] : undefined; - checkResults(images === null || images === void 0 ? void 0 : images.length); - if (append) { - setResults(function (prevState) { - return [].concat(_toConsumableArray(prevState), _toConsumableArray(images)); - }); // Load more. - } else { - setResults(images); // Standard switch. - } - setAPIError(error); - } - - /** - * Handle the Photo Search. - * - * @param {Event} event The dispatched submit event. - * @since 3.0 - */ - function searchHandler(event) { - event.preventDefault(); - var term = searchInputRef.current.value; - if (term.length > 2) { - searchInputRef.current.classList.add(searchClass); - doSearch(term); - } else { - searchInputRef.current.focus(); - } - } - - /** - * Reset search results, settings and results view. - * - * @since 3.0 - */ - function clearSearch() { - var _searchInputRef$curre; - var term = (searchInputRef === null || searchInputRef === void 0 || (_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 ? void 0 : _searchInputRef$curre.value) || ''; - if (term) { - searchInputRef.current.value = ''; - } - setSearch(searchDefaults); - setSuggestions([]); - } - - /** - * Filter the photo listing. - * - * @param {string} filter The current filter key. - * @param {string} value The value to filter. - */ - function filterPhotos(filter, value) { - var newFilters = _objectSpread({}, filters); - if (newFilters[filter] && value === '#' || value === '' || value === 'all') { - delete newFilters[filter]; - } else { - newFilters[filter] = value; - } - setFilters(_objectSpread({}, newFilters)); - } - - /** - * Filter the search results. - * - * @param {string} filter The current filter key. - * @param {string} value The value to filter. - */ - function filterSearch(filter, value) { - var newSearchFilters = _objectSpread({}, searchFilters); - if (newSearchFilters[filter] && value === '#' || value === '' || value === 'all') { - delete newSearchFilters[filter]; - } else { - newSearchFilters[filter] = value; - } - setSearchFilters(_objectSpread({}, newSearchFilters)); - } - - /** - * Close the API Lightbox. - * - * @param {string} target The target provider to close the lightbox for. - * @since 4.5 - */ - function closeAPILightbox() { - var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - if (target) { - setActiveProvider(target); - } - setShowAPILightbox(false); - setLoading(false); - setAPIError(false); - body.classList.remove('overflow-hidden'); - } - - /** - * Switch API providers. - * - * @param {string} newProvider The provider to switch to. - * @since 4.5 - */ - function switchProvider(_x2) { - return _switchProvider.apply(this, arguments); - } - /** - * Get autocomplete search suggestions. - * - * @param {string} term The search term. - * @return {Array} The autocomplete suggestions. - */ - function _switchProvider() { - _switchProvider = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(newProvider) { - var response, status, headers; - return _regeneratorRuntime().wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - if (!(activeProvider === newProvider)) { - _context4.next = 2; - break; - } - return _context4.abrupt("return"); - case 2: - setLoading(true); - setAPIError(false); - setShowAPILightbox(false); - body.classList.remove('overflow-hidden'); - - // API verification - check API key for provider. - if (!(_constants_API__WEBPACK_IMPORTED_MODULE_4__.API[newProvider].requires_key && !apiTested.includes(newProvider))) { - _context4.next = 27; - break; - } - _context4.prev = 7; - _context4.next = 10; - return fetch((0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__.buildTestURL)(newProvider)); - case 10: - response = _context4.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - if (!(status !== 200)) { - _context4.next = 18; - break; - } - // Catch API errors and 401s. - setShowAPILightbox(newProvider); // Show API Lightbox. - setAPIError(true); - body.classList.add('overflow-hidden'); - return _context4.abrupt("return"); - case 18: - if (status === 200) { - // Valid API key - Add to array of tested providers. - setAPITested(function (prevState) { - return [].concat(_toConsumableArray(prevState), [newProvider]); - }); - } - _context4.next = 27; - break; - case 21: - _context4.prev = 21; - _context4.t0 = _context4["catch"](7); - // Catch all other errors. - setShowAPILightbox(newProvider); // Show API Lightbox. - body.classList.add('overflow-hidden'); - setAPIError(true); - return _context4.abrupt("return"); - case 27: - // Add slight delay for loading effect. - setTimeout(function () { - setFilterOptions(_constants_filters__WEBPACK_IMPORTED_MODULE_5__.FILTERS[newProvider].filters); // Update filter options. - setActiveProvider(newProvider); // Switch the provider. - }, delay); - case 28: - case "end": - return _context4.stop(); - } - }, _callee4, null, [[7, 21]]); - })); - return _switchProvider.apply(this, arguments); - } - function getSuggestions(_x3) { - return _getSuggestions.apply(this, arguments); - } - /** - * Renders the Masonry layout. - * - * @since 3.0 - */ - function _getSuggestions() { - _getSuggestions = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(term) { - var api_url; - return _regeneratorRuntime().wrap(function _callee5$(_context5) { - while (1) switch (_context5.prev = _context5.next) { - case 0: - if (!(!term || (term === null || term === void 0 ? void 0 : term.length) < 3)) { - _context5.next = 2; - break; - } - return _context5.abrupt("return"); - case 2: - // API endpoint URL. - api_url = instant_img_localize.root + "instant-images-extended/suggestions/?term=".concat(term); // Get suggestions. - _context5.next = 5; - return axios__WEBPACK_IMPORTED_MODULE_27__["default"].get(api_url).then(function (res) { - setSuggestions(res.data); - })["catch"](function (error) { - console.warn(error); - }); - case 5: - case "end": - return _context5.stop(); - } - }, _callee5); - })); - return _getSuggestions.apply(this, arguments); - } - function renderLayout() { - imagesLoaded(photosRef.current, function () { - if (!isBlockEditor) { - msnryRef.current = new (masonry_layout__WEBPACK_IMPORTED_MODULE_2___default())(photosRef.current, { - itemSelector: '.photo' - }); - photosRef.current.querySelectorAll('.photo').forEach(function (el) { - el.classList.add('in-view'); - }); - } - setTimeout(function () { - // Delay to allow for rendering and set up. - setLoading(false); - setLoadingMore(false); - if (!mounted) { - setMounted(true); - } - }, delay); - }); - } - - /** - * Reset the scroll position for the WP block only. - */ - function resetScrollPosition() { - if (wpBlock && photosRef !== null && photosRef !== void 0 && photosRef.current) { - photosRef === null || photosRef === void 0 || photosRef.current.scroll({ - top: 0, - left: 0, - behavior: 'smooth' - }); - } - } - - /** - * A checker to determine if there are remaining search results. - * - * @param {number} num Total search results. - * @since 3.0 - */ - function checkResults(num) { - setDone(parseInt(num) === 0 || num === undefined); - } - - /** - * Escape handler to close edit windows on photos. - * - * @param {Event} e The key event. - */ - function escFunction(e) { - var key = e.key; - if (key === 'Escape') { - var editing = photosRef.current.querySelectorAll('.edit-screen.editing'); - if (editing) { - _toConsumableArray(editing).forEach(function (element) { - element === null || element === void 0 || element.classList.remove('editing'); - }); - } - } - } - - /* Search callback. */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (!(search !== null && search !== void 0 && search.active)) { - // Reset search filters when search is false. - setSearchFilters({}); - } - }, [search]); // eslint-disable-line react-hooks/exhaustive-deps - - /* Search filters change callback. */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (mounted && search !== null && search !== void 0 && search.active) { - doSearch(search === null || search === void 0 ? void 0 : search.term); - } - }, [searchFilters]); // eslint-disable-line react-hooks/exhaustive-deps - - // Filters change callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (mounted) { - getPhotos(); - } - }, [filters]); // eslint-disable-line react-hooks/exhaustive-deps - - // Provider change callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - setFilterOptions(_constants_filters__WEBPACK_IMPORTED_MODULE_5__.FILTERS[activeProvider].filters); - setFilters({}); // Trigger filter change. - }, [activeProvider]); // eslint-disable-line react-hooks/exhaustive-deps - - // Scroll in-view callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - // Infinite scrolling. - loadMorePhotos(); - }, [inView]); // eslint-disable-line react-hooks/exhaustive-deps - - // Results callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - renderLayout(); - }, [results]); // eslint-disable-line react-hooks/exhaustive-deps - - // Initial page load. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - setLoading(false); - wrapper.classList.add('loaded'); - - // Block editor, get initial set of photos. - if (isBlockEditor) { - getPhotos(); - } - // Add global escape listener. - document.addEventListener('keydown', escFunction, false); - return function () { - document.removeEventListener('keydown', escFunction, false); - }; - }, []); // eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement(_common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__.PluginProvider, { - value: { - provider: activeProvider, - wpBlock: wpBlock, - mediaModal: mediaModal, - blockSidebar: blockSidebar, - clientId: clientId, - search: search, - apiError: apiError, - getPhotos: getPhotos, - searchHandler: searchHandler, - filterSearch: filterSearch, - suggestions: suggestions, - getSuggestions: getSuggestions - } - }, wpBlock ? /*#__PURE__*/React.createElement(_editor_block_components_Header__WEBPACK_IMPORTED_MODULE_6__["default"], { - switchProvider: switchProvider - }) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_ProviderNav__WEBPACK_IMPORTED_MODULE_18__["default"], { - switchProvider: switchProvider - }), /*#__PURE__*/React.createElement(_cta_Extended__WEBPACK_IMPORTED_MODULE_23__.ExtendedCTA, null)), /*#__PURE__*/React.createElement(_RestAPIError__WEBPACK_IMPORTED_MODULE_19__["default"], null), /*#__PURE__*/React.createElement("div", { - className: "control-nav" - }, /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('control-nav--filters-wrap', apiError || search !== null && search !== void 0 && search.active ? 'inactive' : null) - }, filterOptions && (_Object$entries = Object.entries(filterOptions)) !== null && _Object$entries !== void 0 && _Object$entries.length ? /*#__PURE__*/React.createElement("div", { - className: "control-nav--filters" - }, Object.entries(filterOptions).map(function (_ref, index) { - var _ref2 = _slicedToArray(_ref, 2), - key = _ref2[0], - filter = _ref2[1]; - return /*#__PURE__*/React.createElement(_Filter__WEBPACK_IMPORTED_MODULE_15__["default"], { - key: "".concat(activeProvider, "-").concat(index, "-").concat(key), - data: filter, - filterKey: key, - handler: filterPhotos - }); - })) : null), /*#__PURE__*/React.createElement(_search_SearchForm__WEBPACK_IMPORTED_MODULE_24__["default"], { - ref: searchInputRef - })), /*#__PURE__*/React.createElement("div", { - id: "photo-listing", - className: loading ? 'loading' : null - }, /*#__PURE__*/React.createElement(_search_SearchHeader__WEBPACK_IMPORTED_MODULE_25__["default"], null), wpBlock ? /*#__PURE__*/React.createElement(_ResultsWPBlock__WEBPACK_IMPORTED_MODULE_21__["default"], { - ref: photosRef, - data: results, - done: done, - loadMorePhotos: loadMorePhotos - }) : /*#__PURE__*/React.createElement(_Results__WEBPACK_IMPORTED_MODULE_20__["default"], { - ref: photosRef, - data: results - }), /*#__PURE__*/React.createElement(_NoResults__WEBPACK_IMPORTED_MODULE_17__["default"], { - total: search === null || search === void 0 ? void 0 : search.results, - is_search: search === null || search === void 0 ? void 0 : search.active - }), /*#__PURE__*/React.createElement(_LoadMore__WEBPACK_IMPORTED_MODULE_16__["default"], { - ref: loadMoreRef, - loadMorePhotos: loadMorePhotos, - loading: loadingMore, - done: done - }), /*#__PURE__*/React.createElement(_APILightbox__WEBPACK_IMPORTED_MODULE_13__["default"], { - provider: showAPILightbox, - callback: closeAPILightbox - }), /*#__PURE__*/React.createElement(_ErrorLightbox__WEBPACK_IMPORTED_MODULE_14__["default"], null), /*#__PURE__*/React.createElement(_Tooltip__WEBPACK_IMPORTED_MODULE_22__["default"], null)))); -} - -/***/ }), - -/***/ "./src/js/components/LoadMore.js": -/*!***************************************!*\ - !*** ./src/js/components/LoadMore.js ***! - \***************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); - - - - -/** - * Render the LoadMore component. - * - * @return {JSX.Element} The LoadMore component. - */ -var LoadMore = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var loadMorePhotos = props.loadMorePhotos, - loading = props.loading, - done = props.done; - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('load-more-wrap', loading ? 'loading' : null, done ? 'done' : null), - ref: ref - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button", - onClick: function onClick() { - return loadMorePhotos(); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Load More Images', 'instant-images'))); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LoadMore); - -/***/ }), - -/***/ "./src/js/components/NoResults.js": -/*!****************************************!*\ - !*** ./src/js/components/NoResults.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ NoResults) -/* harmony export */ }); -/** - * Render the NoResults component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The NoResults component. - */ -function NoResults(props) { - var _props$total = props.total, - total = _props$total === void 0 ? 0 : _props$total, - _props$is_search = props.is_search, - is_search = _props$is_search === void 0 ? false : _props$is_search; - if (!is_search || is_search && total >= 1) { - // Bail if not search or search total is greater than 1. - return null; - } - return /*#__PURE__*/React.createElement("div", { - className: "instant-images-no-results" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", null, instant_img_localize.no_results, " "), /*#__PURE__*/React.createElement("p", null, instant_img_localize.no_results_desc, " "))); -} - -/***/ }), - -/***/ "./src/js/components/Photo.js": -/*!************************************!*\ - !*** ./src/js/components/Photo.js ***! - \************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Photo) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _editor_utils_insertImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../editor/utils/insertImage */ "./src/js/editor/utils/insertImage.js"); -/* harmony import */ var _editor_utils_setFeaturedImage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../editor/utils/setFeaturedImage */ "./src/js/editor/utils/setFeaturedImage.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _functions_providers_unsplash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../functions/providers/unsplash */ "./src/js/functions/providers/unsplash.js"); -/* harmony import */ var _functions_generateAttribution__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../functions/generateAttribution */ "./src/js/functions/generateAttribution.js"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - - - - -/** - * Render the Photo component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The Photo component. - */ -function Photo(props) { - var result = props.result, - setInactive = props.setInactive; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider, - _usePluginContext$wpB = _usePluginContext.wpBlock, - wpBlock = _usePluginContext$wpB === void 0 ? false : _usePluginContext$wpB, - _usePluginContext$med = _usePluginContext.mediaModal, - mediaModal = _usePluginContext$med === void 0 ? false : _usePluginContext$med, - _usePluginContext$blo = _usePluginContext.blockSidebar, - blockSidebar = _usePluginContext$blo === void 0 ? false : _usePluginContext$blo, - clientId = _usePluginContext.clientId; - var id = result.id, - filename = result.id, - permalink = result.permalink, - title = result.title, - alt = result.alt, - caption = result.caption, - attribution = result.attribution, - _result$extension = result.extension, - extension = _result$extension === void 0 ? 'jpg' : _result$extension, - likes = result.likes, - dimensions = result.dimensions, - urls = result.urls, - user = result.user; - - // Deconstruct image URLs. - var thumb = urls.thumb, - full = urls.full, - download_url = urls.download_url; - - // Deconstruct user data. - var user_name = user.name, - user_photo = user.photo, - user_url = user.url; - var container = document.querySelector('.instant-img-container'); - var likeDisplay = parseInt(likes) === 1 ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Like', 'instant-images') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Likes', 'instant-images'); - var _instant_img_localize = instant_img_localize, - _instant_img_localize2 = _instant_img_localize.attribution_hook, - attribution_hook = _instant_img_localize2 === void 0 ? false : _instant_img_localize2, - _instant_img_localize3 = _instant_img_localize.auto_attribution, - auto_attribution = _instant_img_localize3 === void 0 ? false : _instant_img_localize3; - - // Get the attribution text. - var imageAttribution = attribution_hook ? (0,_functions_generateAttribution__WEBPACK_IMPORTED_MODULE_7__["default"])(attribution_hook, provider, permalink, user) : attribution; - var imageCaption = auto_attribution === '1' ? imageAttribution : caption; - - // Photo state. - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ - filename: filename, - title: title, - alt: alt, - caption: imageCaption - }), - _useState2 = _slicedToArray(_useState, 2), - imageDetails = _useState2[0], - setImageDetails = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState4 = _slicedToArray(_useState3, 2), - inProgress = _useState4[0], - setInProgress = _useState4[1]; // inProgress state. - var _useState5 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('loaded'), - _useState6 = _slicedToArray(_useState5, 2), - status = _useState6[0], - setStatus = _useState6[1]; // Status state. - var _useState7 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(''), - _useState8 = _slicedToArray(_useState7, 2), - editURL = _useState8[0], - setEditURL = _useState8[1]; // Edit URL state. - - // Refs. - var photo = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var image = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var upload = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var editScreen = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var captionRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - - // Gutenberg. - var setAsFeaturedImage = false; - var insertIntoPost = false; - - /** - * Function to trigger the image download. - * - * @since 4.3 - */ - function download() { - if (inProgress || status === 'success' || status === 'uploaded') { - return false; // Exit if uploading, uploaded or success. - } - var target = upload === null || upload === void 0 ? void 0 : upload.current; - setInProgress(true); - setStatus('uploading'); - if (wpBlock) { - setInactive(true); // Make Instant Images inactive after selecting an image. - } - - // API URL - var api = instant_img_localize.root + 'instant-images/download/'; - - // Data Params - var data = { - provider: provider, - id: target.getAttribute('data-id'), - image_url: target.getAttribute('data-url'), - filename: target.getAttribute('data-id'), - extension: extension, - custom_filename: target.getAttribute('data-filename'), - title: target.getAttribute('data-title'), - alt: target.getAttribute('data-alt'), - caption: target.getAttribute('data-caption'), - parent_id: instant_img_localize.parent_id, - lang: instant_img_localize.lang - }; - - // Config Params - var config = { - credentials: 'same-origin', - headers: { - 'X-WP-Nonce': instant_img_localize.nonce, - 'Content-Type': 'application/json' - } - }; - axios__WEBPACK_IMPORTED_MODULE_9__["default"].post(api, JSON.stringify(data), config).then(function (res) { - var response = res.data; - if (response) { - // Successful response from server - var success = response.success; - var attachment = response.attachment; - var admin_url = response.admin_url; - var msg = response.msg; - if (success) { - var edit_url = "".concat(admin_url, "post.php?post=").concat(attachment.id, "&action=edit"); // Edit URL. - setEditURL(edit_url); - uploadComplete(target, msg, attachment.id); // Success/Upload Complete - - // Trigger a download at Unsplash. - if (provider === 'unsplash' && download_url) { - (0,_functions_providers_unsplash__WEBPACK_IMPORTED_MODULE_6__.unsplashDownload)(download_url); - } - - /** - * Gutenberg options. - */ - - // Set Featured Image via Sidebar. - if (blockSidebar && setAsFeaturedImage) { - (0,_editor_utils_setFeaturedImage__WEBPACK_IMPORTED_MODULE_4__["default"])(attachment); - setAsFeaturedImage = false; - closeMediaModal(); - } - - // Insert Image via Sidebar. - if (blockSidebar && insertIntoPost) { - setTimeout(function () { - // Delay for effect. - (0,_editor_utils_insertImage__WEBPACK_IMPORTED_MODULE_3__["default"])(attachment); - }, 250); - closeMediaModal(); - insertIntoPost = false; - } - - // Insert Image via WP Block. - if (wpBlock && clientId) { - setStatus('uploaded'); - setTimeout(function () { - // Delay for effect. - (0,_editor_utils_insertImage__WEBPACK_IMPORTED_MODULE_3__["default"])(attachment, clientId); - }, 350); - closeMediaModal(); - insertIntoPost = false; - } - - /** - * Media Modal. - * If is media popup, redirect user to media-upload settings. - */ - if (container.dataset.mediaPopup === 'true' && !blockSidebar) { - window.location = 'media-upload.php?type=image&tab=library&attachment_id=' + attachment.id; - } - } else { - // Error - uploadError(target, msg); - } - } else { - // Error - uploadError(target, instant_img_localize.error_upload); - } - })["catch"](function (error) { - console.warn(error); - }); - } - - /** - * Upload complete function. - * - * @param {Element} target Clicked item. - * @param {string} msg Success Msg. - * @param {string} imageID Attachment id. - * @since 3.0 - */ - function uploadComplete(target, msg, imageID) { - if (!(photo !== null && photo !== void 0 && photo.current)) { - return; - } - setImageTitle(target, msg); - setStatus('uploaded'); - setInProgress(false); - - // Remove uploaded status after 3.5 seconds. - setTimeout(function () { - setStatus('success'); - }, 3500); - - // Refresh Media Router/Modal. - refreshMediaModal(imageID); - } - - /** - * Handler to send user to edit photo link after upload. - * - * @since 5.2.0 - */ - function editAfterUpload() { - if (editURL) { - window.location = editURL; - } - } - - /** - * Function used to trigger a download and then set as featured image - * - * @param {Element} e The clicked element. - * @since 4.0 - */ - function setFeaturedImageClick(e) { - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - if (upload.current) { - setAsFeaturedImage = true; - upload.current.click(); - } - } - - /** - * Function used to insert an image directly into the block (Gutenberg) editor. - * - * @param {Element} e The clicked element. - * @since 4.0 - */ - function insertImageIntoPost(e) { - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - if (upload.current) { - insertIntoPost = true; - upload.current.click(); - } - } - - /** - * Refresh Media Modal and select item after it's been uploaded. - * - * @param {string} modalID The media modal ID. - * @since 4.3 - */ - function refreshMediaModal(modalID) { - if (mediaModal && wp.media && wp.media.frame && wp.media.frame.el) { - var mediaModalEl = wp.media.frame.el; - var mediaTab = mediaModalEl.querySelector('#menu-item-browse'); - if (mediaTab) { - // Open the 'Media Library' tab. - mediaTab.click(); - } - - // Delay to allow for tab switching - setTimeout(function () { - if (wp.media.frame.content.get() !== null) { - // Force a refresh of the mdeia modal content. - wp.media.frame.content.get().collection._requery(true); - } - - // Select the attached that was just uploaded. - var selection = wp.media.frame.state().get('selection'); - var selected = parseInt(modalID); - selection.reset(selected ? [wp.media.attachment(selected)] : []); - }, 100); - } - } - - /** - * Function runs when error occurs on upload or resize. - * - * @param {Element} target Current clicked item. - * @param {string} msg Error Msg. - * @since 3.0 - */ - function uploadError(target, msg) { - setImageTitle(target, msg); - setInProgress(false); - setStatus('error'); - setInactive(false); - console.warn(msg); - } - - /** - * Set the title attribute of target. - * - * @param {Element} target Clicked element. - * @param {string} msg Title message from JSON. - * @since 3.0 - */ - function setImageTitle(target, msg) { - target.setAttribute('title', msg); // Remove 'Click to upload...', set new value - } - - /** - * Displays the edit screen. - * - * @param {Element} e The target element. - * @since 3.2 - */ - function showEditScreen(e) { - e.preventDefault(); - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - - // Get all open edit screens and close them. - var openEdits = document.querySelectorAll('.edit-screen.editing'); - if (openEdits) { - openEdits.forEach(function (edit) { - edit.classList.remove('editing'); - }); - } - - // Show edit screen - editScreen.current.classList.add('editing'); - - // Set focus on edit screen - setTimeout(function () { - editScreen.current.focus({ - preventScroll: true - }); - }, 150); - } - - /** - * Handles the change event for the edit screen. - * - * @param {Element} e The target element. - * @since 3.2 - */ - function handleEditChange(e) { - var target = e.target.name; - switch (target) { - case 'filename': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - filename: e.target.value - })); - break; - case 'title': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - title: e.target.value - })); - break; - case 'alt': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - alt: e.target.value - })); - break; - case 'caption': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - caption: e.target.value - })); - break; - } - } - - /** - * Handles the Upload event from the edit screen. - * - * @since 3.2 - */ - function uploadNow() { - editScreen.current.classList.remove('editing'); // Hide edit screen. - upload.current.click(); // Trigger click. - } - - /** - * Cancel event for the edit screen. - * - * @since 3.2 - */ - function cancelEdit() { - // Reset image state. - setImageDetails({ - filename: filename, - title: title, - alt: alt, - caption: imageCaption - }); - - // Hide edit screen - editScreen.current.classList.remove('editing'); - - // Set focus back on photo. - upload.current.focus({ - preventScrol: true - }); - } - - /** - * Close the media modal after an action. - * - * @since 4.3 - */ - function closeMediaModal() { - var mediaModalEl = document.querySelector('.media-modal'); - if (mediaModalEl) { - var closeBtn = mediaModalEl.querySelector('button.media-modal-close'); - if (!closeBtn) { - return false; - } - closeBtn.click(); - } - } - - /** - * Handles adding attribution for images. - * - * @param {Element} e The target element. - * @since 4.5 - */ - function addAttribution(e) { - e.preventDefault(); - captionRef.current.value = imageAttribution; // Set form value. - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - caption: imageAttribution - })); // Set caption state. - } - - /** - * Show a GIF preview image. - * Giphy only. - * - * @param {boolean} show Show a preview. - */ - function showPreview(show) { - if (!provider === 'giphy') { - return; - } - if (show) { - image.current.src = full; - } else { - image.current.src = thumb; - } - } - return /*#__PURE__*/React.createElement("article", { - className: "photo", - ref: photo - }, /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('photo-wrap', "photo-".concat(status)) - }, /*#__PURE__*/React.createElement("div", { - className: "img-wrap" - }, /*#__PURE__*/React.createElement("button", { - className: "photo-upload", - ref: upload, - "data-id": id, - "data-url": full, - "data-filename": imageDetails.filename, - "data-title": imageDetails.title, - "data-alt": imageDetails.alt, - "data-caption": imageDetails.caption, - "aria-label": wpBlock ? instant_img_localize.insert_into_post : instant_img_localize.upload, - onClick: function onClick() { - return download(); - }, - onMouseEnter: function onMouseEnter() { - return showPreview(true); - }, - onMouseLeave: function onMouseLeave() { - return showPreview(false); - } - }, /*#__PURE__*/React.createElement("img", { - src: thumb, - alt: alt, - className: status, - ref: image - })), /*#__PURE__*/React.createElement("div", { - className: "photo-controls" - }, /*#__PURE__*/React.createElement("a", { - target: "_blank", - className: "user fade", - href: user_url, - rel: "noopener noreferrer", - title: "".concat(instant_img_localize.view_all, " @ ").concat(user_name) - }, /*#__PURE__*/React.createElement("div", { - className: "user-wrap" - }, (user_photo === null || user_photo === void 0 ? void 0 : user_photo.length) > 0 && /*#__PURE__*/React.createElement("img", { - className: "user-wrap--photo", - src: user_photo, - alt: "" - }), user_name)), /*#__PURE__*/React.createElement("div", { - className: "photo-options" - }, blockSidebar && !editURL ? /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "set-featured fade", - "data-title": instant_img_localize.set_as_featured, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - onClick: function onClick(e) { - return setFeaturedImageClick(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-picture-o", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.set_as_featured)), /*#__PURE__*/React.createElement("button", { - type: "button", - className: "insert fade", - "data-title": instant_img_localize.insert_into_post, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - onClick: function onClick(e) { - return insertImageIntoPost(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-plus", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.insert_into_post))) : null, !!wpBlock && /*#__PURE__*/React.createElement("button", { - type: "button", - className: "insert fade", - "data-title": instant_img_localize.insert_into_post, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - onClick: function onClick(e) { - return insertImageIntoPost(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-plus", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.insert_into_post)), editURL ? /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return editAfterUpload(); - }, - className: "edit-photo-admin fade", - "data-title": instant_img_localize.edit_upload, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-pencil", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.edit_upload)) : /*#__PURE__*/React.createElement("button", { - onClick: function onClick(e) { - return showEditScreen(e); - }, - className: "edit-photo fade", - "data-title": instant_img_localize.edit_details, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-cog", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.edit_details)))), /*#__PURE__*/React.createElement("div", { - className: "photo-meta" - }, likes ? /*#__PURE__*/React.createElement("span", { - className: "likes tooltip--above", - "data-title": likes + ' ' + likeDisplay, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-heart heart-like", - "aria-hidden": "true" - }), " ", likes) : null, /*#__PURE__*/React.createElement("a", { - className: "tooltip--above", - href: permalink, - "data-title": "".concat(instant_img_localize.open_external, " ").concat((0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.capitalizeFirstLetter)(provider)), - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - rel: "noopener noreferrer", - target: "_blank" - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-external-link", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, "".concat(instant_img_localize.open_external, " ").concat((0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.capitalizeFirstLetter)(provider)))))), /*#__PURE__*/React.createElement("div", { - className: "edit-screen", - tabIndex: "0", - ref: editScreen - }, /*#__PURE__*/React.createElement("div", { - className: "edit-screen--title" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", { - className: "heading" - }, instant_img_localize.edit_details), dimensions && dimensions.length > 0 && /*#__PURE__*/React.createElement("p", { - className: "dimensions" - }, dimensions)), /*#__PURE__*/React.createElement("div", { - className: "preview", - style: { - backgroundImage: "url(".concat(thumb, ")") - } - })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_filename, ":"), /*#__PURE__*/React.createElement("input", { - type: "text", - name: "filename", - "data-original": filename, - placeholder: imageDetails.filename, - value: imageDetails.filename, - onChange: function onChange(e) { - return handleEditChange(e); - } - }), /*#__PURE__*/React.createElement("em", null, ".", extension)), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_title, ":"), /*#__PURE__*/React.createElement("input", { - type: "text", - name: "title", - "data-original": title, - placeholder: title, - value: imageDetails.title || '', - onChange: function onChange(e) { - return handleEditChange(e); - } - })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_alt, ":"), /*#__PURE__*/React.createElement("input", { - type: "text", - name: "alt", - "data-original": alt, - value: imageDetails.alt || '', - onChange: function onChange(e) { - return handleEditChange(e); - } - })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_caption, ":"), /*#__PURE__*/React.createElement("textarea", { - rows: "4", - name: "caption", - "data-original": imageCaption, - onChange: function onChange(e) { - return handleEditChange(e); - }, - value: imageDetails.caption || '', - ref: captionRef - })), imageAttribution ? /*#__PURE__*/React.createElement("div", { - className: "add-attribution-row" - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick(e) { - return addAttribution(e); - }, - type: "button" - }, instant_img_localize.attribution)) : null, /*#__PURE__*/React.createElement("div", { - className: "edit-screen--controls" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button button-secondary", - onClick: function onClick(e) { - return cancelEdit(e); - } - }, instant_img_localize.cancel), ' ', "\xA0", /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button button-primary", - onClick: function onClick() { - return uploadNow(); - } - }, wpBlock ? instant_img_localize.insert_into_post : instant_img_localize.upload_now))), /*#__PURE__*/React.createElement("div", { - className: "photo-status" - }))); -} - -/***/ }), - -/***/ "./src/js/components/ProviderIcons.js": -/*!********************************************!*\ - !*** ./src/js/components/ProviderIcons.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ GiphyIcon: () => (/* binding */ GiphyIcon), -/* harmony export */ OpenverseIcon: () => (/* binding */ OpenverseIcon), -/* harmony export */ PexelsIcon: () => (/* binding */ PexelsIcon), -/* harmony export */ PixabayIcon: () => (/* binding */ PixabayIcon), -/* harmony export */ UnsplashIcon: () => (/* binding */ UnsplashIcon), -/* harmony export */ getProviderIcon: () => (/* binding */ getProviderIcon) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); - - -/** - * Return the provider icon. - * - * @param {string} provider The provider. - * @return {JSX.Element} The provider icon. - */ -function getProviderIcon(provider) { - if (!provider) { - return null; - } - return _constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider.toLowerCase()].icon ? _constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider.toLowerCase()].icon() : null; -} - -/** - * Giphy Icon. - */ -function GiphyIcon() { - return /*#__PURE__*/React.createElement("svg", { - height: "35", - width: "32", - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 32 35" - }, /*#__PURE__*/React.createElement("g", { - fill: "none", - fillRule: "evenodd" - }, /*#__PURE__*/React.createElement("path", { - d: "M4 4h20v27H4z", - fill: "#000" - }), /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", { - d: "M0 3h4v29H0z", - fill: "#04ff8e" - }), /*#__PURE__*/React.createElement("path", { - d: "M24 11h4v21h-4z", - fill: "#8e2eff" - }), /*#__PURE__*/React.createElement("path", { - d: "M0 31h28v4H0z", - fill: "#00c5ff" - }), /*#__PURE__*/React.createElement("path", { - d: "M0 0h16v4H0z", - fill: "#fff152" - }), /*#__PURE__*/React.createElement("path", { - d: "M24 8V4h-4V0h-4v12h12V8", - fill: "#ff5b5b" - }), /*#__PURE__*/React.createElement("path", { - d: "M24 16v-4h4", - fill: "#551c99" - })), /*#__PURE__*/React.createElement("path", { - d: "M16 0v4h-4", - fill: "#999131" - }))); -} - -/** - * Unsplash Icon. - */ -function UnsplashIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32", - height: "32", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("path", { - d: "M10 9V0H22V9H10ZM22 14H32V32H0V14H10V23H22V14Z", - fill: "black" - })); -} - -/** - * Pixabay Icon. - */ -function PixabayIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32", - height: "32", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("g", { - clipPath: "url(#clip0_307_143)" - }, /*#__PURE__*/React.createElement("path", { - d: "M0 0V32H32V0H0Z", - fill: "#48A947" - }), /*#__PURE__*/React.createElement("path", { - d: "M6.83734 22.3147V28C5.93067 28.0427 5.02401 28.032 4.11734 27.9787C4.09601 27.7014 4.06401 27.4667 4.06401 27.2427C4.06401 23.2427 4.05334 19.2534 4.06401 15.2534C4.07467 12.032 5.97334 9.32269 8.85334 8.37335C13.1307 6.95469 17.4507 10.048 17.8453 14.3894C18.144 17.6534 16.4267 20.5547 13.568 21.7814C12.6507 22.176 11.6907 22.304 10.7093 22.304C9.45067 22.3147 8.21334 22.3147 6.83734 22.3147ZM6.84801 19.4454C8.24534 19.4454 9.54667 19.424 10.848 19.4454C13.1627 19.488 14.816 17.76 15.104 15.712C15.424 13.3654 13.7813 11.2107 11.4453 10.88H11.4347C9.25867 10.592 7.06134 12.2774 6.88001 14.528C6.74134 16.128 6.84801 17.728 6.84801 19.4454Z", - fill: "#F9FBF9" - }), /*#__PURE__*/React.createElement("path", { - d: "M25.4827 14.9334L30.656 22.2081H27.3067L23.4667 16.9494C22.0694 18.6881 20.9067 20.4907 19.584 22.2081H16.2454L21.408 14.9334L16.8107 8.04272H20.16L23.4454 12.9494L26.7307 8.04272H30.0694L25.4827 14.9334Z", - fill: "#FAFCFA" - }), /*#__PURE__*/React.createElement("path", { - d: "M6.848 19.4453C6.848 17.7279 6.74134 16.1173 6.86934 14.5386C7.05067 12.2879 9.248 10.6026 11.424 10.8906C13.7707 11.2106 15.4133 13.3653 15.0933 15.7119C14.816 17.7599 13.152 19.4879 10.8373 19.4453C9.54667 19.4239 8.24534 19.4453 6.848 19.4453Z", - fill: "#4AA949" - })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", { - id: "clip0_307_143" - }, /*#__PURE__*/React.createElement("rect", { - width: "32", - height: "32", - fill: "white" - })))); -} - -/** - * Openverse Icon. - */ -function OpenverseIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32", - height: "32", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("path", { - d: "M25.8578 14.32C29.6708 14.32 32.7618 11.1144 32.7618 7.16C32.7618 3.20564 29.6708 0 25.8578 0C22.0448 0 18.9539 3.20564 18.9539 7.16C18.9539 11.1144 22.0448 14.32 25.8578 14.32Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M0.761841 7.16C0.761841 11.1 3.84742 14.32 7.66584 14.32V0C3.84742 0 0.761841 3.2 0.761841 7.16Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M9.85791 7.16C9.85791 11.1 12.9435 14.32 16.7619 14.32V0C12.9628 0 9.85791 3.2 9.85791 7.16Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M25.8578 31.9399C29.6708 31.9399 32.7618 28.7343 32.7618 24.78C32.7618 20.8256 29.6708 17.62 25.8578 17.62C22.0448 17.62 18.9539 20.8256 18.9539 24.78C18.9539 28.7343 22.0448 31.9399 25.8578 31.9399Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M9.85791 24.7801C9.85791 28.72 12.9435 31.9401 16.7619 31.9401V17.64C12.9628 17.64 9.85791 20.84 9.85791 24.7801Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M0.761841 24.84C0.761841 28.8 3.84742 32 7.66584 32V17.7C3.84742 17.7 0.761841 20.9 0.761841 24.84Z", - fill: "#000000" - })); -} - -/** - * Pexels Icon. - */ -function PexelsIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32px", - height: "32px", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("path", { - d: "M2 0h28a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2z", - fill: "#05A081" - }), /*#__PURE__*/React.createElement("path", { - d: "M13 21h3.863v-3.752h1.167a3.124 3.124 0 1 0 0-6.248H13v10zm5.863 2H11V9h7.03a5.124 5.124 0 0 1 .833 10.18V23z", - fill: "#fff" - })); -} - -/***/ }), - -/***/ "./src/js/components/ProviderNav.js": -/*!******************************************!*\ - !*** ./src/js/components/ProviderNav.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ ProviderNav) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _ProviderIcons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ProviderIcons */ "./src/js/components/ProviderIcons.js"); -/* harmony import */ var _img_logos_giphy_powered_png__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../img/logos/giphy-powered.png */ "./src/img/logos/giphy-powered.png"); - - - - - -var providers = _constants_API__WEBPACK_IMPORTED_MODULE_2__.API.providers; - -/** - * Render the ProviderNav component. - * - * @param {Object} props The component props. - * @param {Object} props.switchProvider The function to switch the provider. - * @return {JSX.Element} The ProviderNav component. - */ -function ProviderNav(_ref) { - var switchProvider = _ref.switchProvider; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - provider = _usePluginContext.provider; - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, !!(providers !== null && providers !== void 0 && providers.length) && /*#__PURE__*/React.createElement("nav", { - className: "provider-nav" - }, providers.map(function (item, index) { - return /*#__PURE__*/React.createElement("div", { - key: "provider-".concat(index) - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return switchProvider(item.toLowerCase()); - }, - className: provider === item.toLowerCase() ? 'provider-nav--btn active' : 'provider-nav--btn' - }, (0,_ProviderIcons__WEBPACK_IMPORTED_MODULE_3__.getProviderIcon)(item), /*#__PURE__*/React.createElement("span", null, item), _constants_API__WEBPACK_IMPORTED_MODULE_2__.API[item.toLowerCase()]["new"] && /*#__PURE__*/React.createElement("span", { - className: "provider-nav--new" - }, instant_img_localize["new"]))); - }), provider === 'giphy' ? /*#__PURE__*/React.createElement("div", { - className: "giphy-powered" - }, /*#__PURE__*/React.createElement("a", { - href: "https://giphy.com", - target: "_blank", - rel: "noreferrer" - }, /*#__PURE__*/React.createElement("img", { - src: _img_logos_giphy_powered_png__WEBPACK_IMPORTED_MODULE_4__, - alt: "Powered by Giphy" - }))) : null)); -} - -/***/ }), - -/***/ "./src/js/components/RestAPIError.js": -/*!*******************************************!*\ - !*** ./src/js/components/RestAPIError.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ RestAPIError) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - -/** - * Render the RestAPIError component. - * - * @return {JSX.Element} The RestAPIError component. - */ -function RestAPIError() { - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(true), - _useState2 = _slicedToArray(_useState, 2), - access = _useState2[0], - setAccess = _useState2[1]; - - /** - * Test users access to the REST API endpoint. - * - * @since 3.2 - */ - function test() { - var testURL = instant_img_localize.root + 'instant-images/test/'; - var restAPITest = new XMLHttpRequest(); - restAPITest.open('POST', testURL, true); - restAPITest.setRequestHeader('X-WP-Nonce', instant_img_localize.nonce); - restAPITest.setRequestHeader('Content-Type', 'application/json'); - restAPITest.send(); - restAPITest.onload = function () { - if (restAPITest.status >= 200 && restAPITest.status < 400) { - var response = JSON.parse(restAPITest.response); - var success = response.success; - if (!success) { - setAccess(false); - } - } else { - setAccess(false); - } - }; - restAPITest.onerror = function (errorMsg) { - console.warn(errorMsg); - setAccess(false); - }; - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - test(); - }, []); - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, !access ? /*#__PURE__*/React.createElement("div", { - className: "error-messaging" - }, /*#__PURE__*/React.createElement("strong", null, instant_img_localize.error_restapi), instant_img_localize.error_restapi_desc) : null); -} - -/***/ }), - -/***/ "./src/js/components/Results.js": -/*!**************************************!*\ - !*** ./src/js/components/Results.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _Photo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Photo */ "./src/js/components/Photo.js"); -/* harmony import */ var _Sponsor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Sponsor */ "./src/js/components/Sponsor.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - -/** - * Render the Results component. - * - * @return {JSX.Element} The Results component. - */ -var Results = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var data = props.data; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - inactive = _useState2[0], - setInactive = _useState2[1]; - return /*#__PURE__*/React.createElement("div", { - id: "photos", - className: inactive ? 'inactive' : null, - ref: ref - }, !!(data !== null && data !== void 0 && data.length) && data.map(function (result, index) { - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, { - key: "".concat(result.id, "-").concat(index) - }, (result === null || result === void 0 ? void 0 : result.type) === 'instant-images-ad' ? /*#__PURE__*/React.createElement(_Sponsor__WEBPACK_IMPORTED_MODULE_2__["default"], { - result: result - }) : /*#__PURE__*/React.createElement(_Photo__WEBPACK_IMPORTED_MODULE_1__["default"], { - result: result, - type: result === null || result === void 0 ? void 0 : result.type, - setInactive: setInactive - })); - })); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Results); - -/***/ }), - -/***/ "./src/js/components/ResultsWPBlock.js": -/*!*********************************************!*\ - !*** ./src/js/components/ResultsWPBlock.js ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var react_intersection_observer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-intersection-observer */ "./node_modules/react-intersection-observer/dist/index.mjs"); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _editor_block_components_Instructions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../editor/block/components/Instructions */ "./src/js/editor/block/components/Instructions.js"); -/* harmony import */ var _editor_block_components_LoadMore__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../editor/block/components/LoadMore */ "./src/js/editor/block/components/LoadMore.js"); -/* harmony import */ var _Photo__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Photo */ "./src/js/components/Photo.js"); -/* harmony import */ var _Sponsor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Sponsor */ "./src/js/components/Sponsor.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - -/** - * Render the Results component. - * - * @return {JSX.Element} The Results component. - */ -var ResultsWPBlock = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var data = props.data, - _props$done = props.done, - done = _props$done === void 0 ? false : _props$done, - loadMorePhotos = props.loadMorePhotos; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - _usePluginContext$wpB = _usePluginContext.wpBlock, - wpBlock = _usePluginContext$wpB === void 0 ? false : _usePluginContext$wpB; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - inactive = _useState2[0], - setInactive = _useState2[1]; - var _useInView = (0,react_intersection_observer__WEBPACK_IMPORTED_MODULE_6__.useInView)({ - rootMargin: '0px 0px' - }), - _useInView2 = _slicedToArray(_useInView, 2), - loadMoreRef = _useInView2[0], - inView = _useInView2[1]; - - // Scroll in-view callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (wpBlock) { - loadMorePhotos(); - } - }, [inView]); // eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("div", { - id: "photos", - className: inactive ? 'inactive' : null, - ref: ref - }, !!(data !== null && data !== void 0 && data.length) && data.map(function (result, index) { - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, { - key: "".concat(result.id, "-").concat(index) - }, (result === null || result === void 0 ? void 0 : result.type) === 'instant-images-ad' ? /*#__PURE__*/React.createElement(_Sponsor__WEBPACK_IMPORTED_MODULE_5__["default"], { - result: result - }) : /*#__PURE__*/React.createElement(_Photo__WEBPACK_IMPORTED_MODULE_4__["default"], { - result: result, - type: result === null || result === void 0 ? void 0 : result.type, - setInactive: setInactive - })); - }), /*#__PURE__*/React.createElement(_editor_block_components_LoadMore__WEBPACK_IMPORTED_MODULE_3__["default"], { - done: done, - ref: loadMoreRef - })), /*#__PURE__*/React.createElement(_editor_block_components_Instructions__WEBPACK_IMPORTED_MODULE_2__["default"], { - show: data === null || data === void 0 ? void 0 : data.length - })); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ResultsWPBlock); - -/***/ }), - -/***/ "./src/js/components/Sponsor.js": -/*!**************************************!*\ - !*** ./src/js/components/Sponsor.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Sponsor) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Render the Sponsor component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The Sponsor component. - */ -function Sponsor(props) { - var result = props.result; - var _result$data = result.data, - data = _result$data === void 0 ? null : _result$data; - var url = (data === null || data === void 0 ? void 0 : data.url) || ''; - var title = (data === null || data === void 0 ? void 0 : data.title) || ''; - var desc = (data === null || data === void 0 ? void 0 : data.description) || ''; - var avatar = (data === null || data === void 0 ? void 0 : data.avatar) || ''; - var _data$image = data.image, - image = _data$image === void 0 ? null : _data$image; - var _image$src = image.src, - src = _image$src === void 0 ? null : _image$src, - _image$alt = image.alt, - alt = _image$alt === void 0 ? null : _image$alt; - var photo = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var link = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, image && url ? - /*#__PURE__*/ - // eslint-disable-next-line - React.createElement("article", { - className: "photo feature", - title: desc, - ref: photo, - onClick: function onClick() { - return link.current.click(); - } - }, /*#__PURE__*/React.createElement("div", { - className: "photo--wrap" - }, /*#__PURE__*/React.createElement("span", { - className: "flag", - title: instant_img_localize.advertisement - }, instant_img_localize.ad), /*#__PURE__*/React.createElement("div", { - className: "img-wrap" - }, /*#__PURE__*/React.createElement("a", { - className: "loaded", - href: url, - target: "_blank", - ref: link, - rel: "noreferrer" - }, /*#__PURE__*/React.createElement("img", { - src: src, - alt: alt - }))), /*#__PURE__*/React.createElement("div", { - className: "feature-title" - }, avatar && /*#__PURE__*/React.createElement("img", { - src: avatar, - alt: title - }), /*#__PURE__*/React.createElement("span", null, title)))) : null); -} - -/***/ }), - -/***/ "./src/js/components/Tooltip.js": -/*!**************************************!*\ - !*** ./src/js/components/Tooltip.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Tooltip) -/* harmony export */ }); -/** - * Render the Tooltip component. - * - * @return {JSX.Element} The Tooltip component. - */ -function Tooltip() { - return /*#__PURE__*/React.createElement("div", { - id: "tooltip" - }); -} - -/***/ }), - -/***/ "./src/js/components/cta/Extended.js": -/*!*******************************************!*\ - !*** ./src/js/components/cta/Extended.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ ExtendedCTA: () => (/* binding */ ExtendedCTA), -/* harmony export */ ExtendedSearchCTA: () => (/* binding */ ExtendedSearchCTA) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _functions_localStorage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../functions/localStorage */ "./src/js/functions/localStorage.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - -/* eslint-disable */ - -/** - * Generic CTA for the Extended add-on. - * - * @return {JSX.Element} The ExtendedCTA component. - */ -function ExtendedCTA() { - var _instant_img_localize3; - var _instant_img_localize = (_instant_img_localize3 = instant_img_localize) === null || _instant_img_localize3 === void 0 || (_instant_img_localize3 = _instant_img_localize3.addons) === null || _instant_img_localize3 === void 0 ? void 0 : _instant_img_localize3.extended, - _instant_img_localize2 = _instant_img_localize.activated, - activated = _instant_img_localize2 === void 0 ? false : _instant_img_localize2; - var name = 'extended-cta-2024'; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSetting)(name) === 'hide'), - _useState2 = _slicedToArray(_useState, 2), - dissmissed = _useState2[0], - setDismissed = _useState2[1]; // Get setting from localstorage. - - // Hide the CTA. - function remove() { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.saveSettings)(name, 'hide'); - setDismissed(true); - } - return /*#__PURE__*/React.createElement(React.Fragment, null, !activated && !dissmissed ? /*#__PURE__*/React.createElement("div", { - className: "cta-extended cta-extended--standard" - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-bullhorn", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("span", null, "Introducing the", ' ', /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer" - }, "Extended add-on")), ' ', "\u2192 An extension pack of premium features and functionality to enhance the Instant Images plugin."), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer", - className: "button button-primary" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Learn More', 'instant-images')), /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button button-secondary", - onClick: function onClick() { - return remove(); - }, - "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images') - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images')))) : null); -} - -/** - * CTA for the Extended add-on in the search dropdown. - * - * @param {Object} props The component props. - * @param {boolean} props.show Display the component. - * @return {JSX.Element} The ExtendedSearchCTA component. - */ -function ExtendedSearchCTA(_ref) { - var _ref$show = _ref.show, - show = _ref$show === void 0 ? false : _ref$show; - var name = 'extended-cta-search-2024'; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSetting)(name) !== 'hide'), - _useState4 = _slicedToArray(_useState3, 2), - active = _useState4[0], - setActive = _useState4[1]; // Get setting from localstorage. - - // Hide the CTA. - function remove() { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.saveSettings)(name, 'hide'); - setActive(false); - } - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('control-nav--search-history extended-cta', show && active ? 'active' : null) - }, /*#__PURE__*/React.createElement("div", { - className: "cta-extended cta-extended--search" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "closeBtn", - onClick: function onClick() { - return remove(); - }, - "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images') - }, "\xD7", /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images'))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("i", { - className: "fa fa-magic", - "aria-hidden": "true" - }), "Enable search suggestions, history, and maintain current search term while switching providers with the", ' ', /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer" - }, "Extended add-on")), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer", - className: "button button-primary" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Learn More', 'instant-images')))))); -} - -/***/ }), - -/***/ "./src/js/components/search/SearchForm.js": -/*!************************************************!*\ - !*** ./src/js/components/search/SearchForm.js ***! - \************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _functions_localStorage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../functions/localStorage */ "./src/js/functions/localStorage.js"); -/* harmony import */ var _hooks_useClickOutside__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../hooks/useClickOutside */ "./src/js/hooks/useClickOutside.js"); -/* harmony import */ var _cta_Extended__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cta/Extended */ "./src/js/components/cta/Extended.js"); -/* harmony import */ var _SearchHistory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SearchHistory */ "./src/js/components/search/SearchHistory.js"); -/* harmony import */ var _SearchToolTip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./SearchToolTip */ "./src/js/components/search/SearchToolTip.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } -function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); } - - - - - - - - - -/** - * Render the search form as a component. - * - * @return {JSX.Element} The SearchForm component. - */ -var SearchForm = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (_ref, ref) { - var _instant_img_localize4; - _objectDestructuringEmpty(_ref); - var _instant_img_localize = (_instant_img_localize4 = instant_img_localize) === null || _instant_img_localize4 === void 0 || (_instant_img_localize4 = _instant_img_localize4.addons) === null || _instant_img_localize4 === void 0 ? void 0 : _instant_img_localize4.extended, - _instant_img_localize2 = _instant_img_localize.activated, - extended_activated = _instant_img_localize2 === void 0 ? false : _instant_img_localize2, - _instant_img_localize3 = _instant_img_localize.license, - extended_license = _instant_img_localize3 === void 0 ? false : _instant_img_localize3; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - searchHandler = _usePluginContext.searchHandler, - apiError = _usePluginContext.apiError, - suggestions = _usePluginContext.suggestions, - getSuggestions = _usePluginContext.getSuggestions; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]), - _useState2 = _slicedToArray(_useState, 2), - history = _useState2[0], - setHistory = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState4 = _slicedToArray(_useState3, 2), - show = _useState4[0], - setShow = _useState4[1]; - var historyRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); - var submitBtnRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); - - // Handle clickoutside hook. - (0,_hooks_useClickOutside__WEBPACK_IMPORTED_MODULE_4__.useClickOutside)(historyRef, function () { - setShow(false); - }); - - /** - * Set the search value in the form. - * - * @param {string} value The value to set. - */ - function setSearchValue(value) { - var input = ref === null || ref === void 0 ? void 0 : ref.current; - input.value = value; - submitBtnRef === null || submitBtnRef === void 0 || submitBtnRef.current.click(); - - // Set focus on input. - input.focus(); - } - - /** - * Search submit handler. - * - * @param {Event} e The event object. - */ - function formSubmit(e) { - var _ref$current; - e.preventDefault(); - var term = ref === null || ref === void 0 || (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.value; - if (term) { - searchHandler(e); - if (extended_license) { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.saveSearchHistory)(term); - setHistory((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSearchHistory)()); - } - } - } - - /** - * Should the history div be shown? - * - * @return {boolean} Show history. - */ - function showHistory() { - return (history === null || history === void 0 ? void 0 : history.length) || (suggestions === null || suggestions === void 0 ? void 0 : suggestions.length); - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - setHistory((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSearchHistory)()); - }, []); - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('control-nav--search', apiError ? 'inactive' : null) - }, /*#__PURE__*/React.createElement("form", { - onSubmit: function onSubmit(e) { - return formSubmit(e); - }, - autoComplete: "off" - }, /*#__PURE__*/React.createElement("label", { - htmlFor: "search-input", - className: "offscreen" - }, instant_img_localize.search_label), /*#__PURE__*/React.createElement("div", { - ref: historyRef - }, /*#__PURE__*/React.createElement("input", { - ref: ref, - type: "text", - id: "search-input", - placeholder: instant_img_localize.search, - disabled: apiError, - onChange: function onChange(e) { - return extended_license && getSuggestions(e.target.value); - }, - onFocus: function onFocus() { - return setShow(true); - } - }), extended_license && showHistory() ? - /*#__PURE__*/ - /* Extended: Show only with valid add-on license */ - React.createElement(_SearchHistory__WEBPACK_IMPORTED_MODULE_6__["default"], { - show: show, - history: history, - setHistory: setHistory, - setSearchValue: setSearchValue, - container: historyRef - }) : null, !extended_activated && - /*#__PURE__*/ - /* Extended: Show only when add-on not installed. */ - React.createElement(_cta_Extended__WEBPACK_IMPORTED_MODULE_5__.ExtendedSearchCTA, { - show: show - })), /*#__PURE__*/React.createElement("button", { - type: "submit", - disabled: apiError, - ref: submitBtnRef - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-search" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.search)), /*#__PURE__*/React.createElement(_SearchToolTip__WEBPACK_IMPORTED_MODULE_7__["default"], { - show: show - }))); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchForm); - -/***/ }), - -/***/ "./src/js/components/search/SearchHeader.js": -/*!**************************************************!*\ - !*** ./src/js/components/search/SearchHeader.js ***! - \**************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ SearchHeader) -/* harmony export */ }); -/* harmony import */ var _constants_filters__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../constants/filters */ "./src/js/constants/filters.js"); -/* harmony import */ var _Filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Filter */ "./src/js/components/Filter.js"); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - -/** - * Render the SearchHeader component. - * - * @return {JSX.Element} The SearchHeader component. - */ -function SearchHeader() { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider, - search = _usePluginContext.search, - getPhotos = _usePluginContext.getPhotos, - filterSearch = _usePluginContext.filterSearch; - var _search$active = search.active, - active = _search$active === void 0 ? false : _search$active, - _search$term = search.term, - term = _search$term === void 0 ? '' : _search$term, - _search$results = search.results, - total = _search$results === void 0 ? 0 : _search$results; - var filters = _constants_filters__WEBPACK_IMPORTED_MODULE_0__.FILTERS[provider].search; - if (!active) { - // Exit if search is not active. - return null; - } - return /*#__PURE__*/React.createElement("header", { - className: "search-header" - }, /*#__PURE__*/React.createElement("h2", null, term.replace('id:', 'ID: ')), /*#__PURE__*/React.createElement("div", { - className: "search-header--text" - }, "".concat(total, " ").concat(instant_img_localize.search_results), " ", /*#__PURE__*/React.createElement("strong", null, "".concat(term)), /*#__PURE__*/React.createElement("span", null, "-"), /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return getPhotos(true); - } - }, instant_img_localize.clear_search)), filters && Object.entries(filters).length ? /*#__PURE__*/React.createElement("div", { - className: "control-nav--filters-wrap" - }, /*#__PURE__*/React.createElement("div", { - className: "control-nav--filters" - }, Object.entries(filters).map(function (_ref, index) { - var _ref2 = _slicedToArray(_ref, 2), - key = _ref2[0], - filter = _ref2[1]; - return /*#__PURE__*/React.createElement(_Filter__WEBPACK_IMPORTED_MODULE_1__["default"], { - key: "".concat(provider, "-search-").concat(key, "-").concat(index), - filterKey: key, - provider: provider, - data: filter, - handler: filterSearch - }); - }))) : null); -} - -/***/ }), - -/***/ "./src/js/components/search/SearchHistory.js": -/*!***************************************************!*\ - !*** ./src/js/components/search/SearchHistory.js ***! - \***************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ SearchHistory) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _functions_localStorage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../functions/localStorage */ "./src/js/functions/localStorage.js"); -/* harmony import */ var _hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../hooks/useArrowControls */ "./src/js/hooks/useArrowControls.js"); - - - - - - - -/** - * The History list component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The SearchHistory component. - */ -function SearchHistory(props) { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__.usePluginContext)(), - suggestions = _usePluginContext.suggestions; - var show = props.show, - history = props.history, - setHistory = props.setHistory, - setSearchValue = props.setSearchValue, - container = props.container; - var dropRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); - - // Use up/down arrow keys to navigate dropdown. - (0,_hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_5__.useArrowControls)(show, container); - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('control-nav--search-history', show ? 'active' : null), - role: "listbox", - ref: dropRef - }, !!suggestions.length && /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("div", { - className: "control-nav--search-history-title" - }, /*#__PURE__*/React.createElement("div", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Suggestions', 'instant-images'))), /*#__PURE__*/React.createElement("ul", { - role: "listbox", - className: "search-suggestions" - }, suggestions.map(function (item, key) { - return /*#__PURE__*/React.createElement("li", { - key: key, - role: "option" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - onClick: function onClick() { - return setSearchValue(item); - } - }, item)); - }))), !!history.length && /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("div", { - className: "control-nav--search-history-title" - }, /*#__PURE__*/React.createElement("div", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Recent Searches', 'instant-images')), /*#__PURE__*/React.createElement("button", { - type: "button", - onClick: function onClick() { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_4__.clearSearchHistory)(); - setHistory([]); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Clear', 'instant-images'))), /*#__PURE__*/React.createElement("ul", { - role: "listbox", - className: "search-history" - }, history.map(function (item, key) { - return /*#__PURE__*/React.createElement("li", { - key: key, - role: "option" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "history", - onClick: function onClick() { - return setSearchValue(item); - } - }, item)); - })))); -} - -/***/ }), - -/***/ "./src/js/components/search/SearchToolTip.js": -/*!***************************************************!*\ - !*** ./src/js/components/search/SearchToolTip.js ***! - \***************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ SearchToolTip) -/* harmony export */ }); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); - - - -/** - * Render the search results tooltip component. - * - * @return {JSX.Element} The SearchToolTip component. - */ -function SearchToolTip() { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - getPhotos = _usePluginContext.getPhotos, - search = _usePluginContext.search; - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_0___default()('control-nav--search-tooltip', search !== null && search !== void 0 && search.active ? null : 'hide') - }, /*#__PURE__*/React.createElement("span", { - title: "".concat(search === null || search === void 0 ? void 0 : search.results, " ").concat(instant_img_localize.search_results, " ").concat(search === null || search === void 0 ? void 0 : search.term) - }, search === null || search === void 0 ? void 0 : search.results), /*#__PURE__*/React.createElement("button", { - type: "button", - title: instant_img_localize.clear_search, - onClick: function onClick() { - return getPhotos(true); - } - }, "x", /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.clear_search))); -} - -/***/ }), - -/***/ "./src/js/constants/API.js": -/*!*********************************!*\ - !*** ./src/js/constants/API.js ***! - \*********************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ API: () => (/* binding */ API) -/* harmony export */ }); -/* harmony import */ var _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/ProviderIcons */ "./src/js/components/ProviderIcons.js"); - -var API = { - proxy: "https://proxy.getinstantimages.com/api/" || 0, - // eslint-disable-line - testmode: false, - defaults: { - provider: 'unsplash', - order: 'latest', - arr_key: 'results' - }, - providers: ['Unsplash', 'Openverse', 'Pixabay', 'Pexels', 'Giphy'], - unsplash: { - name: 'Unsplash', - requires_key: true, - "new": false, - api_var: 'client_id', - collections_api: 'https://api.unsplash.com/collections/', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.UnsplashIcon - }, - pixabay: { - name: 'Pixabay', - requires_key: true, - "new": false, - api_var: 'key', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.PixabayIcon - }, - pexels: { - name: 'Pexels', - requires_key: true, - "new": false, - api_var: 'key', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.PexelsIcon - }, - openverse: { - name: 'Openverse', - requires_key: false, - "new": false, - api_var: 'key', - key: '', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.OpenverseIcon - }, - giphy: { - name: 'Giphy', - requires_key: true, - "new": true, - api_var: 'key', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.GiphyIcon - } -}; - -/***/ }), - -/***/ "./src/js/constants/filters.js": -/*!*************************************!*\ - !*** ./src/js/constants/filters.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ FILTERS: () => (/* binding */ FILTERS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _filters_openverse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filters/openverse */ "./src/js/constants/filters/openverse.js"); -/* harmony import */ var _filters_pexels__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./filters/pexels */ "./src/js/constants/filters/pexels.js"); -/* harmony import */ var _filters_pixabay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./filters/pixabay */ "./src/js/constants/filters/pixabay.js"); -/* harmony import */ var _filters_unsplash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./filters/unsplash */ "./src/js/constants/filters/unsplash.js"); -function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } -function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } - - - - - -var ALL = { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('All', 'instant-images'), - value: 'all' -}; -var FILTERS = { - giphy: { - filters: { - order: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'trending', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Trending', 'instant-images'), - value: 'trending' - }] - } - }, - search: {} - }, - openverse: { - filters: { - source: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Source', 'instant-images'), - "default": 'wordpress', - filters: _toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_SOURCES) - }, - aspect_ratio: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_ORIENTATIONS)) - } - }, - search: { - category: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Type', 'instant-images'), - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Illustration', 'instant-images'), - value: 'illustration' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Photograph', 'instant-images'), - value: 'photograph' - }] - }, - extension: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Extension', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_EXTENSIONS)) - }, - aspect_ratio: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_ORIENTATIONS)) - }, - size: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Size', 'instant-images'), - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Large', 'instant-images'), - value: 'large' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Medium', 'instant-images'), - value: 'medium' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Small', 'instant-images'), - value: 'small' - }] - }, - license: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('License', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_LICENSES)) - }, - license_type: { - label: 'license_type', - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Commercial', 'instant-images'), - value: 'commercial' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Modification', 'instant-images'), - value: 'modification' - }] - } - } - }, - pexels: { - filters: { - order_by: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'curated', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Curated', 'instant-images'), - value: 'curated' - }] - } - }, - search: { - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pexels__WEBPACK_IMPORTED_MODULE_2__.PEXELS_ORIENTATIONS)) - }, - color: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pexels__WEBPACK_IMPORTED_MODULE_2__.PEXELS_COLORS)) - }, - size: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Size', 'instant-images'), - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Large', 'instant-images'), - value: 'large' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Medium', 'instant-images'), - value: 'medium' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Small', 'instant-images'), - value: 'small' - }] - } - } - }, - unsplash: { - filters: { - order_by: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'latest', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Latest', 'instant-images'), - value: 'latest' - }] - } - }, - search: { - order_by: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'relevant', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Relevance', 'instant-images'), - value: 'relevant' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Latest', 'instant-images'), - value: 'latest' - }] - }, - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_unsplash__WEBPACK_IMPORTED_MODULE_4__.UNSPLASH_ORIENTATIONS)) - }, - color: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_unsplash__WEBPACK_IMPORTED_MODULE_4__.UNSPLASH_COLORS)) - } - } - }, - pixabay: { - filters: { - order: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'popular', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Popular', 'instant-images'), - value: 'popular' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Latest', 'instant-images'), - value: 'latest' - }] - }, - image_type: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Type', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_IMAGE_TYPE)) - }, - category: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Category', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_CATS)) - }, - colors: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_COLORS)) - }, - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_ORIENTATIONS)) - } - }, - search: { - image_type: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Type', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_IMAGE_TYPE)) - }, - colors: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_COLORS)) - }, - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_ORIENTATIONS)) - } - } - } -}; - -/***/ }), - -/***/ "./src/js/constants/filters/openverse.js": -/*!***********************************************!*\ - !*** ./src/js/constants/filters/openverse.js ***! - \***********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ OPENVERSE_EXTENSIONS: () => (/* binding */ OPENVERSE_EXTENSIONS), -/* harmony export */ OPENVERSE_LICENSES: () => (/* binding */ OPENVERSE_LICENSES), -/* harmony export */ OPENVERSE_ORIENTATIONS: () => (/* binding */ OPENVERSE_ORIENTATIONS), -/* harmony export */ OPENVERSE_SOURCES: () => (/* binding */ OPENVERSE_SOURCES) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var OPENVERSE_SOURCES = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('WordPress', 'instant-images'), - value: 'wordpress' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Flickr', 'instant-images'), - value: 'flickr' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Nasa', 'instant-images'), - value: 'nasa' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('SpaceX', 'instant-images'), - value: 'spacex' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Wikimedia', 'instant-images'), - value: 'wikimedia' -}]; -var OPENVERSE_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Square', 'instant-images'), - value: 'square' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Tall', 'instant-images'), - value: 'tall' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Wide', 'instant-images'), - value: 'wide' -}]; -var OPENVERSE_EXTENSIONS = [{ - label: 'JPG', - value: 'JPG' -}, { - label: 'GIF', - value: 'GIF' -}, { - label: 'PNG', - value: 'PNG' -}, { - label: 'SVG', - value: 'SVG' -}]; -var OPENVERSE_LICENSES = [{ - label: 'BY', - value: 'BY' -}, { - label: 'BY-NC', - value: 'BY-NC' -}, { - label: 'BY-NC-ND', - value: 'BY-NC-ND' -}, { - label: 'BY-NC-SA', - value: 'BY-NC-SA' -}, { - label: 'BY-ND', - value: 'BY-ND' -}, { - label: 'BY-SA', - value: 'BY-SA' -}, { - label: 'CC0', - value: 'CC0' -}]; - -/***/ }), - -/***/ "./src/js/constants/filters/pexels.js": -/*!********************************************!*\ - !*** ./src/js/constants/filters/pexels.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ PEXELS_COLORS: () => (/* binding */ PEXELS_COLORS), -/* harmony export */ PEXELS_ORIENTATIONS: () => (/* binding */ PEXELS_ORIENTATIONS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var PEXELS_COLORS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Red', 'instant-images'), - value: 'red' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orange', 'instant-images'), - value: 'orange' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Yellow', 'instant-images'), - value: 'yellow' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Green', 'instant-images'), - value: 'green' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Turquoise', 'instant-images'), - value: 'turquoise' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Blue', 'instant-images'), - value: 'blue' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Violet', 'instant-images'), - value: 'violet' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Pink', 'instant-images'), - value: 'pink' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Brown', 'instant-images'), - value: 'brown' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black', 'instant-images'), - value: 'black' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Gray', 'instant-images'), - value: 'gray' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('White', 'instant-images'), - value: 'white' -}]; -var PEXELS_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Landscape', 'instant-images'), - value: 'landscape' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Portrait', 'instant-images'), - value: 'portrait' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Square', 'instant-images'), - value: 'squarish' -}]; - -/***/ }), - -/***/ "./src/js/constants/filters/pixabay.js": -/*!*********************************************!*\ - !*** ./src/js/constants/filters/pixabay.js ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ PIXABAY_CATS: () => (/* binding */ PIXABAY_CATS), -/* harmony export */ PIXABAY_COLORS: () => (/* binding */ PIXABAY_COLORS), -/* harmony export */ PIXABAY_IMAGE_TYPE: () => (/* binding */ PIXABAY_IMAGE_TYPE), -/* harmony export */ PIXABAY_ORIENTATIONS: () => (/* binding */ PIXABAY_ORIENTATIONS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var PIXABAY_COLORS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Grayscale', 'instant-images'), - value: 'grayscale' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Red', 'instant-images'), - value: 'red' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orange', 'instant-images'), - value: 'orange' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Yellow', 'instant-images'), - value: 'yellow' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Green', 'instant-images'), - value: 'green' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Turquoise', 'instant-images'), - value: 'turquoise' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Blue', 'instant-images'), - value: 'blue' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Lilac', 'instant-images'), - value: 'lilac' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Pink', 'instant-images'), - value: 'pink' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('White', 'instant-images'), - value: 'white' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Gray', 'instant-images'), - value: 'gray' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black', 'instant-images'), - value: 'black' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Brown', 'instant-images'), - value: 'brown' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Transparent', 'instant-images'), - value: 'transparent' -}]; -var PIXABAY_CATS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Backgrounds', 'instant-images'), - value: 'backgrounds' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Fashion', 'instant-images'), - value: 'fashion' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Nature', 'instant-images'), - value: 'nature' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Science', 'instant-images'), - value: 'science' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Education', 'instant-images'), - value: 'education' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Feelings', 'instant-images'), - value: 'feelings' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Health', 'instant-images'), - value: 'health' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('People', 'instant-images'), - value: 'people' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Religion', 'instant-images'), - value: 'religion' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Places', 'instant-images'), - value: 'places' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Animals', 'instant-images'), - value: 'animals' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Industry', 'instant-images'), - value: 'industry' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Computer', 'instant-images'), - value: 'computer' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Food', 'instant-images'), - value: 'food' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Sports', 'instant-images'), - value: 'sports' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Food', 'instant-images'), - value: 'food' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Transportation', 'instant-images'), - value: 'transportation' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Travel', 'instant-images'), - value: 'travel' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Buildings', 'instant-images'), - value: 'buildings' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Business', 'instant-images'), - value: 'business' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Music', 'instant-images'), - value: 'music' -}]; -var PIXABAY_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Horizontal', 'instant-images'), - value: 'horizontal' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Vertical', 'instant-images'), - value: 'vertical' -}]; -var PIXABAY_IMAGE_TYPE = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Photo', 'instant-images'), - value: 'photo' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Illustration', 'instant-images'), - value: 'illustration' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Vector', 'instant-images'), - value: 'vector' -}]; - -/***/ }), - -/***/ "./src/js/constants/filters/unsplash.js": -/*!**********************************************!*\ - !*** ./src/js/constants/filters/unsplash.js ***! - \**********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ UNSPLASH_COLORS: () => (/* binding */ UNSPLASH_COLORS), -/* harmony export */ UNSPLASH_ORIENTATIONS: () => (/* binding */ UNSPLASH_ORIENTATIONS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var UNSPLASH_COLORS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black & White', 'instant-images'), - value: 'black_and_white' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black', 'instant-images'), - value: 'black' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('White', 'instant-images'), - value: 'white' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Yellow', 'instant-images'), - value: 'yellow' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Green', 'instant-images'), - value: 'green' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orange', 'instant-images'), - value: 'orange' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Red', 'instant-images'), - value: 'red' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Purple', 'instant-images'), - value: 'purple' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Magenta', 'instant-images'), - value: 'magenta' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Teal', 'instant-images'), - value: 'teal' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Blue', 'instant-images'), - value: 'blue' -}]; -var UNSPLASH_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Landscape', 'instant-images'), - value: 'landscape' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Portrait', 'instant-images'), - value: 'portrait' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Square', 'instant-images'), - value: 'squarish' -}]; - -/***/ }), - -/***/ "./src/js/editor/block/components/Header.js": -/*!**************************************************!*\ - !*** ./src/js/editor/block/components/Header.js ***! - \**************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ BlockHeader) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _components_Icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../components/Icon */ "./src/js/components/Icon.js"); - - - - -var providers = _constants_API__WEBPACK_IMPORTED_MODULE_2__.API.providers; - -/** - * Render the block header. - * - * @param {Object} props The component props. - * @param {Object} props.switchProvider The function to switch the provider. - * @return {JSX.Element} The BlockHeader component. - */ -function BlockHeader(_ref) { - var switchProvider = _ref.switchProvider; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - provider = _usePluginContext.provider; - - /** - * Switch the provider via select. - * - * @param {string} value The provider value. - */ - function providerChange(value) { - if (value) { - switchProvider(value); - } - } - return /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--header" - }, /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--header-logo" - }, /*#__PURE__*/React.createElement(_components_Icon__WEBPACK_IMPORTED_MODULE_3__.IconLogo, null), /*#__PURE__*/React.createElement("span", null, "Instant Images")), /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--header-nav" - }, /*#__PURE__*/React.createElement("label", { - className: "offscreen" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Select Provider', 'instant-images')), /*#__PURE__*/React.createElement("select", { - defaultValue: provider, - onChange: function onChange(e) { - return providerChange(e.target.value); - } - }, /*#__PURE__*/React.createElement("option", { - value: "" - }, "-- ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Select Provider', 'instant-images'), " --"), providers.map(function (item, index) { - return /*#__PURE__*/React.createElement("option", { - key: index, - value: item.toLowerCase() - }, item); - })))); -} - -/***/ }), - -/***/ "./src/js/editor/block/components/Help.js": -/*!************************************************!*\ - !*** ./src/js/editor/block/components/Help.js ***! - \************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ BlockHelp) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Render help instructions for the WP Block. - * - * @return {JSX.Element} The BlockHelp component. - */ -function BlockHelp() { - return /*#__PURE__*/React.createElement("div", { - style: { - width: '300px', - padding: '0 10px' - } - }, /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("strong", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Instant Images Help', 'instant-images'))), /*#__PURE__*/React.createElement("ol", null, /*#__PURE__*/React.createElement("li", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Browse photos from the various stock image providers.', 'instant-images')), /*#__PURE__*/React.createElement("li", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Select/click an image to immediately start the upload process.', 'instant-images')), /*#__PURE__*/React.createElement("li", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Uploaded image will be inserted directly into the post using the WordPress core Image block.', 'instant-images')))); -} - -/***/ }), - -/***/ "./src/js/editor/block/components/Instructions.js": -/*!********************************************************!*\ - !*** ./src/js/editor/block/components/Instructions.js ***! - \********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ BlockInstructions) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Render instructional text for the WP Block. - * - * @param {Object} props The component props. - * @return {JSX.Element} The BlockInstructions component. - */ -function BlockInstructions(props) { - var _props$show = props.show, - show = _props$show === void 0 ? false : _props$show; - if (!show) { - return null; - } - return /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--instructions" - }, /*#__PURE__*/React.createElement("span", null, "\u2190"), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Scroll to Load Images', 'instant-images'), /*#__PURE__*/React.createElement("span", null, "\u2192")); -} - -/***/ }), - -/***/ "./src/js/editor/block/components/LoadMore.js": -/*!****************************************************!*\ - !*** ./src/js/editor/block/components/LoadMore.js ***! - \****************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); - - - -/** - * Render the BlockLoadMore component. - * - * @return {JSX.Element} The BlockLoadMore component. - */ -var BlockLoadMore = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var done = props.done; - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('instant-images-block--loader', done ? 'done' : null), - ref: ref - }); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BlockLoadMore); - -/***/ }), - -/***/ "./src/js/editor/utils/insertImage.js": -/*!********************************************!*\ - !*** ./src/js/editor/utils/insertImage.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ insertImage) -/* harmony export */ }); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); - - - -/** - * Insert an image block into the block editor. - * - * @param {Object} attachment The attachment object. - * @param {string} clientId The block ID. - */ -function insertImage(attachment, clientId) { - var _attachment$id = attachment.id, - id = _attachment$id === void 0 ? null : _attachment$id, - _attachment$url = attachment.url, - url = _attachment$url === void 0 ? null : _attachment$url, - _attachment$caption = attachment.caption, - caption = _attachment$caption === void 0 ? '' : _attachment$caption, - _attachment$alt = attachment.alt, - alt = _attachment$alt === void 0 ? '' : _attachment$alt; - if (!url || !id) { - return; - } - - // Create block. - var block = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('core/image', { - id: id, - url: url, - caption: caption, - alt: alt - }); - if (clientId) { - // Replace the Instant Images block. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)('core/block-editor').replaceBlock(clientId, block); - } else { - // Insert Image block. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)('core/block-editor').insertBlocks(block); - } -} - -/***/ }), - -/***/ "./src/js/editor/utils/setFeaturedImage.js": -/*!*************************************************!*\ - !*** ./src/js/editor/utils/setFeaturedImage.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ setFeaturedImage) -/* harmony export */ }); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Set image as featured image in Gutenberg. - * - * @param {Object} attachment The attachment object. - */ -function setFeaturedImage(attachment) { - var _attachment$id = attachment.id, - id = _attachment$id === void 0 ? null : _attachment$id; - if (!id) { - return; - } - - // Set the featured image. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/editor').editPost({ - featured_media: id - }); - - // Open the document sidebar. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/edit-post').openGeneralSidebar('edit-post/document'); -} - -/***/ }), - -/***/ "./src/js/functions/buildURL.js": -/*!**************************************!*\ - !*** ./src/js/functions/buildURL.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ buildTestURL: () => (/* binding */ buildTestURL), -/* harmony export */ "default": () => (/* binding */ buildURL), -/* harmony export */ getProxyURL: () => (/* binding */ getProxyURL) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _getQueryParams__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getQueryParams */ "./src/js/functions/getQueryParams.js"); -/* harmony import */ var _providers_openverse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./providers/openverse */ "./src/js/functions/providers/openverse.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - - - - -/** - * Build the API query parameters. - * - * @param {string} type The query type (search, photos, id). - * @param {Object} params The current params object. - * @return {string} The new API URL with querystring params. - */ -function buildURL(type, params) { - if (!type) { - // Bail early if API query type is missing. - return ''; - } - // Get the current provider. - var _params = params, - _params$provider = _params.provider, - provider = _params$provider === void 0 ? 'unsplash' : _params$provider; - - // Provider doesn't need to be sent. - delete params.provider; - - // Set Openverse params. - params = provider === 'openverse' ? (0,_providers_openverse__WEBPACK_IMPORTED_MODULE_2__.openverseParams)(type, params) : params; - - // Build the API URL. - var url = new URL(getProxyURL(provider)); - - // Add `type` to params. - url.searchParams.append('type', type); - - // Append query params. - Object.keys(params).forEach(function (key) { - url.searchParams.append(key, params[key]); - }); - - // Add `version` to params. - url.searchParams.append('version', instant_img_localize.version); - return url === null || url === void 0 ? void 0 : url.href; -} - -/** - * Get the proxy URL from ENV vars. - * - * @param {string} provider The image provider. - * @return {string} The proxy URL. - */ -function getProxyURL(provider) { - var _API$proxy = _constants_API__WEBPACK_IMPORTED_MODULE_0__.API.proxy, - proxy = _API$proxy === void 0 ? 'https://proxy.getinstantimages.com/api/' : _API$proxy; - return "".concat(proxy).concat(provider); -} - -/** - * Build a API testing URL. - * - * @param {string} provider The current service provider. - * @return {string} The API URL. - */ -function buildTestURL(provider) { - var options = { - page: 1 - }; - - // Build URL. - var params = _objectSpread(_objectSpread({ - test: true - }, (0,_getQueryParams__WEBPACK_IMPORTED_MODULE_1__["default"])(provider)), options); - return buildURL('photos', params); -} - -/***/ }), - -/***/ "./src/js/functions/consoleStatus.js": -/*!*******************************************!*\ - !*** ./src/js/functions/consoleStatus.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ consoleStatus) -/* harmony export */ }); -/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _getErrorMessage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getErrorMessage */ "./src/js/functions/getErrorMessage.js"); - - - -/** - * Display a console.warn message about API status. - * - * @param {string} provider The API service provider. - * @param {string} status The API status. - */ -function consoleStatus(provider) { - var status = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200; - var local = instant_img_localize; - var message = (0,_getErrorMessage__WEBPACK_IMPORTED_MODULE_1__["default"])(status); - switch (status) { - case 400: - case 401: - case 500: - // Unsplash/Pixabay/Pexels incorrect API key - console.warn("[".concat(local.instant_images, " - ").concat(status, " Error] ").concat((0,_helpers__WEBPACK_IMPORTED_MODULE_0__.capitalizeFirstLetter)(provider), ": ").concat(message)); - break; - case 429: - /** - * Pixabay, Pexels - too many requests. - * - * @see https://www.pexels.com/api/documentation/#statistics - * @see https://pixabay.com/api/docs/#api_rate_limit - */ - console.warn("[".concat(local.instant_images, " - ").concat(status, " Error] ").concat((0,_helpers__WEBPACK_IMPORTED_MODULE_0__.capitalizeFirstLetter)(provider), ": ").concat(message)); - break; - default: - break; - } -} - -/***/ }), - -/***/ "./src/js/functions/generateAttribution.js": -/*!*************************************************!*\ - !*** ./src/js/functions/generateAttribution.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ generateAttribution) -/* harmony export */ }); -/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/js/functions/helpers.js"); - - -/** - * Get the API URL for searches by ID. - * - * @param {string} text Attribution hook content. - * @param {string} provider Image provider. - * @param {string} permalink Image url. - * @param {Object} user The user data. - * @return {string} The raw attribution HTML. - */ -function generateAttribution(text, provider, permalink, user) { - if (!text || !provider || !permalink || !user) { - return text; - } - - // Get user data. - var username = user.name, - user_url = user.url; - - // Format provider data. - var provider_url = instant_img_localize["".concat(provider, "_url")]; - var provider_name = (0,_helpers__WEBPACK_IMPORTED_MODULE_0__.capitalizeFirstLetter)(provider); - - // Generate attribution template. - var attribution = text; - attribution = attribution.replace('{username}', username); - attribution = attribution.replace('{user_url}', user_url); - attribution = attribution.replace('{image_url}', permalink); - attribution = attribution.replace('{provider_url}', provider_url); - attribution = attribution.replace('{provider}', provider_name); - return attribution; -} - -/***/ }), - -/***/ "./src/js/functions/getErrorMessage.js": -/*!*********************************************!*\ - !*** ./src/js/functions/getErrorMessage.js ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getErrorMessage) -/* harmony export */ }); -/** - * Get the correct error message by status code. - * - * @param {string} status The API status. - */ -function getErrorMessage() { - var status = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 200; - var local = instant_img_localize; - switch (status) { - case 400: - case 401: - // Unsplash/Pixabay/Pexels incorrect API key. - return local.api_invalid_msg; - case 403: - return local.api_invalid_403_msg; - case 404: - return local.api_invalid_404_msg; - case 429: - /** - * Pixabay, Pexels - too many requests. - * - * @see https://www.pexels.com/api/documentation/#statistics - * @see https://pixabay.com/api/docs/#api_rate_limit - */ - return local.api_ratelimit_msg; - case 500: - case 503: - // Internal server error. - return local.api_invalid_500_msg; - case 501: - // Missing params. - return local.api_invalid_501_msg; - default: - break; - } -} - -/***/ }), - -/***/ "./src/js/functions/getProvider.js": -/*!*****************************************!*\ - !*** ./src/js/functions/getProvider.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getProvider) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); - - -/** - * Get the default provider on page load. - * - * @return {string} The default service provider. - */ -function getProvider() { - return instant_img_localize && instant_img_localize.default_provider ? instant_img_localize.default_provider : _constants_API__WEBPACK_IMPORTED_MODULE_0__.API.defaults.provider; -} - -/***/ }), - -/***/ "./src/js/functions/getQueryParams.js": -/*!********************************************!*\ - !*** ./src/js/functions/getQueryParams.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getQueryParams), -/* harmony export */ getAuth: () => (/* binding */ getAuth), -/* harmony export */ getContentSafety: () => (/* binding */ getContentSafety) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - - -// eslint-disable - -/** - * Build the API query parameters - * - * @param {string} provider The current service provider. - * @param {Object} queryParams Optional query parameters to append to base params. - * @return {Object} Parameters used for the fetch request. - */ -function getQueryParams(provider, queryParams) { - if (!provider) { - return {}; - } - - // Set default params. - var params = { - provider: provider - }; - - // Append additional params. - params = getContentSafety(params, provider); - params = _objectSpread(_objectSpread({}, params), queryParams); - params = getAuth(params, provider); - - /** - * Display query params in the browser console. - * - * Global plugin hook. - */ - if (instant_img_localize.query_debug) { - console.table(params); - } - return params; -} - -/** - * Get auth keys and append to API query request. - * - * @param {Object} params The current params object. - * @param {string} provider The current service provider. - * @return {Object} The auth parameter object. - */ -function getAuth(params, provider) { - var has_auth = _constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider].requires_key; - if (!has_auth || !provider) { - return params; - } - var app_id = instant_img_localize["".concat(provider, "_app_id")]; - if (app_id) { - // Pass API keys if not using defaults. - params[_constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider].api_var] = app_id; - } - return params; -} - -/** - * Set the photo safety for indicating that only images suitable for all ages should be returned. - * - * @see https://unsplash.com/documentation#content-safety - * @see https://pixabay.com/api/docs/ - * - * @param {Object} params The current params object. - * @param {string} provider The current service provider. - * @return {Object} The fetch parameters object. - */ -function getContentSafety(params, provider) { - switch (provider) { - case 'unsplash': - if (instant_img_localize.unsplash_content_filter) { - params.content_filter = instant_img_localize.unsplash_content_filter; - } - break; - case 'pixabay': - if (instant_img_localize.pixabay_safesearch) { - params.safesearch = 'true'; - } - break; - case 'openverse': - if (instant_img_localize.openverse_mature) { - params.mature = 'true'; - } - break; - } - return params; -} - -/***/ }), - -/***/ "./src/js/functions/getResults.js": -/*!****************************************!*\ - !*** ./src/js/functions/getResults.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getResults), -/* harmony export */ getResultById: () => (/* binding */ getResultById), -/* harmony export */ getSearchTotal: () => (/* binding */ getSearchTotal) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); - - -/** - * Pluck `results` from the API response. - * - * @param {Object} data The API results object. - * @return {Array} The results as an array. - */ -function getResults(data) { - if (!data) { - return []; - } - return data[_constants_API__WEBPACK_IMPORTED_MODULE_0__.API.defaults.arr_key] || []; -} - -/** - * Get the total search results. - * - * @param {Object} data The search data object. - * @return {string} The total results. - */ -function getSearchTotal(data) { - // Return 0 if undefined or null. - return data.total === undefined || data.total === null ? 0 : data.total; -} - -/** - * Get results by photo ID. - * - * @param {string} provider The current service provider. - * @param {string} key The match key to access. - * @param {Object} data The API results object. - * @return {Array} The results as an array. - * @deprecated 5.0 - */ -function getResultById(provider, key, data) { - if (!data) { - return []; - } - var result = []; - switch (provider) { - case 'unsplash': - case 'pexels': - result = data || []; - break; - case 'pixabay': - result = data[key] && data[key][0] ? data[key][0] : []; - break; - } - return result; -} - -/***/ }), - -/***/ "./src/js/functions/helpers.js": -/*!*************************************!*\ - !*** ./src/js/functions/helpers.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ capitalizeFirstLetter: () => (/* binding */ capitalizeFirstLetter), -/* harmony export */ checkRateLimit: () => (/* binding */ checkRateLimit), -/* harmony export */ gotoURL: () => (/* binding */ gotoURL), -/* harmony export */ hideTooltip: () => (/* binding */ hideTooltip), -/* harmony export */ isObjectEmpty: () => (/* binding */ isObjectEmpty), -/* harmony export */ md5Hash: () => (/* binding */ md5Hash), -/* harmony export */ showTooltip: () => (/* binding */ showTooltip) -/* harmony export */ }); -/* harmony import */ var crypto_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! crypto-js */ "./node_modules/crypto-js/index.js"); -/* harmony import */ var crypto_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(crypto_js__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Get the MD5 hash value of a URL. - * - * @param {string} url The API URL to hash. - * @return {string} The MD5 hash. - */ -function md5Hash(url) { - return crypto_js__WEBPACK_IMPORTED_MODULE_0___default().MD5(url).toString(); -} - -/** - * Check if an object is empty. - * - * @param {Object} obj The object to test against. - * @return {boolean} Is this an object. - */ -function isObjectEmpty(obj) { - if (obj === null || obj === undefined) { - return true; - } - return Object.keys(obj).length === 0; -} - -/** - * Check the `x-ratelimit-remaining` headers to confirm the API is available. - * - * @param {Object} headers The request headers object. - */ -function checkRateLimit(headers) { - if (!headers) { - return; - } - var limit = headers.get('X-RateLimit-Limit') || -1; - var remaining = headers.get('X-RateLimit-Remaining') || -1; - if (limit > -1 && parseInt(remaining) < 2) { - alert(instant_img_localize.api_ratelimit_msg); // eslint-disable-line - } -} - -/** - * Capitalize the first letter of a string. - * - * @param {string} str The string to format. - * @return {string} The formatted string. - */ -function capitalizeFirstLetter(str) { - return str.charAt(0).toUpperCase() + str.slice(1); -} -var tooltipInterval = ''; - -/** - * Show the tooltip. - * - * @param {Event} e The target tooltip element. - * @since 4.3.0 - */ -function showTooltip(e) { - var target = e.currentTarget; - var rect = target.getBoundingClientRect(); - var left = Math.round(rect.left); - var top = Math.round(rect.top); - var container = target.closest('#photo-listing'); - var tooltip = container.querySelector('#tooltip'); - tooltip.classList.remove('over'); - if (target.classList.contains('tooltip--above')) { - tooltip.classList.add('above'); - } else { - tooltip.classList.remove('above'); - } - - // Delay Tooltip Reveal. - tooltipInterval = setInterval(function () { - clearInterval(tooltipInterval); - tooltip.innerHTML = target.dataset.title; // Tooltip content. - - // Position Tooltip. - left = left - tooltip.offsetWidth + target.offsetWidth + 5; - tooltip.style.left = "".concat(left, "px"); - tooltip.style.top = "".concat(top, "px"); - setTimeout(function () { - tooltip.classList.add('over'); - }, 25); - }, 750); -} - -/** - * Hide the tooltip. - * - * @param {Event} e The target tooltip element. - * @since 4.3.0 - */ -function hideTooltip(e) { - clearInterval(tooltipInterval); - var container = e.currentTarget.closest('#photo-listing'); - var tooltip = container.querySelector('#tooltip'); - tooltip.classList.remove('over'); -} - -/** - * Open the URL in new window. - * - * @param {string} url The destination URL. - */ -function gotoURL(url) { - if (url && window) { - window.open(url, '_blank'); - } -} - -/***/ }), - -/***/ "./src/js/functions/localStorage.js": -/*!******************************************!*\ - !*** ./src/js/functions/localStorage.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ clearSearchHistory: () => (/* binding */ clearSearchHistory), -/* harmony export */ getSearchHistory: () => (/* binding */ getSearchHistory), -/* harmony export */ getSetting: () => (/* binding */ getSetting), -/* harmony export */ saveSearchHistory: () => (/* binding */ saveSearchHistory), -/* harmony export */ saveSettings: () => (/* binding */ saveSettings) -/* harmony export */ }); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -var searchName = 'instant-images-recent-searches'; -var settingsName = 'instant-images-settings'; -var most = 10; - -/** - * Save search value to localstorage. - * - * @param {string} term The search term. - */ -function saveSearchHistory(term) { - if (term && term.toLowerCase().includes('id:')) { - return; // Don't index string with `id:` - } - var recent = getSearchHistory(); - if (!recent) { - localStorage.setItem(searchName, JSON.stringify([term])); - return; - } - - // Find duplicates. - var duplicate = recent.indexOf(term); - if (duplicate > -1) { - recent.splice(duplicate, 1); - } - - // Limit to 6 items. - if (recent.length >= most) { - recent.length = most; - } - - // Add new term to the beginning of the array. - recent.unshift(term); - localStorage.setItem(searchName, JSON.stringify(recent)); -} - -/** - * Get the search history from localstorage. - * - * @return {Array} The search history. - */ -function getSearchHistory() { - var history = localStorage.getItem(searchName); - if (!history) { - return []; - } - return JSON.parse(localStorage.getItem(searchName)); -} - -/** - * Clear search history. - */ -function clearSearchHistory() { - localStorage.removeItem(searchName); -} - -/** - * Save generic setting to localstorage as an key/value object pair. - * - * @param {string} key The object key. - * @param {value} value The object value. - */ -function saveSettings(key, value) { - var settings = localStorage.getItem(settingsName); - var setting = _defineProperty({}, key, value); - if (!settings) { - localStorage.setItem(settingsName, JSON.stringify(setting)); - } else { - var parsed = JSON.parse(settings); - parsed[key] = value; - localStorage.setItem(settingsName, JSON.stringify(parsed)); - } -} - -/** - * Get an individual setting from local storage. - * - * @param {string} key The stoarge key. - * @return {string|boolean} The storage value. - */ -function getSetting(key) { - var settings = localStorage.getItem(settingsName); - if (!settings) { - return false; - } - var parsed = JSON.parse(settings); - return parsed[key] ? parsed[key] : false; -} - -/***/ }), - -/***/ "./src/js/functions/providers/openverse.js": -/*!*************************************************!*\ - !*** ./src/js/functions/providers/openverse.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ openverseParams: () => (/* binding */ openverseParams) -/* harmony export */ }); -/* harmony import */ var _constants_filters_openverse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../constants/filters/openverse */ "./src/js/constants/filters/openverse.js"); - - -/** - * Format the params for Openverse. - * - * @param {string} type Query type (search, photos, id). - * @param {Object} params Query params object. - * @return {Object} Updated params. - */ -function openverseParams(type, params) { - if (type === 'photos' && !params.source) { - params.source = 'wordpress'; // Add `wordpress` as the default openverse `source`. - } - if (type === 'search') { - // Include these sources only. - var sources = _constants_filters_openverse__WEBPACK_IMPORTED_MODULE_0__.OPENVERSE_SOURCES.map(function (source) { - return source.value; - }).toString(); // e.g. `wordpress,flickr,nasa,spacex,wikimedia` - params.source = sources; - } - return params; -} - -/***/ }), - -/***/ "./src/js/functions/providers/unsplash.js": -/*!************************************************!*\ - !*** ./src/js/functions/providers/unsplash.js ***! - \************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ unsplashDownload: () => (/* binding */ unsplashDownload) -/* harmony export */ }); -/* harmony import */ var _buildURL__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../buildURL */ "./src/js/functions/buildURL.js"); -/* harmony import */ var _getQueryParams__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../getQueryParams */ "./src/js/functions/getQueryParams.js"); - - - -/** - * Function to trigger an image download at unsplash.com. - * Note: This is used to give authors download credits and nothing more. - * - * @see https://help.unsplash.com/en/articles/2511258-guideline-triggering-a-download - * - * @param {string} download_url The URL to trigger a download. - * @since 3.1 - */ -function unsplashDownload(download_url) { - var params = (0,_getQueryParams__WEBPACK_IMPORTED_MODULE_1__.getAuth)({}, 'unsplash'); - params.download_url = download_url; // Append download URL to query params. - var url = (0,_buildURL__WEBPACK_IMPORTED_MODULE_0__["default"])('photos', params); - fetch(url).then(function (data) { - return data.json(); - }).then(function () { - // Success, nothing else happens here - console.log('Image download successsfully triggered at Unsplash.'); // eslint-disable-line no-console - })["catch"](function (error) { - console.warn(error); - }); -} - -/***/ }), - -/***/ "./src/js/functions/session.js": -/*!*************************************!*\ - !*** ./src/js/functions/session.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ deleteSession: () => (/* binding */ deleteSession), -/* harmony export */ getSession: () => (/* binding */ getSession), -/* harmony export */ saveSession: () => (/* binding */ saveSession) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "./src/js/functions/helpers.js"); - - - -/** - * Get results from session storage by URL. - * - * @param {string} url The API URL. - * @return {Array|boolean} Session results. - */ -function getSession(url) { - if (!url || _constants_API__WEBPACK_IMPORTED_MODULE_0__.API.testmode) { - return false; // Exit if no URL or test m ode is enabled. - } - var session = sessionStorage.getItem((0,_helpers__WEBPACK_IMPORTED_MODULE_1__.md5Hash)(url)); - if (!session) { - return false; // Exit if no session data. - } - var data = JSON.parse(session); - var _data$expires = data.expires, - expires = _data$expires === void 0 ? 0 : _data$expires, - _data$error = data.error, - error = _data$error === void 0 ? null : _data$error; - if (error) { - return false; // Exit if session data has error entry. - } - - // Check if expiration time has passed. - var expired = Date.now() > expires; - - // Delete session data when expired. - if (expired) { - deleteSession(url); - } - return data && !expired ? data : false; -} - -/** - * Save API data to session storage by URL. - * - * @param {string} url Save results to session by URL. - * @param {Array} results The API results. - */ -function saveSession(url, results) { - if (!url || !results || results !== null && results !== void 0 && results.error) { - return false; - } - - // Set expiration to 2 hours. - results.expires = Date.now() + 7200000; - - // Save session data. - sessionStorage.setItem((0,_helpers__WEBPACK_IMPORTED_MODULE_1__.md5Hash)(url), JSON.stringify(results)); -} - -/** - * Remove/delete session storage by URL. - * - * @param {string} url The API URL. - */ -function deleteSession(url) { - if (!url) { - return false; - } - sessionStorage.removeItem((0,_helpers__WEBPACK_IMPORTED_MODULE_1__.md5Hash)(url)); -} - -/***/ }), - -/***/ "./src/js/functions/updatePluginSetting.js": -/*!*************************************************!*\ - !*** ./src/js/functions/updatePluginSetting.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ updatePluginSetting) -/* harmony export */ }); -/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js"); - - -/** - * Update plugin settings by specific key/value pair. - * - * @param {string} setting The previous provider. - * @param {string} value The value to save. - */ -function updatePluginSetting(setting, value) { - var _instant_img_localize; - var api = ((_instant_img_localize = instant_img_localize) === null || _instant_img_localize === void 0 ? void 0 : _instant_img_localize.root) + 'instant-images/settings/'; // eslint-disable-line no-undef - - var params = { - setting: setting, - value: value - }; - var config = { - headers: { - 'X-WP-Nonce': instant_img_localize.nonce, - // eslint-disable-line no-undef - 'Content-Type': 'application/json' - } - }; - axios__WEBPACK_IMPORTED_MODULE_0__["default"].post(api, JSON.stringify(params), config).then(function () {})["catch"](function (error) { - console.warn(error); - }); -} - -/***/ }), - -/***/ "./src/js/hooks/useArrowControls.js": -/*!******************************************!*\ - !*** ./src/js/hooks/useArrowControls.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ useArrowControls: () => (/* binding */ useArrowControls) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } -function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } - - -/** - * Detect up and down arrow presses. - * - * @param {boolean} active Is the element currently active. - * @param {Object} ref The container ref to select the focusable elements. - */ -function useArrowControls(active, ref) { - var focusedRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(active); - - /** - * Add event listener for arrow keys. - * - * @param {KeyboardEvent} e The event. - */ - function arrowHandler(e) { - var key = e.key; - if (focusedRef !== null && focusedRef !== void 0 && focusedRef.current && ref !== null && ref !== void 0 && ref.current) { - var focusable = ref === null || ref === void 0 ? void 0 : ref.current.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), input'); - if (!(focusable !== null && focusable !== void 0 && focusable.length)) { - // Exit if no focusable elements. - return; - } - var first = focusable[0]; - var last = focusable[focusable.length - 1]; - var _active = document.activeElement; // eslint-disable-line - var activeIndex = _toConsumableArray(focusable).indexOf(_active); - - // Up arrow. - if (key === 'ArrowUp') { - e.preventDefault(); - if (activeIndex === 0) { - last.focus({ - preventScroll: true - }); - } else { - focusable[activeIndex - 1].focus({ - preventScroll: true - }); - } - } - // Down Arrow - if (key === 'ArrowDown') { - e.preventDefault(); - if (activeIndex === focusable.length - 1 || activeIndex === -1) { - first.focus({ - preventScroll: true - }); - } else { - focusable[activeIndex + 1].focus({ - preventScroll: true - }); - } - } - } - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - focusedRef.current = active; - }, [active]); - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - document.addEventListener('keydown', arrowHandler, false); - return function () { - // Dispose of events. - document.removeEventListener('keydown', arrowHandler, false); - }; - }, []); // eslint-disable-line react-hooks/exhaustive-deps -} - -/***/ }), - -/***/ "./src/js/hooks/useClickOutside.js": -/*!*****************************************!*\ - !*** ./src/js/hooks/useClickOutside.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ useClickOutside: () => (/* binding */ useClickOutside) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Detect clicks outside of ref. - * - * @param {Object} ref React ref. - * @param {Function} onClickOutside Function to invoke when clicked outside. - */ -function useClickOutside(ref, onClickOutside) { - /** - * Escape handler. - * - * @param {Event} e The key press event. - */ - function escapeClick(e) { - var key = e.key; - if (key === 'Escape') { - onClickOutside(); - } - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - /** - * Invoke Function onClick outside of element - * - * @param {Event} event The event object. - */ - function handleClickOutside(event) { - if (ref.current && !ref.current.contains(event.target)) { - onClickOutside(); - } - } - - // Bind events. - document.addEventListener('mousedown', handleClickOutside); - document.addEventListener('keyup', handleClickOutside); - document.addEventListener('keydown', escapeClick, false); - return function () { - // Dispose of events. - document.removeEventListener('mousedown', handleClickOutside); - document.removeEventListener('keyup', handleClickOutside); - document.removeEventListener('keydown', escapeClick, false); - }; - }, [ref, onClickOutside]); //eslint-disable-line react-hooks/exhaustive-deps -} - -/***/ }), - -/***/ "./node_modules/crypto-js/aes.js": -/*!***************************************!*\ - !*** ./node_modules/crypto-js/aes.js ***! - \***************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - // Lookup tables - var SBOX = []; - var INV_SBOX = []; - var SUB_MIX_0 = []; - var SUB_MIX_1 = []; - var SUB_MIX_2 = []; - var SUB_MIX_3 = []; - var INV_SUB_MIX_0 = []; - var INV_SUB_MIX_1 = []; - var INV_SUB_MIX_2 = []; - var INV_SUB_MIX_3 = []; - - // Compute lookup tables - (function () { - // Compute double table - var d = []; - for (var i = 0; i < 256; i++) { - if (i < 128) { - d[i] = i << 1; - } else { - d[i] = (i << 1) ^ 0x11b; - } - } - - // Walk GF(2^8) - var x = 0; - var xi = 0; - for (var i = 0; i < 256; i++) { - // Compute sbox - var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); - sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; - SBOX[x] = sx; - INV_SBOX[sx] = x; - - // Compute multiplication - var x2 = d[x]; - var x4 = d[x2]; - var x8 = d[x4]; - - // Compute sub bytes, mix columns tables - var t = (d[sx] * 0x101) ^ (sx * 0x1010100); - SUB_MIX_0[x] = (t << 24) | (t >>> 8); - SUB_MIX_1[x] = (t << 16) | (t >>> 16); - SUB_MIX_2[x] = (t << 8) | (t >>> 24); - SUB_MIX_3[x] = t; - - // Compute inv sub bytes, inv mix columns tables - var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); - INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); - INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); - INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); - INV_SUB_MIX_3[sx] = t; - - // Compute next counter - if (!x) { - x = xi = 1; - } else { - x = x2 ^ d[d[d[x8 ^ x2]]]; - xi ^= d[d[xi]]; - } - } - }()); - - // Precomputed Rcon lookup - var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; - - /** - * AES block cipher algorithm. - */ - var AES = C_algo.AES = BlockCipher.extend({ - _doReset: function () { - var t; - - // Skip reset of nRounds has been set before and key did not change - if (this._nRounds && this._keyPriorReset === this._key) { - return; - } - - // Shortcuts - var key = this._keyPriorReset = this._key; - var keyWords = key.words; - var keySize = key.sigBytes / 4; - - // Compute number of rounds - var nRounds = this._nRounds = keySize + 6; - - // Compute number of key schedule rows - var ksRows = (nRounds + 1) * 4; - - // Compute key schedule - var keySchedule = this._keySchedule = []; - for (var ksRow = 0; ksRow < ksRows; ksRow++) { - if (ksRow < keySize) { - keySchedule[ksRow] = keyWords[ksRow]; - } else { - t = keySchedule[ksRow - 1]; - - if (!(ksRow % keySize)) { - // Rot word - t = (t << 8) | (t >>> 24); - - // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; - - // Mix Rcon - t ^= RCON[(ksRow / keySize) | 0] << 24; - } else if (keySize > 6 && ksRow % keySize == 4) { - // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; - } - - keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; - } - } - - // Compute inv key schedule - var invKeySchedule = this._invKeySchedule = []; - for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { - var ksRow = ksRows - invKsRow; - - if (invKsRow % 4) { - var t = keySchedule[ksRow]; - } else { - var t = keySchedule[ksRow - 4]; - } - - if (invKsRow < 4 || ksRow <= 4) { - invKeySchedule[invKsRow] = t; - } else { - invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ - INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; - } - } - }, - - encryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); - }, - - decryptBlock: function (M, offset) { - // Swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; - - this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); - - // Inv swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; - }, - - _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { - // Shortcut - var nRounds = this._nRounds; - - // Get input, add round key - var s0 = M[offset] ^ keySchedule[0]; - var s1 = M[offset + 1] ^ keySchedule[1]; - var s2 = M[offset + 2] ^ keySchedule[2]; - var s3 = M[offset + 3] ^ keySchedule[3]; - - // Key schedule row counter - var ksRow = 4; - - // Rounds - for (var round = 1; round < nRounds; round++) { - // Shift rows, sub bytes, mix columns, add round key - var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; - var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; - var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; - var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; - - // Update state - s0 = t0; - s1 = t1; - s2 = t2; - s3 = t3; - } - - // Shift rows, sub bytes, add round key - var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; - var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; - var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; - var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; - - // Set output - M[offset] = t0; - M[offset + 1] = t1; - M[offset + 2] = t2; - M[offset + 3] = t3; - }, - - keySize: 256/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); - */ - C.AES = BlockCipher._createHelper(AES); - }()); - - - return CryptoJS.AES; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/blowfish.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/blowfish.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - const N = 16; - - //Origin pbox and sbox, derived from PI - const ORIG_P = [ - 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, - 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89, - 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C, - 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917, - 0x9216D5D9, 0x8979FB1B - ]; - - const ORIG_S = [ - [ 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7, - 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99, - 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16, - 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E, - 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE, - 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013, - 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF, - 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E, - 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60, - 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440, - 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE, - 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A, - 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E, - 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677, - 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193, - 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032, - 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88, - 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239, - 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E, - 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0, - 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3, - 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98, - 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88, - 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE, - 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6, - 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D, - 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B, - 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7, - 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA, - 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463, - 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F, - 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09, - 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3, - 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB, - 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279, - 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8, - 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB, - 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82, - 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB, - 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573, - 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0, - 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B, - 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790, - 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8, - 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4, - 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0, - 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7, - 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C, - 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD, - 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1, - 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299, - 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9, - 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477, - 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF, - 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49, - 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF, - 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA, - 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5, - 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41, - 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915, - 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400, - 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915, - 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664, - 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A ], - [ 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623, - 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266, - 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1, - 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E, - 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6, - 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1, - 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E, - 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1, - 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737, - 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8, - 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF, - 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD, - 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701, - 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7, - 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41, - 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331, - 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF, - 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF, - 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E, - 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87, - 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C, - 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2, - 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16, - 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD, - 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B, - 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509, - 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E, - 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3, - 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F, - 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A, - 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4, - 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960, - 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66, - 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28, - 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802, - 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84, - 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510, - 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF, - 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14, - 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E, - 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50, - 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7, - 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8, - 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281, - 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99, - 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696, - 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128, - 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73, - 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0, - 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0, - 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105, - 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250, - 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3, - 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285, - 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00, - 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061, - 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB, - 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E, - 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735, - 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC, - 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9, - 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340, - 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20, - 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7 ], - [ 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934, - 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068, - 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF, - 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840, - 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45, - 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504, - 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A, - 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB, - 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE, - 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6, - 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42, - 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B, - 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2, - 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB, - 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527, - 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B, - 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33, - 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C, - 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3, - 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC, - 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17, - 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564, - 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B, - 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115, - 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922, - 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728, - 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0, - 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E, - 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37, - 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D, - 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804, - 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B, - 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3, - 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB, - 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D, - 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C, - 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350, - 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9, - 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A, - 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE, - 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D, - 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC, - 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F, - 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61, - 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2, - 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9, - 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2, - 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C, - 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E, - 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633, - 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10, - 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169, - 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52, - 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027, - 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5, - 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62, - 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634, - 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76, - 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24, - 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC, - 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4, - 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C, - 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837, - 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0 ], - [ 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B, - 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE, - 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B, - 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4, - 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8, - 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6, - 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304, - 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22, - 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4, - 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6, - 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9, - 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59, - 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593, - 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51, - 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28, - 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C, - 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B, - 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28, - 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C, - 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD, - 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A, - 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319, - 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB, - 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F, - 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991, - 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32, - 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680, - 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166, - 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE, - 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB, - 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5, - 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47, - 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370, - 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D, - 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84, - 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048, - 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8, - 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD, - 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9, - 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7, - 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38, - 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F, - 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C, - 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525, - 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1, - 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442, - 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964, - 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E, - 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8, - 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D, - 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F, - 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299, - 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02, - 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC, - 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614, - 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A, - 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6, - 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B, - 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0, - 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060, - 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E, - 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9, - 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F, - 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6 ] - ]; - - var BLOWFISH_CTX = { - pbox: [], - sbox: [] - } - - function F(ctx, x){ - let a = (x >> 24) & 0xFF; - let b = (x >> 16) & 0xFF; - let c = (x >> 8) & 0xFF; - let d = x & 0xFF; - - let y = ctx.sbox[0][a] + ctx.sbox[1][b]; - y = y ^ ctx.sbox[2][c]; - y = y + ctx.sbox[3][d]; - - return y; - } - - function BlowFish_Encrypt(ctx, left, right){ - let Xl = left; - let Xr = right; - let temp; - - for(let i = 0; i < N; ++i){ - Xl = Xl ^ ctx.pbox[i]; - Xr = F(ctx, Xl) ^ Xr; - - temp = Xl; - Xl = Xr; - Xr = temp; - } - - temp = Xl; - Xl = Xr; - Xr = temp; - - Xr = Xr ^ ctx.pbox[N]; - Xl = Xl ^ ctx.pbox[N + 1]; - - return {left: Xl, right: Xr}; - } - - function BlowFish_Decrypt(ctx, left, right){ - let Xl = left; - let Xr = right; - let temp; - - for(let i = N + 1; i > 1; --i){ - Xl = Xl ^ ctx.pbox[i]; - Xr = F(ctx, Xl) ^ Xr; - - temp = Xl; - Xl = Xr; - Xr = temp; - } - - temp = Xl; - Xl = Xr; - Xr = temp; - - Xr = Xr ^ ctx.pbox[1]; - Xl = Xl ^ ctx.pbox[0]; - - return {left: Xl, right: Xr}; - } - - /** - * Initialization ctx's pbox and sbox. - * - * @param {Object} ctx The object has pbox and sbox. - * @param {Array} key An array of 32-bit words. - * @param {int} keysize The length of the key. - * - * @example - * - * BlowFishInit(BLOWFISH_CTX, key, 128/32); - */ - function BlowFishInit(ctx, key, keysize) - { - for(let Row = 0; Row < 4; Row++) - { - ctx.sbox[Row] = []; - for(let Col = 0; Col < 256; Col++) - { - ctx.sbox[Row][Col] = ORIG_S[Row][Col]; - } - } - - let keyIndex = 0; - for(let index = 0; index < N + 2; index++) - { - ctx.pbox[index] = ORIG_P[index] ^ key[keyIndex]; - keyIndex++; - if(keyIndex >= keysize) - { - keyIndex = 0; - } - } - - let Data1 = 0; - let Data2 = 0; - let res = 0; - for(let i = 0; i < N + 2; i += 2) - { - res = BlowFish_Encrypt(ctx, Data1, Data2); - Data1 = res.left; - Data2 = res.right; - ctx.pbox[i] = Data1; - ctx.pbox[i + 1] = Data2; - } - - for(let i = 0; i < 4; i++) - { - for(let j = 0; j < 256; j += 2) - { - res = BlowFish_Encrypt(ctx, Data1, Data2); - Data1 = res.left; - Data2 = res.right; - ctx.sbox[i][j] = Data1; - ctx.sbox[i][j + 1] = Data2; - } - } - - return true; - } - - /** - * Blowfish block cipher algorithm. - */ - var Blowfish = C_algo.Blowfish = BlockCipher.extend({ - _doReset: function () { - // Skip reset of nRounds has been set before and key did not change - if (this._keyPriorReset === this._key) { - return; - } - - // Shortcuts - var key = this._keyPriorReset = this._key; - var keyWords = key.words; - var keySize = key.sigBytes / 4; - - //Initialization pbox and sbox - BlowFishInit(BLOWFISH_CTX, keyWords, keySize); - }, - - encryptBlock: function (M, offset) { - var res = BlowFish_Encrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); - M[offset] = res.left; - M[offset + 1] = res.right; - }, - - decryptBlock: function (M, offset) { - var res = BlowFish_Decrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); - M[offset] = res.left; - M[offset + 1] = res.right; - }, - - blockSize: 64/32, - - keySize: 128/32, - - ivSize: 64/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.Blowfish.encrypt(message, key, cfg); - * var plaintext = CryptoJS.Blowfish.decrypt(ciphertext, key, cfg); - */ - C.Blowfish = BlockCipher._createHelper(Blowfish); - }()); - - - return CryptoJS.Blowfish; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/cipher-core.js": -/*!***********************************************!*\ - !*** ./node_modules/crypto-js/cipher-core.js ***! - \***********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Cipher core components. - */ - CryptoJS.lib.Cipher || (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var Base64 = C_enc.Base64; - var C_algo = C.algo; - var EvpKDF = C_algo.EvpKDF; - - /** - * Abstract base cipher template. - * - * @property {number} keySize This cipher's key size. Default: 4 (128 bits) - * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) - * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. - * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. - */ - var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ - /** - * Configuration options. - * - * @property {WordArray} iv The IV to use for this operation. - */ - cfg: Base.extend(), - - /** - * Creates this cipher in encryption mode. - * - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {Cipher} A cipher instance. - * - * @static - * - * @example - * - * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); - */ - createEncryptor: function (key, cfg) { - return this.create(this._ENC_XFORM_MODE, key, cfg); - }, - - /** - * Creates this cipher in decryption mode. - * - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {Cipher} A cipher instance. - * - * @static - * - * @example - * - * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); - */ - createDecryptor: function (key, cfg) { - return this.create(this._DEC_XFORM_MODE, key, cfg); - }, - - /** - * Initializes a newly created cipher. - * - * @param {number} xformMode Either the encryption or decryption transormation mode constant. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @example - * - * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); - */ - init: function (xformMode, key, cfg) { - // Apply config defaults - this.cfg = this.cfg.extend(cfg); - - // Store transform mode and key - this._xformMode = xformMode; - this._key = key; - - // Set initial values - this.reset(); - }, - - /** - * Resets this cipher to its initial state. - * - * @example - * - * cipher.reset(); - */ - reset: function () { - // Reset data buffer - BufferedBlockAlgorithm.reset.call(this); - - // Perform concrete-cipher logic - this._doReset(); - }, - - /** - * Adds data to be encrypted or decrypted. - * - * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. - * - * @return {WordArray} The data after processing. - * - * @example - * - * var encrypted = cipher.process('data'); - * var encrypted = cipher.process(wordArray); - */ - process: function (dataUpdate) { - // Append - this._append(dataUpdate); - - // Process available blocks - return this._process(); - }, - - /** - * Finalizes the encryption or decryption process. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. - * - * @return {WordArray} The data after final processing. - * - * @example - * - * var encrypted = cipher.finalize(); - * var encrypted = cipher.finalize('data'); - * var encrypted = cipher.finalize(wordArray); - */ - finalize: function (dataUpdate) { - // Final data update - if (dataUpdate) { - this._append(dataUpdate); - } - - // Perform concrete-cipher logic - var finalProcessedData = this._doFinalize(); - - return finalProcessedData; - }, - - keySize: 128/32, - - ivSize: 128/32, - - _ENC_XFORM_MODE: 1, - - _DEC_XFORM_MODE: 2, - - /** - * Creates shortcut functions to a cipher's object interface. - * - * @param {Cipher} cipher The cipher to create a helper for. - * - * @return {Object} An object with encrypt and decrypt shortcut functions. - * - * @static - * - * @example - * - * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); - */ - _createHelper: (function () { - function selectCipherStrategy(key) { - if (typeof key == 'string') { - return PasswordBasedCipher; - } else { - return SerializableCipher; - } - } - - return function (cipher) { - return { - encrypt: function (message, key, cfg) { - return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); - }, - - decrypt: function (ciphertext, key, cfg) { - return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); - } - }; - }; - }()) - }); - - /** - * Abstract base stream cipher template. - * - * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) - */ - var StreamCipher = C_lib.StreamCipher = Cipher.extend({ - _doFinalize: function () { - // Process partial blocks - var finalProcessedBlocks = this._process(!!'flush'); - - return finalProcessedBlocks; - }, - - blockSize: 1 - }); - - /** - * Mode namespace. - */ - var C_mode = C.mode = {}; - - /** - * Abstract base block cipher mode template. - */ - var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ - /** - * Creates this mode for encryption. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @static - * - * @example - * - * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); - */ - createEncryptor: function (cipher, iv) { - return this.Encryptor.create(cipher, iv); - }, - - /** - * Creates this mode for decryption. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @static - * - * @example - * - * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); - */ - createDecryptor: function (cipher, iv) { - return this.Decryptor.create(cipher, iv); - }, - - /** - * Initializes a newly created mode. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @example - * - * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); - */ - init: function (cipher, iv) { - this._cipher = cipher; - this._iv = iv; - } - }); - - /** - * Cipher Block Chaining mode. - */ - var CBC = C_mode.CBC = (function () { - /** - * Abstract base CBC mode. - */ - var CBC = BlockCipherMode.extend(); - - /** - * CBC encryptor. - */ - CBC.Encryptor = CBC.extend({ - /** - * Processes the data block at offset. - * - * @param {Array} words The data words to operate on. - * @param {number} offset The offset where the block starts. - * - * @example - * - * mode.processBlock(data.words, offset); - */ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // XOR and encrypt - xorBlock.call(this, words, offset, blockSize); - cipher.encryptBlock(words, offset); - - // Remember this block to use with next block - this._prevBlock = words.slice(offset, offset + blockSize); - } - }); - - /** - * CBC decryptor. - */ - CBC.Decryptor = CBC.extend({ - /** - * Processes the data block at offset. - * - * @param {Array} words The data words to operate on. - * @param {number} offset The offset where the block starts. - * - * @example - * - * mode.processBlock(data.words, offset); - */ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // Remember this block to use with next block - var thisBlock = words.slice(offset, offset + blockSize); - - // Decrypt and XOR - cipher.decryptBlock(words, offset); - xorBlock.call(this, words, offset, blockSize); - - // This block becomes the previous block - this._prevBlock = thisBlock; - } - }); - - function xorBlock(words, offset, blockSize) { - var block; - - // Shortcut - var iv = this._iv; - - // Choose mixing block - if (iv) { - block = iv; - - // Remove IV for subsequent blocks - this._iv = undefined; - } else { - block = this._prevBlock; - } - - // XOR blocks - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= block[i]; - } - } - - return CBC; - }()); - - /** - * Padding namespace. - */ - var C_pad = C.pad = {}; - - /** - * PKCS #5/7 padding strategy. - */ - var Pkcs7 = C_pad.Pkcs7 = { - /** - * Pads data using the algorithm defined in PKCS #5/7. - * - * @param {WordArray} data The data to pad. - * @param {number} blockSize The multiple that the data should be padded to. - * - * @static - * - * @example - * - * CryptoJS.pad.Pkcs7.pad(wordArray, 4); - */ - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - - // Create padding word - var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; - - // Create padding - var paddingWords = []; - for (var i = 0; i < nPaddingBytes; i += 4) { - paddingWords.push(paddingWord); - } - var padding = WordArray.create(paddingWords, nPaddingBytes); - - // Add padding - data.concat(padding); - }, - - /** - * Unpads data that had been padded using the algorithm defined in PKCS #5/7. - * - * @param {WordArray} data The data to unpad. - * - * @static - * - * @example - * - * CryptoJS.pad.Pkcs7.unpad(wordArray); - */ - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - /** - * Abstract base block cipher template. - * - * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) - */ - var BlockCipher = C_lib.BlockCipher = Cipher.extend({ - /** - * Configuration options. - * - * @property {Mode} mode The block mode to use. Default: CBC - * @property {Padding} padding The padding strategy to use. Default: Pkcs7 - */ - cfg: Cipher.cfg.extend({ - mode: CBC, - padding: Pkcs7 - }), - - reset: function () { - var modeCreator; - - // Reset cipher - Cipher.reset.call(this); - - // Shortcuts - var cfg = this.cfg; - var iv = cfg.iv; - var mode = cfg.mode; - - // Reset block mode - if (this._xformMode == this._ENC_XFORM_MODE) { - modeCreator = mode.createEncryptor; - } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { - modeCreator = mode.createDecryptor; - // Keep at least one block in the buffer for unpadding - this._minBufferSize = 1; - } - - if (this._mode && this._mode.__creator == modeCreator) { - this._mode.init(this, iv && iv.words); - } else { - this._mode = modeCreator.call(mode, this, iv && iv.words); - this._mode.__creator = modeCreator; - } - }, - - _doProcessBlock: function (words, offset) { - this._mode.processBlock(words, offset); - }, - - _doFinalize: function () { - var finalProcessedBlocks; - - // Shortcut - var padding = this.cfg.padding; - - // Finalize - if (this._xformMode == this._ENC_XFORM_MODE) { - // Pad data - padding.pad(this._data, this.blockSize); - - // Process final blocks - finalProcessedBlocks = this._process(!!'flush'); - } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { - // Process final blocks - finalProcessedBlocks = this._process(!!'flush'); - - // Unpad data - padding.unpad(finalProcessedBlocks); - } - - return finalProcessedBlocks; - }, - - blockSize: 128/32 - }); - - /** - * A collection of cipher parameters. - * - * @property {WordArray} ciphertext The raw ciphertext. - * @property {WordArray} key The key to this ciphertext. - * @property {WordArray} iv The IV used in the ciphering operation. - * @property {WordArray} salt The salt used with a key derivation function. - * @property {Cipher} algorithm The cipher algorithm. - * @property {Mode} mode The block mode used in the ciphering operation. - * @property {Padding} padding The padding scheme used in the ciphering operation. - * @property {number} blockSize The block size of the cipher. - * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. - */ - var CipherParams = C_lib.CipherParams = Base.extend({ - /** - * Initializes a newly created cipher params object. - * - * @param {Object} cipherParams An object with any of the possible cipher parameters. - * - * @example - * - * var cipherParams = CryptoJS.lib.CipherParams.create({ - * ciphertext: ciphertextWordArray, - * key: keyWordArray, - * iv: ivWordArray, - * salt: saltWordArray, - * algorithm: CryptoJS.algo.AES, - * mode: CryptoJS.mode.CBC, - * padding: CryptoJS.pad.PKCS7, - * blockSize: 4, - * formatter: CryptoJS.format.OpenSSL - * }); - */ - init: function (cipherParams) { - this.mixIn(cipherParams); - }, - - /** - * Converts this cipher params object to a string. - * - * @param {Format} formatter (Optional) The formatting strategy to use. - * - * @return {string} The stringified cipher params. - * - * @throws Error If neither the formatter nor the default formatter is set. - * - * @example - * - * var string = cipherParams + ''; - * var string = cipherParams.toString(); - * var string = cipherParams.toString(CryptoJS.format.OpenSSL); - */ - toString: function (formatter) { - return (formatter || this.formatter).stringify(this); - } - }); - - /** - * Format namespace. - */ - var C_format = C.format = {}; - - /** - * OpenSSL formatting strategy. - */ - var OpenSSLFormatter = C_format.OpenSSL = { - /** - * Converts a cipher params object to an OpenSSL-compatible string. - * - * @param {CipherParams} cipherParams The cipher params object. - * - * @return {string} The OpenSSL-compatible string. - * - * @static - * - * @example - * - * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); - */ - stringify: function (cipherParams) { - var wordArray; - - // Shortcuts - var ciphertext = cipherParams.ciphertext; - var salt = cipherParams.salt; - - // Format - if (salt) { - wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); - } else { - wordArray = ciphertext; - } - - return wordArray.toString(Base64); - }, - - /** - * Converts an OpenSSL-compatible string to a cipher params object. - * - * @param {string} openSSLStr The OpenSSL-compatible string. - * - * @return {CipherParams} The cipher params object. - * - * @static - * - * @example - * - * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); - */ - parse: function (openSSLStr) { - var salt; - - // Parse base64 - var ciphertext = Base64.parse(openSSLStr); - - // Shortcut - var ciphertextWords = ciphertext.words; - - // Test for salt - if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { - // Extract salt - salt = WordArray.create(ciphertextWords.slice(2, 4)); - - // Remove salt from ciphertext - ciphertextWords.splice(0, 4); - ciphertext.sigBytes -= 16; - } - - return CipherParams.create({ ciphertext: ciphertext, salt: salt }); - } - }; - - /** - * A cipher wrapper that returns ciphertext as a serializable cipher params object. - */ - var SerializableCipher = C_lib.SerializableCipher = Base.extend({ - /** - * Configuration options. - * - * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL - */ - cfg: Base.extend({ - format: OpenSSLFormatter - }), - - /** - * Encrypts a message. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {WordArray|string} message The message to encrypt. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {CipherParams} A cipher params object. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - */ - encrypt: function (cipher, message, key, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Encrypt - var encryptor = cipher.createEncryptor(key, cfg); - var ciphertext = encryptor.finalize(message); - - // Shortcut - var cipherCfg = encryptor.cfg; - - // Create and return serializable cipher params - return CipherParams.create({ - ciphertext: ciphertext, - key: key, - iv: cipherCfg.iv, - algorithm: cipher, - mode: cipherCfg.mode, - padding: cipherCfg.padding, - blockSize: cipher.blockSize, - formatter: cfg.format - }); - }, - - /** - * Decrypts serialized ciphertext. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {CipherParams|string} ciphertext The ciphertext to decrypt. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {WordArray} The plaintext. - * - * @static - * - * @example - * - * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - */ - decrypt: function (cipher, ciphertext, key, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Convert string to CipherParams - ciphertext = this._parse(ciphertext, cfg.format); - - // Decrypt - var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); - - return plaintext; - }, - - /** - * Converts serialized ciphertext to CipherParams, - * else assumed CipherParams already and returns ciphertext unchanged. - * - * @param {CipherParams|string} ciphertext The ciphertext. - * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. - * - * @return {CipherParams} The unserialized ciphertext. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); - */ - _parse: function (ciphertext, format) { - if (typeof ciphertext == 'string') { - return format.parse(ciphertext, this); - } else { - return ciphertext; - } - } - }); - - /** - * Key derivation function namespace. - */ - var C_kdf = C.kdf = {}; - - /** - * OpenSSL key derivation function. - */ - var OpenSSLKdf = C_kdf.OpenSSL = { - /** - * Derives a key and IV from a password. - * - * @param {string} password The password to derive from. - * @param {number} keySize The size in words of the key to generate. - * @param {number} ivSize The size in words of the IV to generate. - * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. - * - * @return {CipherParams} A cipher params object with the key, IV, and salt. - * - * @static - * - * @example - * - * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); - * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); - */ - execute: function (password, keySize, ivSize, salt, hasher) { - // Generate random salt - if (!salt) { - salt = WordArray.random(64/8); - } - - // Derive key and IV - if (!hasher) { - var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); - } else { - var key = EvpKDF.create({ keySize: keySize + ivSize, hasher: hasher }).compute(password, salt); - } - - - // Separate key and IV - var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); - key.sigBytes = keySize * 4; - - // Return params - return CipherParams.create({ key: key, iv: iv, salt: salt }); - } - }; - - /** - * A serializable cipher wrapper that derives the key from a password, - * and returns ciphertext as a serializable cipher params object. - */ - var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ - /** - * Configuration options. - * - * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL - */ - cfg: SerializableCipher.cfg.extend({ - kdf: OpenSSLKdf - }), - - /** - * Encrypts a message using a password. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {WordArray|string} message The message to encrypt. - * @param {string} password The password. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {CipherParams} A cipher params object. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); - * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); - */ - encrypt: function (cipher, message, password, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Derive key and other params - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher); - - // Add IV to config - cfg.iv = derivedParams.iv; - - // Encrypt - var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); - - // Mix in derived params - ciphertext.mixIn(derivedParams); - - return ciphertext; - }, - - /** - * Decrypts serialized ciphertext using a password. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {CipherParams|string} ciphertext The ciphertext to decrypt. - * @param {string} password The password. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {WordArray} The plaintext. - * - * @static - * - * @example - * - * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); - * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); - */ - decrypt: function (cipher, ciphertext, password, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Convert string to CipherParams - ciphertext = this._parse(ciphertext, cfg.format); - - // Derive key and other params - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher); - - // Add IV to config - cfg.iv = derivedParams.iv; - - // Decrypt - var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); - - return plaintext; - } - }); - }()); - - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/core.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/core.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(); - } - else {} -}(this, function () { - - /*globals window, global, require*/ - - /** - * CryptoJS core components. - */ - var CryptoJS = CryptoJS || (function (Math, undefined) { - - var crypto; - - // Native crypto from window (Browser) - if (typeof window !== 'undefined' && window.crypto) { - crypto = window.crypto; - } - - // Native crypto in web worker (Browser) - if (typeof self !== 'undefined' && self.crypto) { - crypto = self.crypto; - } - - // Native crypto from worker - if (typeof globalThis !== 'undefined' && globalThis.crypto) { - crypto = globalThis.crypto; - } - - // Native (experimental IE 11) crypto from window (Browser) - if (!crypto && typeof window !== 'undefined' && window.msCrypto) { - crypto = window.msCrypto; - } - - // Native crypto from global (NodeJS) - if (!crypto && typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.crypto) { - crypto = __webpack_require__.g.crypto; - } - - // Native crypto import via require (NodeJS) - if (!crypto && "function" === 'function') { - try { - crypto = __webpack_require__(/*! crypto */ "?9157"); - } catch (err) {} - } - - /* - * Cryptographically secure pseudorandom number generator - * - * As Math.random() is cryptographically not safe to use - */ - var cryptoSecureRandomInt = function () { - if (crypto) { - // Use getRandomValues method (Browser) - if (typeof crypto.getRandomValues === 'function') { - try { - return crypto.getRandomValues(new Uint32Array(1))[0]; - } catch (err) {} - } - - // Use randomBytes method (NodeJS) - if (typeof crypto.randomBytes === 'function') { - try { - return crypto.randomBytes(4).readInt32LE(); - } catch (err) {} - } - } - - throw new Error('Native crypto module could not be used to get secure random number.'); - }; - - /* - * Local polyfill of Object.create - - */ - var create = Object.create || (function () { - function F() {} - - return function (obj) { - var subtype; - - F.prototype = obj; - - subtype = new F(); - - F.prototype = null; - - return subtype; - }; - }()); - - /** - * CryptoJS namespace. - */ - var C = {}; - - /** - * Library namespace. - */ - var C_lib = C.lib = {}; - - /** - * Base object for prototypal inheritance. - */ - var Base = C_lib.Base = (function () { - - - return { - /** - * Creates a new object that inherits from this object. - * - * @param {Object} overrides Properties to copy into the new object. - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * field: 'value', - * - * method: function () { - * } - * }); - */ - extend: function (overrides) { - // Spawn - var subtype = create(this); - - // Augment - if (overrides) { - subtype.mixIn(overrides); - } - - // Create default initializer - if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { - subtype.init = function () { - subtype.$super.init.apply(this, arguments); - }; - } - - // Initializer's prototype is the subtype object - subtype.init.prototype = subtype; - - // Reference supertype - subtype.$super = this; - - return subtype; - }, - - /** - * Extends this object and runs the init method. - * Arguments to create() will be passed to init(). - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var instance = MyType.create(); - */ - create: function () { - var instance = this.extend(); - instance.init.apply(instance, arguments); - - return instance; - }, - - /** - * Initializes a newly created object. - * Override this method to add some logic when your objects are created. - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * init: function () { - * // ... - * } - * }); - */ - init: function () { - }, - - /** - * Copies properties into this object. - * - * @param {Object} properties The properties to mix in. - * - * @example - * - * MyType.mixIn({ - * field: 'value' - * }); - */ - mixIn: function (properties) { - for (var propertyName in properties) { - if (properties.hasOwnProperty(propertyName)) { - this[propertyName] = properties[propertyName]; - } - } - - // IE won't copy toString using the loop above - if (properties.hasOwnProperty('toString')) { - this.toString = properties.toString; - } - }, - - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = instance.clone(); - */ - clone: function () { - return this.init.prototype.extend(this); - } - }; - }()); - - /** - * An array of 32-bit words. - * - * @property {Array} words The array of 32-bit words. - * @property {number} sigBytes The number of significant bytes in this word array. - */ - var WordArray = C_lib.WordArray = Base.extend({ - /** - * Initializes a newly created word array. - * - * @param {Array} words (Optional) An array of 32-bit words. - * @param {number} sigBytes (Optional) The number of significant bytes in the words. - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.create(); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); - */ - init: function (words, sigBytes) { - words = this.words = words || []; - - if (sigBytes != undefined) { - this.sigBytes = sigBytes; - } else { - this.sigBytes = words.length * 4; - } - }, - - /** - * Converts this word array to a string. - * - * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex - * - * @return {string} The stringified word array. - * - * @example - * - * var string = wordArray + ''; - * var string = wordArray.toString(); - * var string = wordArray.toString(CryptoJS.enc.Utf8); - */ - toString: function (encoder) { - return (encoder || Hex).stringify(this); - }, - - /** - * Concatenates a word array to this word array. - * - * @param {WordArray} wordArray The word array to append. - * - * @return {WordArray} This word array. - * - * @example - * - * wordArray1.concat(wordArray2); - */ - concat: function (wordArray) { - // Shortcuts - var thisWords = this.words; - var thatWords = wordArray.words; - var thisSigBytes = this.sigBytes; - var thatSigBytes = wordArray.sigBytes; - - // Clamp excess bits - this.clamp(); - - // Concat - if (thisSigBytes % 4) { - // Copy one byte at a time - for (var i = 0; i < thatSigBytes; i++) { - var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); - } - } else { - // Copy one word at a time - for (var j = 0; j < thatSigBytes; j += 4) { - thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2]; - } - } - this.sigBytes += thatSigBytes; - - // Chainable - return this; - }, - - /** - * Removes insignificant bits. - * - * @example - * - * wordArray.clamp(); - */ - clamp: function () { - // Shortcuts - var words = this.words; - var sigBytes = this.sigBytes; - - // Clamp - words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); - words.length = Math.ceil(sigBytes / 4); - }, - - /** - * Creates a copy of this word array. - * - * @return {WordArray} The clone. - * - * @example - * - * var clone = wordArray.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - clone.words = this.words.slice(0); - - return clone; - }, - - /** - * Creates a word array filled with random bytes. - * - * @param {number} nBytes The number of random bytes to generate. - * - * @return {WordArray} The random word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.random(16); - */ - random: function (nBytes) { - var words = []; - - for (var i = 0; i < nBytes; i += 4) { - words.push(cryptoSecureRandomInt()); - } - - return new WordArray.init(words, nBytes); - } - }); - - /** - * Encoder namespace. - */ - var C_enc = C.enc = {}; - - /** - * Hex encoding strategy. - */ - var Hex = C_enc.Hex = { - /** - * Converts a word array to a hex string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The hex string. - * - * @static - * - * @example - * - * var hexString = CryptoJS.enc.Hex.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var hexChars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - hexChars.push((bite >>> 4).toString(16)); - hexChars.push((bite & 0x0f).toString(16)); - } - - return hexChars.join(''); - }, - - /** - * Converts a hex string to a word array. - * - * @param {string} hexStr The hex string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Hex.parse(hexString); - */ - parse: function (hexStr) { - // Shortcut - var hexStrLength = hexStr.length; - - // Convert - var words = []; - for (var i = 0; i < hexStrLength; i += 2) { - words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); - } - - return new WordArray.init(words, hexStrLength / 2); - } - }; - - /** - * Latin1 encoding strategy. - */ - var Latin1 = C_enc.Latin1 = { - /** - * Converts a word array to a Latin1 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The Latin1 string. - * - * @static - * - * @example - * - * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var latin1Chars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - latin1Chars.push(String.fromCharCode(bite)); - } - - return latin1Chars.join(''); - }, - - /** - * Converts a Latin1 string to a word array. - * - * @param {string} latin1Str The Latin1 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); - */ - parse: function (latin1Str) { - // Shortcut - var latin1StrLength = latin1Str.length; - - // Convert - var words = []; - for (var i = 0; i < latin1StrLength; i++) { - words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); - } - - return new WordArray.init(words, latin1StrLength); - } - }; - - /** - * UTF-8 encoding strategy. - */ - var Utf8 = C_enc.Utf8 = { - /** - * Converts a word array to a UTF-8 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-8 string. - * - * @static - * - * @example - * - * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); - */ - stringify: function (wordArray) { - try { - return decodeURIComponent(escape(Latin1.stringify(wordArray))); - } catch (e) { - throw new Error('Malformed UTF-8 data'); - } - }, - - /** - * Converts a UTF-8 string to a word array. - * - * @param {string} utf8Str The UTF-8 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); - */ - parse: function (utf8Str) { - return Latin1.parse(unescape(encodeURIComponent(utf8Str))); - } - }; - - /** - * Abstract buffered block algorithm template. - * - * The property blockSize must be implemented in a concrete subtype. - * - * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 - */ - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ - /** - * Resets this block algorithm's data buffer to its initial state. - * - * @example - * - * bufferedBlockAlgorithm.reset(); - */ - reset: function () { - // Initial values - this._data = new WordArray.init(); - this._nDataBytes = 0; - }, - - /** - * Adds new data to this block algorithm's buffer. - * - * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. - * - * @example - * - * bufferedBlockAlgorithm._append('data'); - * bufferedBlockAlgorithm._append(wordArray); - */ - _append: function (data) { - // Convert string to WordArray, else assume WordArray already - if (typeof data == 'string') { - data = Utf8.parse(data); - } - - // Append - this._data.concat(data); - this._nDataBytes += data.sigBytes; - }, - - /** - * Processes available data blocks. - * - * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. - * - * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. - * - * @return {WordArray} The processed data. - * - * @example - * - * var processedData = bufferedBlockAlgorithm._process(); - * var processedData = bufferedBlockAlgorithm._process(!!'flush'); - */ - _process: function (doFlush) { - var processedWords; - - // Shortcuts - var data = this._data; - var dataWords = data.words; - var dataSigBytes = data.sigBytes; - var blockSize = this.blockSize; - var blockSizeBytes = blockSize * 4; - - // Count blocks ready - var nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - // Round up to include partial blocks - nBlocksReady = Math.ceil(nBlocksReady); - } else { - // Round down to include only full blocks, - // less the number of blocks that must remain in the buffer - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } - - // Count words ready - var nWordsReady = nBlocksReady * blockSize; - - // Count bytes ready - var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); - - // Process blocks - if (nWordsReady) { - for (var offset = 0; offset < nWordsReady; offset += blockSize) { - // Perform concrete-algorithm logic - this._doProcessBlock(dataWords, offset); - } - - // Remove processed words - processedWords = dataWords.splice(0, nWordsReady); - data.sigBytes -= nBytesReady; - } - - // Return processed words - return new WordArray.init(processedWords, nBytesReady); - }, - - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = bufferedBlockAlgorithm.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - clone._data = this._data.clone(); - - return clone; - }, - - _minBufferSize: 0 - }); - - /** - * Abstract hasher template. - * - * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) - */ - var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ - /** - * Configuration options. - */ - cfg: Base.extend(), - - /** - * Initializes a newly created hasher. - * - * @param {Object} cfg (Optional) The configuration options to use for this hash computation. - * - * @example - * - * var hasher = CryptoJS.algo.SHA256.create(); - */ - init: function (cfg) { - // Apply config defaults - this.cfg = this.cfg.extend(cfg); - - // Set initial values - this.reset(); - }, - - /** - * Resets this hasher to its initial state. - * - * @example - * - * hasher.reset(); - */ - reset: function () { - // Reset data buffer - BufferedBlockAlgorithm.reset.call(this); - - // Perform concrete-hasher logic - this._doReset(); - }, - - /** - * Updates this hasher with a message. - * - * @param {WordArray|string} messageUpdate The message to append. - * - * @return {Hasher} This hasher. - * - * @example - * - * hasher.update('message'); - * hasher.update(wordArray); - */ - update: function (messageUpdate) { - // Append - this._append(messageUpdate); - - // Update the hash - this._process(); - - // Chainable - return this; - }, - - /** - * Finalizes the hash computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} messageUpdate (Optional) A final message update. - * - * @return {WordArray} The hash. - * - * @example - * - * var hash = hasher.finalize(); - * var hash = hasher.finalize('message'); - * var hash = hasher.finalize(wordArray); - */ - finalize: function (messageUpdate) { - // Final message update - if (messageUpdate) { - this._append(messageUpdate); - } - - // Perform concrete-hasher logic - var hash = this._doFinalize(); - - return hash; - }, - - blockSize: 512/32, - - /** - * Creates a shortcut function to a hasher's object interface. - * - * @param {Hasher} hasher The hasher to create a helper for. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); - */ - _createHelper: function (hasher) { - return function (message, cfg) { - return new hasher.init(cfg).finalize(message); - }; - }, - - /** - * Creates a shortcut function to the HMAC's object interface. - * - * @param {Hasher} hasher The hasher to use in this HMAC helper. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); - */ - _createHmacHelper: function (hasher) { - return function (message, key) { - return new C_algo.HMAC.init(hasher, key).finalize(message); - }; - } - }); - - /** - * Algorithm namespace. - */ - var C_algo = C.algo = {}; - - return C; - }(Math)); - - - return CryptoJS; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/enc-base64.js": -/*!**********************************************!*\ - !*** ./node_modules/crypto-js/enc-base64.js ***! - \**********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - - /** - * Base64 encoding strategy. - */ - var Base64 = C_enc.Base64 = { - /** - * Converts a word array to a Base64 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The Base64 string. - * - * @static - * - * @example - * - * var base64String = CryptoJS.enc.Base64.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var map = this._map; - - // Clamp excess bits - wordArray.clamp(); - - // Convert - var base64Chars = []; - for (var i = 0; i < sigBytes; i += 3) { - var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; - var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; - - var triplet = (byte1 << 16) | (byte2 << 8) | byte3; - - for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { - base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); - } - } - - // Add padding - var paddingChar = map.charAt(64); - if (paddingChar) { - while (base64Chars.length % 4) { - base64Chars.push(paddingChar); - } - } - - return base64Chars.join(''); - }, - - /** - * Converts a Base64 string to a word array. - * - * @param {string} base64Str The Base64 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Base64.parse(base64String); - */ - parse: function (base64Str) { - // Shortcuts - var base64StrLength = base64Str.length; - var map = this._map; - var reverseMap = this._reverseMap; - - if (!reverseMap) { - reverseMap = this._reverseMap = []; - for (var j = 0; j < map.length; j++) { - reverseMap[map.charCodeAt(j)] = j; - } - } - - // Ignore padding - var paddingChar = map.charAt(64); - if (paddingChar) { - var paddingIndex = base64Str.indexOf(paddingChar); - if (paddingIndex !== -1) { - base64StrLength = paddingIndex; - } - } - - // Convert - return parseLoop(base64Str, base64StrLength, reverseMap); - - }, - - _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' - }; - - function parseLoop(base64Str, base64StrLength, reverseMap) { - var words = []; - var nBytes = 0; - for (var i = 0; i < base64StrLength; i++) { - if (i % 4) { - var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); - var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); - var bitsCombined = bits1 | bits2; - words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); - nBytes++; - } - } - return WordArray.create(words, nBytes); - } - }()); - - - return CryptoJS.enc.Base64; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/enc-base64url.js": -/*!*************************************************!*\ - !*** ./node_modules/crypto-js/enc-base64url.js ***! - \*************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - - /** - * Base64url encoding strategy. - */ - var Base64url = C_enc.Base64url = { - /** - * Converts a word array to a Base64url string. - * - * @param {WordArray} wordArray The word array. - * - * @param {boolean} urlSafe Whether to use url safe - * - * @return {string} The Base64url string. - * - * @static - * - * @example - * - * var base64String = CryptoJS.enc.Base64url.stringify(wordArray); - */ - stringify: function (wordArray, urlSafe) { - if (urlSafe === undefined) { - urlSafe = true - } - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var map = urlSafe ? this._safe_map : this._map; - - // Clamp excess bits - wordArray.clamp(); - - // Convert - var base64Chars = []; - for (var i = 0; i < sigBytes; i += 3) { - var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; - var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; - - var triplet = (byte1 << 16) | (byte2 << 8) | byte3; - - for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { - base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); - } - } - - // Add padding - var paddingChar = map.charAt(64); - if (paddingChar) { - while (base64Chars.length % 4) { - base64Chars.push(paddingChar); - } - } - - return base64Chars.join(''); - }, - - /** - * Converts a Base64url string to a word array. - * - * @param {string} base64Str The Base64url string. - * - * @param {boolean} urlSafe Whether to use url safe - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Base64url.parse(base64String); - */ - parse: function (base64Str, urlSafe) { - if (urlSafe === undefined) { - urlSafe = true - } - - // Shortcuts - var base64StrLength = base64Str.length; - var map = urlSafe ? this._safe_map : this._map; - var reverseMap = this._reverseMap; - - if (!reverseMap) { - reverseMap = this._reverseMap = []; - for (var j = 0; j < map.length; j++) { - reverseMap[map.charCodeAt(j)] = j; - } - } - - // Ignore padding - var paddingChar = map.charAt(64); - if (paddingChar) { - var paddingIndex = base64Str.indexOf(paddingChar); - if (paddingIndex !== -1) { - base64StrLength = paddingIndex; - } - } - - // Convert - return parseLoop(base64Str, base64StrLength, reverseMap); - - }, - - _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', - _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', - }; - - function parseLoop(base64Str, base64StrLength, reverseMap) { - var words = []; - var nBytes = 0; - for (var i = 0; i < base64StrLength; i++) { - if (i % 4) { - var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); - var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); - var bitsCombined = bits1 | bits2; - words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); - nBytes++; - } - } - return WordArray.create(words, nBytes); - } - }()); - - - return CryptoJS.enc.Base64url; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/enc-utf16.js": -/*!*********************************************!*\ - !*** ./node_modules/crypto-js/enc-utf16.js ***! - \*********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - - /** - * UTF-16 BE encoding strategy. - */ - var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { - /** - * Converts a word array to a UTF-16 BE string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-16 BE string. - * - * @static - * - * @example - * - * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var utf16Chars = []; - for (var i = 0; i < sigBytes; i += 2) { - var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; - utf16Chars.push(String.fromCharCode(codePoint)); - } - - return utf16Chars.join(''); - }, - - /** - * Converts a UTF-16 BE string to a word array. - * - * @param {string} utf16Str The UTF-16 BE string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); - */ - parse: function (utf16Str) { - // Shortcut - var utf16StrLength = utf16Str.length; - - // Convert - var words = []; - for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); - } - - return WordArray.create(words, utf16StrLength * 2); - } - }; - - /** - * UTF-16 LE encoding strategy. - */ - C_enc.Utf16LE = { - /** - * Converts a word array to a UTF-16 LE string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-16 LE string. - * - * @static - * - * @example - * - * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var utf16Chars = []; - for (var i = 0; i < sigBytes; i += 2) { - var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); - utf16Chars.push(String.fromCharCode(codePoint)); - } - - return utf16Chars.join(''); - }, - - /** - * Converts a UTF-16 LE string to a word array. - * - * @param {string} utf16Str The UTF-16 LE string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); - */ - parse: function (utf16Str) { - // Shortcut - var utf16StrLength = utf16Str.length; - - // Convert - var words = []; - for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); - } - - return WordArray.create(words, utf16StrLength * 2); - } - }; - - function swapEndian(word) { - return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); - } - }()); - - - return CryptoJS.enc.Utf16; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/evpkdf.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/evpkdf.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha1 */ "./node_modules/crypto-js/sha1.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var MD5 = C_algo.MD5; - - /** - * This key derivation function is meant to conform with EVP_BytesToKey. - * www.openssl.org/docs/crypto/EVP_BytesToKey.html - */ - var EvpKDF = C_algo.EvpKDF = Base.extend({ - /** - * Configuration options. - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hash algorithm to use. Default: MD5 - * @property {number} iterations The number of iterations to perform. Default: 1 - */ - cfg: Base.extend({ - keySize: 128/32, - hasher: MD5, - iterations: 1 - }), - - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * var kdf = CryptoJS.algo.EvpKDF.create(); - * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); - * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); - */ - init: function (cfg) { - this.cfg = this.cfg.extend(cfg); - }, - - /** - * Derives a key from a password. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * var key = kdf.compute(password, salt); - */ - compute: function (password, salt) { - var block; - - // Shortcut - var cfg = this.cfg; - - // Init hasher - var hasher = cfg.hasher.create(); - - // Initial values - var derivedKey = WordArray.create(); - - // Shortcuts - var derivedKeyWords = derivedKey.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; - - // Generate key - while (derivedKeyWords.length < keySize) { - if (block) { - hasher.update(block); - } - block = hasher.update(password).finalize(salt); - hasher.reset(); - - // Iterations - for (var i = 1; i < iterations; i++) { - block = hasher.finalize(block); - hasher.reset(); - } - - derivedKey.concat(block); - } - derivedKey.sigBytes = keySize * 4; - - return derivedKey; - } - }); - - /** - * Derives a key from a password. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * @param {Object} cfg (Optional) The configuration options to use for this computation. - * - * @return {WordArray} The derived key. - * - * @static - * - * @example - * - * var key = CryptoJS.EvpKDF(password, salt); - * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); - * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); - */ - C.EvpKDF = function (password, salt, cfg) { - return EvpKDF.create(cfg).compute(password, salt); - }; - }()); - - - return CryptoJS.EvpKDF; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/format-hex.js": -/*!**********************************************!*\ - !*** ./node_modules/crypto-js/format-hex.js ***! - \**********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var CipherParams = C_lib.CipherParams; - var C_enc = C.enc; - var Hex = C_enc.Hex; - var C_format = C.format; - - var HexFormatter = C_format.Hex = { - /** - * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. - * - * @param {CipherParams} cipherParams The cipher params object. - * - * @return {string} The hexadecimally encoded string. - * - * @static - * - * @example - * - * var hexString = CryptoJS.format.Hex.stringify(cipherParams); - */ - stringify: function (cipherParams) { - return cipherParams.ciphertext.toString(Hex); - }, - - /** - * Converts a hexadecimally encoded ciphertext string to a cipher params object. - * - * @param {string} input The hexadecimally encoded string. - * - * @return {CipherParams} The cipher params object. - * - * @static - * - * @example - * - * var cipherParams = CryptoJS.format.Hex.parse(hexString); - */ - parse: function (input) { - var ciphertext = Hex.parse(input); - return CipherParams.create({ ciphertext: ciphertext }); - } - }; - }()); - - - return CryptoJS.format.Hex; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/hmac.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/hmac.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var C_algo = C.algo; - - /** - * HMAC algorithm. - */ - var HMAC = C_algo.HMAC = Base.extend({ - /** - * Initializes a newly created HMAC. - * - * @param {Hasher} hasher The hash algorithm to use. - * @param {WordArray|string} key The secret key. - * - * @example - * - * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); - */ - init: function (hasher, key) { - // Init hasher - hasher = this._hasher = new hasher.init(); - - // Convert string to WordArray, else assume WordArray already - if (typeof key == 'string') { - key = Utf8.parse(key); - } - - // Shortcuts - var hasherBlockSize = hasher.blockSize; - var hasherBlockSizeBytes = hasherBlockSize * 4; - - // Allow arbitrary length keys - if (key.sigBytes > hasherBlockSizeBytes) { - key = hasher.finalize(key); - } - - // Clamp excess bits - key.clamp(); - - // Clone key for inner and outer pads - var oKey = this._oKey = key.clone(); - var iKey = this._iKey = key.clone(); - - // Shortcuts - var oKeyWords = oKey.words; - var iKeyWords = iKey.words; - - // XOR keys with pad constants - for (var i = 0; i < hasherBlockSize; i++) { - oKeyWords[i] ^= 0x5c5c5c5c; - iKeyWords[i] ^= 0x36363636; - } - oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; - - // Set initial values - this.reset(); - }, - - /** - * Resets this HMAC to its initial state. - * - * @example - * - * hmacHasher.reset(); - */ - reset: function () { - // Shortcut - var hasher = this._hasher; - - // Reset - hasher.reset(); - hasher.update(this._iKey); - }, - - /** - * Updates this HMAC with a message. - * - * @param {WordArray|string} messageUpdate The message to append. - * - * @return {HMAC} This HMAC instance. - * - * @example - * - * hmacHasher.update('message'); - * hmacHasher.update(wordArray); - */ - update: function (messageUpdate) { - this._hasher.update(messageUpdate); - - // Chainable - return this; - }, - - /** - * Finalizes the HMAC computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} messageUpdate (Optional) A final message update. - * - * @return {WordArray} The HMAC. - * - * @example - * - * var hmac = hmacHasher.finalize(); - * var hmac = hmacHasher.finalize('message'); - * var hmac = hmacHasher.finalize(wordArray); - */ - finalize: function (messageUpdate) { - // Shortcut - var hasher = this._hasher; - - // Compute HMAC - var innerHash = hasher.finalize(messageUpdate); - hasher.reset(); - var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); - - return hmac; - } - }); - }()); - - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/index.js": -/*!*****************************************!*\ - !*** ./node_modules/crypto-js/index.js ***! - \*****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js"), __webpack_require__(/*! ./lib-typedarrays */ "./node_modules/crypto-js/lib-typedarrays.js"), __webpack_require__(/*! ./enc-utf16 */ "./node_modules/crypto-js/enc-utf16.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./enc-base64url */ "./node_modules/crypto-js/enc-base64url.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./sha1 */ "./node_modules/crypto-js/sha1.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js"), __webpack_require__(/*! ./sha224 */ "./node_modules/crypto-js/sha224.js"), __webpack_require__(/*! ./sha512 */ "./node_modules/crypto-js/sha512.js"), __webpack_require__(/*! ./sha384 */ "./node_modules/crypto-js/sha384.js"), __webpack_require__(/*! ./sha3 */ "./node_modules/crypto-js/sha3.js"), __webpack_require__(/*! ./ripemd160 */ "./node_modules/crypto-js/ripemd160.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js"), __webpack_require__(/*! ./pbkdf2 */ "./node_modules/crypto-js/pbkdf2.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js"), __webpack_require__(/*! ./mode-cfb */ "./node_modules/crypto-js/mode-cfb.js"), __webpack_require__(/*! ./mode-ctr */ "./node_modules/crypto-js/mode-ctr.js"), __webpack_require__(/*! ./mode-ctr-gladman */ "./node_modules/crypto-js/mode-ctr-gladman.js"), __webpack_require__(/*! ./mode-ofb */ "./node_modules/crypto-js/mode-ofb.js"), __webpack_require__(/*! ./mode-ecb */ "./node_modules/crypto-js/mode-ecb.js"), __webpack_require__(/*! ./pad-ansix923 */ "./node_modules/crypto-js/pad-ansix923.js"), __webpack_require__(/*! ./pad-iso10126 */ "./node_modules/crypto-js/pad-iso10126.js"), __webpack_require__(/*! ./pad-iso97971 */ "./node_modules/crypto-js/pad-iso97971.js"), __webpack_require__(/*! ./pad-zeropadding */ "./node_modules/crypto-js/pad-zeropadding.js"), __webpack_require__(/*! ./pad-nopadding */ "./node_modules/crypto-js/pad-nopadding.js"), __webpack_require__(/*! ./format-hex */ "./node_modules/crypto-js/format-hex.js"), __webpack_require__(/*! ./aes */ "./node_modules/crypto-js/aes.js"), __webpack_require__(/*! ./tripledes */ "./node_modules/crypto-js/tripledes.js"), __webpack_require__(/*! ./rc4 */ "./node_modules/crypto-js/rc4.js"), __webpack_require__(/*! ./rabbit */ "./node_modules/crypto-js/rabbit.js"), __webpack_require__(/*! ./rabbit-legacy */ "./node_modules/crypto-js/rabbit-legacy.js"), __webpack_require__(/*! ./blowfish */ "./node_modules/crypto-js/blowfish.js")); - } - else {} -}(this, function (CryptoJS) { - - return CryptoJS; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/lib-typedarrays.js": -/*!***************************************************!*\ - !*** ./node_modules/crypto-js/lib-typedarrays.js ***! - \***************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Check if typed arrays are supported - if (typeof ArrayBuffer != 'function') { - return; - } - - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - - // Reference original init - var superInit = WordArray.init; - - // Augment WordArray.init to handle typed arrays - var subInit = WordArray.init = function (typedArray) { - // Convert buffers to uint8 - if (typedArray instanceof ArrayBuffer) { - typedArray = new Uint8Array(typedArray); - } - - // Convert other array views to uint8 - if ( - typedArray instanceof Int8Array || - (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || - typedArray instanceof Int16Array || - typedArray instanceof Uint16Array || - typedArray instanceof Int32Array || - typedArray instanceof Uint32Array || - typedArray instanceof Float32Array || - typedArray instanceof Float64Array - ) { - typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); - } - - // Handle Uint8Array - if (typedArray instanceof Uint8Array) { - // Shortcut - var typedArrayByteLength = typedArray.byteLength; - - // Extract bytes - var words = []; - for (var i = 0; i < typedArrayByteLength; i++) { - words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); - } - - // Initialize this word array - superInit.call(this, words, typedArrayByteLength); - } else { - // Else call normal init - superInit.apply(this, arguments); - } - }; - - subInit.prototype = WordArray; - }()); - - - return CryptoJS.lib.WordArray; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/md5.js": -/*!***************************************!*\ - !*** ./node_modules/crypto-js/md5.js ***! - \***************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Constants table - var T = []; - - // Compute constants - (function () { - for (var i = 0; i < 64; i++) { - T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; - } - }()); - - /** - * MD5 hash algorithm. - */ - var MD5 = C_algo.MD5 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0x67452301, 0xefcdab89, - 0x98badcfe, 0x10325476 - ]); - }, - - _doProcessBlock: function (M, offset) { - // Swap endian - for (var i = 0; i < 16; i++) { - // Shortcuts - var offset_i = offset + i; - var M_offset_i = M[offset_i]; - - M[offset_i] = ( - (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | - (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) - ); - } - - // Shortcuts - var H = this._hash.words; - - var M_offset_0 = M[offset + 0]; - var M_offset_1 = M[offset + 1]; - var M_offset_2 = M[offset + 2]; - var M_offset_3 = M[offset + 3]; - var M_offset_4 = M[offset + 4]; - var M_offset_5 = M[offset + 5]; - var M_offset_6 = M[offset + 6]; - var M_offset_7 = M[offset + 7]; - var M_offset_8 = M[offset + 8]; - var M_offset_9 = M[offset + 9]; - var M_offset_10 = M[offset + 10]; - var M_offset_11 = M[offset + 11]; - var M_offset_12 = M[offset + 12]; - var M_offset_13 = M[offset + 13]; - var M_offset_14 = M[offset + 14]; - var M_offset_15 = M[offset + 15]; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - - // Computation - a = FF(a, b, c, d, M_offset_0, 7, T[0]); - d = FF(d, a, b, c, M_offset_1, 12, T[1]); - c = FF(c, d, a, b, M_offset_2, 17, T[2]); - b = FF(b, c, d, a, M_offset_3, 22, T[3]); - a = FF(a, b, c, d, M_offset_4, 7, T[4]); - d = FF(d, a, b, c, M_offset_5, 12, T[5]); - c = FF(c, d, a, b, M_offset_6, 17, T[6]); - b = FF(b, c, d, a, M_offset_7, 22, T[7]); - a = FF(a, b, c, d, M_offset_8, 7, T[8]); - d = FF(d, a, b, c, M_offset_9, 12, T[9]); - c = FF(c, d, a, b, M_offset_10, 17, T[10]); - b = FF(b, c, d, a, M_offset_11, 22, T[11]); - a = FF(a, b, c, d, M_offset_12, 7, T[12]); - d = FF(d, a, b, c, M_offset_13, 12, T[13]); - c = FF(c, d, a, b, M_offset_14, 17, T[14]); - b = FF(b, c, d, a, M_offset_15, 22, T[15]); - - a = GG(a, b, c, d, M_offset_1, 5, T[16]); - d = GG(d, a, b, c, M_offset_6, 9, T[17]); - c = GG(c, d, a, b, M_offset_11, 14, T[18]); - b = GG(b, c, d, a, M_offset_0, 20, T[19]); - a = GG(a, b, c, d, M_offset_5, 5, T[20]); - d = GG(d, a, b, c, M_offset_10, 9, T[21]); - c = GG(c, d, a, b, M_offset_15, 14, T[22]); - b = GG(b, c, d, a, M_offset_4, 20, T[23]); - a = GG(a, b, c, d, M_offset_9, 5, T[24]); - d = GG(d, a, b, c, M_offset_14, 9, T[25]); - c = GG(c, d, a, b, M_offset_3, 14, T[26]); - b = GG(b, c, d, a, M_offset_8, 20, T[27]); - a = GG(a, b, c, d, M_offset_13, 5, T[28]); - d = GG(d, a, b, c, M_offset_2, 9, T[29]); - c = GG(c, d, a, b, M_offset_7, 14, T[30]); - b = GG(b, c, d, a, M_offset_12, 20, T[31]); - - a = HH(a, b, c, d, M_offset_5, 4, T[32]); - d = HH(d, a, b, c, M_offset_8, 11, T[33]); - c = HH(c, d, a, b, M_offset_11, 16, T[34]); - b = HH(b, c, d, a, M_offset_14, 23, T[35]); - a = HH(a, b, c, d, M_offset_1, 4, T[36]); - d = HH(d, a, b, c, M_offset_4, 11, T[37]); - c = HH(c, d, a, b, M_offset_7, 16, T[38]); - b = HH(b, c, d, a, M_offset_10, 23, T[39]); - a = HH(a, b, c, d, M_offset_13, 4, T[40]); - d = HH(d, a, b, c, M_offset_0, 11, T[41]); - c = HH(c, d, a, b, M_offset_3, 16, T[42]); - b = HH(b, c, d, a, M_offset_6, 23, T[43]); - a = HH(a, b, c, d, M_offset_9, 4, T[44]); - d = HH(d, a, b, c, M_offset_12, 11, T[45]); - c = HH(c, d, a, b, M_offset_15, 16, T[46]); - b = HH(b, c, d, a, M_offset_2, 23, T[47]); - - a = II(a, b, c, d, M_offset_0, 6, T[48]); - d = II(d, a, b, c, M_offset_7, 10, T[49]); - c = II(c, d, a, b, M_offset_14, 15, T[50]); - b = II(b, c, d, a, M_offset_5, 21, T[51]); - a = II(a, b, c, d, M_offset_12, 6, T[52]); - d = II(d, a, b, c, M_offset_3, 10, T[53]); - c = II(c, d, a, b, M_offset_10, 15, T[54]); - b = II(b, c, d, a, M_offset_1, 21, T[55]); - a = II(a, b, c, d, M_offset_8, 6, T[56]); - d = II(d, a, b, c, M_offset_15, 10, T[57]); - c = II(c, d, a, b, M_offset_6, 15, T[58]); - b = II(b, c, d, a, M_offset_13, 21, T[59]); - a = II(a, b, c, d, M_offset_4, 6, T[60]); - d = II(d, a, b, c, M_offset_11, 10, T[61]); - c = II(c, d, a, b, M_offset_2, 15, T[62]); - b = II(b, c, d, a, M_offset_9, 21, T[63]); - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - - var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); - var nBitsTotalL = nBitsTotal; - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( - (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | - (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) - ); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( - (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | - (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) - ); - - data.sigBytes = (dataWords.length + 1) * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var hash = this._hash; - var H = hash.words; - - // Swap endian - for (var i = 0; i < 4; i++) { - // Shortcut - var H_i = H[i]; - - H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | - (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); - } - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - function FF(a, b, c, d, x, s, t) { - var n = a + ((b & c) | (~b & d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function GG(a, b, c, d, x, s, t) { - var n = a + ((b & d) | (c & ~d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function HH(a, b, c, d, x, s, t) { - var n = a + (b ^ c ^ d) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function II(a, b, c, d, x, s, t) { - var n = a + (c ^ (b | ~d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.MD5('message'); - * var hash = CryptoJS.MD5(wordArray); - */ - C.MD5 = Hasher._createHelper(MD5); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacMD5(message, key); - */ - C.HmacMD5 = Hasher._createHmacHelper(MD5); - }(Math)); - - - return CryptoJS.MD5; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-cfb.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-cfb.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Cipher Feedback block mode. - */ - CryptoJS.mode.CFB = (function () { - var CFB = CryptoJS.lib.BlockCipherMode.extend(); - - CFB.Encryptor = CFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - - // Remember this block to use with next block - this._prevBlock = words.slice(offset, offset + blockSize); - } - }); - - CFB.Decryptor = CFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // Remember this block to use with next block - var thisBlock = words.slice(offset, offset + blockSize); - - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - - // This block becomes the previous block - this._prevBlock = thisBlock; - } - }); - - function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { - var keystream; - - // Shortcut - var iv = this._iv; - - // Generate keystream - if (iv) { - keystream = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } else { - keystream = this._prevBlock; - } - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - - return CFB; - }()); - - - return CryptoJS.mode.CFB; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ctr-gladman.js": -/*!****************************************************!*\ - !*** ./node_modules/crypto-js/mode-ctr-gladman.js ***! - \****************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** @preserve - * Counter block mode compatible with Dr Brian Gladman fileenc.c - * derived from CryptoJS.mode.CTR - * Jan Hruby jhruby.web@gmail.com - */ - CryptoJS.mode.CTRGladman = (function () { - var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); - - function incWord(word) - { - if (((word >> 24) & 0xff) === 0xff) { //overflow - var b1 = (word >> 16)&0xff; - var b2 = (word >> 8)&0xff; - var b3 = word & 0xff; - - if (b1 === 0xff) // overflow b1 - { - b1 = 0; - if (b2 === 0xff) - { - b2 = 0; - if (b3 === 0xff) - { - b3 = 0; - } - else - { - ++b3; - } - } - else - { - ++b2; - } - } - else - { - ++b1; - } - - word = 0; - word += (b1 << 16); - word += (b2 << 8); - word += b3; - } - else - { - word += (0x01 << 24); - } - return word; - } - - function incCounter(counter) - { - if ((counter[0] = incWord(counter[0])) === 0) - { - // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 - counter[1] = incWord(counter[1]); - } - return counter; - } - - var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; - - // Generate keystream - if (iv) { - counter = this._counter = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - - incCounter(counter); - - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - CTRGladman.Decryptor = Encryptor; - - return CTRGladman; - }()); - - - - - return CryptoJS.mode.CTRGladman; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ctr.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-ctr.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Counter block mode. - */ - CryptoJS.mode.CTR = (function () { - var CTR = CryptoJS.lib.BlockCipherMode.extend(); - - var Encryptor = CTR.Encryptor = CTR.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; - - // Generate keystream - if (iv) { - counter = this._counter = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - - // Increment counter - counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - CTR.Decryptor = Encryptor; - - return CTR; - }()); - - - return CryptoJS.mode.CTR; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ecb.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-ecb.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Electronic Codebook block mode. - */ - CryptoJS.mode.ECB = (function () { - var ECB = CryptoJS.lib.BlockCipherMode.extend(); - - ECB.Encryptor = ECB.extend({ - processBlock: function (words, offset) { - this._cipher.encryptBlock(words, offset); - } - }); - - ECB.Decryptor = ECB.extend({ - processBlock: function (words, offset) { - this._cipher.decryptBlock(words, offset); - } - }); - - return ECB; - }()); - - - return CryptoJS.mode.ECB; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ofb.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-ofb.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Output Feedback block mode. - */ - CryptoJS.mode.OFB = (function () { - var OFB = CryptoJS.lib.BlockCipherMode.extend(); - - var Encryptor = OFB.Encryptor = OFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var keystream = this._keystream; - - // Generate keystream - if (iv) { - keystream = this._keystream = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - OFB.Decryptor = Encryptor; - - return OFB; - }()); - - - return CryptoJS.mode.OFB; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-ansix923.js": -/*!************************************************!*\ - !*** ./node_modules/crypto-js/pad-ansix923.js ***! - \************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * ANSI X.923 padding strategy. - */ - CryptoJS.pad.AnsiX923 = { - pad: function (data, blockSize) { - // Shortcuts - var dataSigBytes = data.sigBytes; - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; - - // Compute last byte position - var lastBytePos = dataSigBytes + nPaddingBytes - 1; - - // Pad - data.clamp(); - data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); - data.sigBytes += nPaddingBytes; - }, - - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - - return CryptoJS.pad.Ansix923; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-iso10126.js": -/*!************************************************!*\ - !*** ./node_modules/crypto-js/pad-iso10126.js ***! - \************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * ISO 10126 padding strategy. - */ - CryptoJS.pad.Iso10126 = { - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - - // Pad - data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). - concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); - }, - - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - - return CryptoJS.pad.Iso10126; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-iso97971.js": -/*!************************************************!*\ - !*** ./node_modules/crypto-js/pad-iso97971.js ***! - \************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * ISO/IEC 9797-1 Padding Method 2. - */ - CryptoJS.pad.Iso97971 = { - pad: function (data, blockSize) { - // Add 0x80 byte - data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); - - // Zero pad the rest - CryptoJS.pad.ZeroPadding.pad(data, blockSize); - }, - - unpad: function (data) { - // Remove zero padding - CryptoJS.pad.ZeroPadding.unpad(data); - - // Remove one more byte -- the 0x80 byte - data.sigBytes--; - } - }; - - - return CryptoJS.pad.Iso97971; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-nopadding.js": -/*!*************************************************!*\ - !*** ./node_modules/crypto-js/pad-nopadding.js ***! - \*************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * A noop padding strategy. - */ - CryptoJS.pad.NoPadding = { - pad: function () { - }, - - unpad: function () { - } - }; - - - return CryptoJS.pad.NoPadding; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-zeropadding.js": -/*!***************************************************!*\ - !*** ./node_modules/crypto-js/pad-zeropadding.js ***! - \***************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Zero padding strategy. - */ - CryptoJS.pad.ZeroPadding = { - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Pad - data.clamp(); - data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); - }, - - unpad: function (data) { - // Shortcut - var dataWords = data.words; - - // Unpad - var i = data.sigBytes - 1; - for (var i = data.sigBytes - 1; i >= 0; i--) { - if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { - data.sigBytes = i + 1; - break; - } - } - } - }; - - - return CryptoJS.pad.ZeroPadding; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pbkdf2.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/pbkdf2.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA256 = C_algo.SHA256; - var HMAC = C_algo.HMAC; - - /** - * Password-Based Key Derivation Function 2 algorithm. - */ - var PBKDF2 = C_algo.PBKDF2 = Base.extend({ - /** - * Configuration options. - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hasher to use. Default: SHA256 - * @property {number} iterations The number of iterations to perform. Default: 250000 - */ - cfg: Base.extend({ - keySize: 128/32, - hasher: SHA256, - iterations: 250000 - }), - - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * var kdf = CryptoJS.algo.PBKDF2.create(); - * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); - * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); - */ - init: function (cfg) { - this.cfg = this.cfg.extend(cfg); - }, - - /** - * Computes the Password-Based Key Derivation Function 2. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * var key = kdf.compute(password, salt); - */ - compute: function (password, salt) { - // Shortcut - var cfg = this.cfg; - - // Init HMAC - var hmac = HMAC.create(cfg.hasher, password); - - // Initial values - var derivedKey = WordArray.create(); - var blockIndex = WordArray.create([0x00000001]); - - // Shortcuts - var derivedKeyWords = derivedKey.words; - var blockIndexWords = blockIndex.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; - - // Generate key - while (derivedKeyWords.length < keySize) { - var block = hmac.update(salt).finalize(blockIndex); - hmac.reset(); - - // Shortcuts - var blockWords = block.words; - var blockWordsLength = blockWords.length; - - // Iterations - var intermediate = block; - for (var i = 1; i < iterations; i++) { - intermediate = hmac.finalize(intermediate); - hmac.reset(); - - // Shortcut - var intermediateWords = intermediate.words; - - // XOR intermediate with block - for (var j = 0; j < blockWordsLength; j++) { - blockWords[j] ^= intermediateWords[j]; - } - } - - derivedKey.concat(block); - blockIndexWords[0]++; - } - derivedKey.sigBytes = keySize * 4; - - return derivedKey; - } - }); - - /** - * Computes the Password-Based Key Derivation Function 2. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * @param {Object} cfg (Optional) The configuration options to use for this computation. - * - * @return {WordArray} The derived key. - * - * @static - * - * @example - * - * var key = CryptoJS.PBKDF2(password, salt); - * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); - * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); - */ - C.PBKDF2 = function (password, salt, cfg) { - return PBKDF2.create(cfg).compute(password, salt); - }; - }()); - - - return CryptoJS.PBKDF2; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/rabbit-legacy.js": -/*!*************************************************!*\ - !*** ./node_modules/crypto-js/rabbit-legacy.js ***! - \*************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - // Reusable objects - var S = []; - var C_ = []; - var G = []; - - /** - * Rabbit stream cipher algorithm. - * - * This is a legacy version that neglected to convert the key to little-endian. - * This error doesn't affect the cipher's security, - * but it does affect its compatibility with other implementations. - */ - var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var K = this._key.words; - var iv = this.cfg.iv; - - // Generate initial state values - var X = this._X = [ - K[0], (K[3] << 16) | (K[2] >>> 16), - K[1], (K[0] << 16) | (K[3] >>> 16), - K[2], (K[1] << 16) | (K[0] >>> 16), - K[3], (K[2] << 16) | (K[1] >>> 16) - ]; - - // Generate initial counter values - var C = this._C = [ - (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), - (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), - (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), - (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) - ]; - - // Carry bit - this._b = 0; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - - // Modify the counters - for (var i = 0; i < 8; i++) { - C[i] ^= X[(i + 4) & 7]; - } - - // IV setup - if (iv) { - // Shortcuts - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; - - // Generate four subvectors - var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); - var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); - var i1 = (i0 >>> 16) | (i2 & 0xffff0000); - var i3 = (i2 << 16) | (i0 & 0x0000ffff); - - // Modify counter values - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - } - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var X = this._X; - - // Iterate the system - nextState.call(this); - - // Generate four keystream words - S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); - S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); - S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); - S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); - - for (var i = 0; i < 4; i++) { - // Swap endian - S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | - (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); - - // Encrypt - M[offset + i] ^= S[i]; - } - }, - - blockSize: 128/32, - - ivSize: 64/32 - }); - - function nextState() { - // Shortcuts - var X = this._X; - var C = this._C; - - // Save old counter values - for (var i = 0; i < 8; i++) { - C_[i] = C[i]; - } - - // Calculate new counter values - C[0] = (C[0] + 0x4d34d34d + this._b) | 0; - C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; - C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; - C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; - C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; - C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; - C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; - C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; - this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; - - // Calculate the g-values - for (var i = 0; i < 8; i++) { - var gx = X[i] + C[i]; - - // Construct high and low argument for squaring - var ga = gx & 0xffff; - var gb = gx >>> 16; - - // Calculate high and low result of squaring - var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; - var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); - - // High XOR low - G[i] = gh ^ gl; - } - - // Calculate new state values - X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; - X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; - X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; - X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; - X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; - X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; - X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; - X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); - */ - C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); - }()); - - - return CryptoJS.RabbitLegacy; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/rabbit.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/rabbit.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - // Reusable objects - var S = []; - var C_ = []; - var G = []; - - /** - * Rabbit stream cipher algorithm - */ - var Rabbit = C_algo.Rabbit = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var K = this._key.words; - var iv = this.cfg.iv; - - // Swap endian - for (var i = 0; i < 4; i++) { - K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | - (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); - } - - // Generate initial state values - var X = this._X = [ - K[0], (K[3] << 16) | (K[2] >>> 16), - K[1], (K[0] << 16) | (K[3] >>> 16), - K[2], (K[1] << 16) | (K[0] >>> 16), - K[3], (K[2] << 16) | (K[1] >>> 16) - ]; - - // Generate initial counter values - var C = this._C = [ - (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), - (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), - (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), - (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) - ]; - - // Carry bit - this._b = 0; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - - // Modify the counters - for (var i = 0; i < 8; i++) { - C[i] ^= X[(i + 4) & 7]; - } - - // IV setup - if (iv) { - // Shortcuts - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; - - // Generate four subvectors - var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); - var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); - var i1 = (i0 >>> 16) | (i2 & 0xffff0000); - var i3 = (i2 << 16) | (i0 & 0x0000ffff); - - // Modify counter values - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - } - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var X = this._X; - - // Iterate the system - nextState.call(this); - - // Generate four keystream words - S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); - S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); - S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); - S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); - - for (var i = 0; i < 4; i++) { - // Swap endian - S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | - (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); - - // Encrypt - M[offset + i] ^= S[i]; - } - }, - - blockSize: 128/32, - - ivSize: 64/32 - }); - - function nextState() { - // Shortcuts - var X = this._X; - var C = this._C; - - // Save old counter values - for (var i = 0; i < 8; i++) { - C_[i] = C[i]; - } - - // Calculate new counter values - C[0] = (C[0] + 0x4d34d34d + this._b) | 0; - C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; - C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; - C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; - C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; - C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; - C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; - C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; - this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; - - // Calculate the g-values - for (var i = 0; i < 8; i++) { - var gx = X[i] + C[i]; - - // Construct high and low argument for squaring - var ga = gx & 0xffff; - var gb = gx >>> 16; - - // Calculate high and low result of squaring - var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; - var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); - - // High XOR low - G[i] = gh ^ gl; - } - - // Calculate new state values - X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; - X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; - X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; - X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; - X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; - X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; - X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; - X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); - * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); - */ - C.Rabbit = StreamCipher._createHelper(Rabbit); - }()); - - - return CryptoJS.Rabbit; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/rc4.js": -/*!***************************************!*\ - !*** ./node_modules/crypto-js/rc4.js ***! - \***************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - /** - * RC4 stream cipher algorithm. - */ - var RC4 = C_algo.RC4 = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - var keySigBytes = key.sigBytes; - - // Init sbox - var S = this._S = []; - for (var i = 0; i < 256; i++) { - S[i] = i; - } - - // Key setup - for (var i = 0, j = 0; i < 256; i++) { - var keyByteIndex = i % keySigBytes; - var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; - - j = (j + S[i] + keyByte) % 256; - - // Swap - var t = S[i]; - S[i] = S[j]; - S[j] = t; - } - - // Counters - this._i = this._j = 0; - }, - - _doProcessBlock: function (M, offset) { - M[offset] ^= generateKeystreamWord.call(this); - }, - - keySize: 256/32, - - ivSize: 0 - }); - - function generateKeystreamWord() { - // Shortcuts - var S = this._S; - var i = this._i; - var j = this._j; - - // Generate keystream word - var keystreamWord = 0; - for (var n = 0; n < 4; n++) { - i = (i + 1) % 256; - j = (j + S[i]) % 256; - - // Swap - var t = S[i]; - S[i] = S[j]; - S[j] = t; - - keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); - } - - // Update counters - this._i = i; - this._j = j; - - return keystreamWord; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); - */ - C.RC4 = StreamCipher._createHelper(RC4); - - /** - * Modified RC4 stream cipher algorithm. - */ - var RC4Drop = C_algo.RC4Drop = RC4.extend({ - /** - * Configuration options. - * - * @property {number} drop The number of keystream words to drop. Default 192 - */ - cfg: RC4.cfg.extend({ - drop: 192 - }), - - _doReset: function () { - RC4._doReset.call(this); - - // Drop - for (var i = this.cfg.drop; i > 0; i--) { - generateKeystreamWord.call(this); - } - } - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); - */ - C.RC4Drop = StreamCipher._createHelper(RC4Drop); - }()); - - - return CryptoJS.RC4; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/ripemd160.js": -/*!*********************************************!*\ - !*** ./node_modules/crypto-js/ripemd160.js ***! - \*********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** @preserve - (c) 2012 by Cédric Mesnil. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Constants table - var _zl = WordArray.create([ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, - 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, - 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, - 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); - var _zr = WordArray.create([ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, - 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, - 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, - 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, - 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); - var _sl = WordArray.create([ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, - 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, - 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, - 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, - 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); - var _sr = WordArray.create([ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, - 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, - 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, - 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, - 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); - - var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); - var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); - - /** - * RIPEMD160 hash algorithm. - */ - var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ - _doReset: function () { - this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); - }, - - _doProcessBlock: function (M, offset) { - - // Swap endian - for (var i = 0; i < 16; i++) { - // Shortcuts - var offset_i = offset + i; - var M_offset_i = M[offset_i]; - - // Swap - M[offset_i] = ( - (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | - (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) - ); - } - // Shortcut - var H = this._hash.words; - var hl = _hl.words; - var hr = _hr.words; - var zl = _zl.words; - var zr = _zr.words; - var sl = _sl.words; - var sr = _sr.words; - - // Working variables - var al, bl, cl, dl, el; - var ar, br, cr, dr, er; - - ar = al = H[0]; - br = bl = H[1]; - cr = cl = H[2]; - dr = dl = H[3]; - er = el = H[4]; - // Computation - var t; - for (var i = 0; i < 80; i += 1) { - t = (al + M[offset+zl[i]])|0; - if (i<16){ - t += f1(bl,cl,dl) + hl[0]; - } else if (i<32) { - t += f2(bl,cl,dl) + hl[1]; - } else if (i<48) { - t += f3(bl,cl,dl) + hl[2]; - } else if (i<64) { - t += f4(bl,cl,dl) + hl[3]; - } else {// if (i<80) { - t += f5(bl,cl,dl) + hl[4]; - } - t = t|0; - t = rotl(t,sl[i]); - t = (t+el)|0; - al = el; - el = dl; - dl = rotl(cl, 10); - cl = bl; - bl = t; - - t = (ar + M[offset+zr[i]])|0; - if (i<16){ - t += f5(br,cr,dr) + hr[0]; - } else if (i<32) { - t += f4(br,cr,dr) + hr[1]; - } else if (i<48) { - t += f3(br,cr,dr) + hr[2]; - } else if (i<64) { - t += f2(br,cr,dr) + hr[3]; - } else {// if (i<80) { - t += f1(br,cr,dr) + hr[4]; - } - t = t|0; - t = rotl(t,sr[i]) ; - t = (t+er)|0; - ar = er; - er = dr; - dr = rotl(cr, 10); - cr = br; - br = t; - } - // Intermediate hash value - t = (H[1] + cl + dr)|0; - H[1] = (H[2] + dl + er)|0; - H[2] = (H[3] + el + ar)|0; - H[3] = (H[4] + al + br)|0; - H[4] = (H[0] + bl + cr)|0; - H[0] = t; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( - (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | - (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) - ); - data.sigBytes = (dataWords.length + 1) * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var hash = this._hash; - var H = hash.words; - - // Swap endian - for (var i = 0; i < 5; i++) { - // Shortcut - var H_i = H[i]; - - // Swap - H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | - (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); - } - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - - function f1(x, y, z) { - return ((x) ^ (y) ^ (z)); - - } - - function f2(x, y, z) { - return (((x)&(y)) | ((~x)&(z))); - } - - function f3(x, y, z) { - return (((x) | (~(y))) ^ (z)); - } - - function f4(x, y, z) { - return (((x) & (z)) | ((y)&(~(z)))); - } - - function f5(x, y, z) { - return ((x) ^ ((y) |(~(z)))); - - } - - function rotl(x,n) { - return (x<>>(32-n)); - } - - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.RIPEMD160('message'); - * var hash = CryptoJS.RIPEMD160(wordArray); - */ - C.RIPEMD160 = Hasher._createHelper(RIPEMD160); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacRIPEMD160(message, key); - */ - C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); - }(Math)); - - - return CryptoJS.RIPEMD160; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha1.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/sha1.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Reusable object - var W = []; - - /** - * SHA-1 hash algorithm. - */ - var SHA1 = C_algo.SHA1 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0x67452301, 0xefcdab89, - 0x98badcfe, 0x10325476, - 0xc3d2e1f0 - ]); - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var H = this._hash.words; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - - // Computation - for (var i = 0; i < 80; i++) { - if (i < 16) { - W[i] = M[offset + i] | 0; - } else { - var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; - W[i] = (n << 1) | (n >>> 31); - } - - var t = ((a << 5) | (a >>> 27)) + e + W[i]; - if (i < 20) { - t += ((b & c) | (~b & d)) + 0x5a827999; - } else if (i < 40) { - t += (b ^ c ^ d) + 0x6ed9eba1; - } else if (i < 60) { - t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; - } else /* if (i < 80) */ { - t += (b ^ c ^ d) - 0x359d3e2a; - } - - e = d; - d = c; - c = (b << 30) | (b >>> 2); - b = a; - a = t; - } - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - H[4] = (H[4] + e) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Return final computed hash - return this._hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA1('message'); - * var hash = CryptoJS.SHA1(wordArray); - */ - C.SHA1 = Hasher._createHelper(SHA1); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA1(message, key); - */ - C.HmacSHA1 = Hasher._createHmacHelper(SHA1); - }()); - - - return CryptoJS.SHA1; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha224.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha224.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA256 = C_algo.SHA256; - - /** - * SHA-224 hash algorithm. - */ - var SHA224 = C_algo.SHA224 = SHA256.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, - 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 - ]); - }, - - _doFinalize: function () { - var hash = SHA256._doFinalize.call(this); - - hash.sigBytes -= 4; - - return hash; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA224('message'); - * var hash = CryptoJS.SHA224(wordArray); - */ - C.SHA224 = SHA256._createHelper(SHA224); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA224(message, key); - */ - C.HmacSHA224 = SHA256._createHmacHelper(SHA224); - }()); - - - return CryptoJS.SHA224; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha256.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha256.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Initialization and round constants tables - var H = []; - var K = []; - - // Compute constants - (function () { - function isPrime(n) { - var sqrtN = Math.sqrt(n); - for (var factor = 2; factor <= sqrtN; factor++) { - if (!(n % factor)) { - return false; - } - } - - return true; - } - - function getFractionalBits(n) { - return ((n - (n | 0)) * 0x100000000) | 0; - } - - var n = 2; - var nPrime = 0; - while (nPrime < 64) { - if (isPrime(n)) { - if (nPrime < 8) { - H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); - } - K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); - - nPrime++; - } - - n++; - } - }()); - - // Reusable object - var W = []; - - /** - * SHA-256 hash algorithm. - */ - var SHA256 = C_algo.SHA256 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init(H.slice(0)); - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var H = this._hash.words; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - var f = H[5]; - var g = H[6]; - var h = H[7]; - - // Computation - for (var i = 0; i < 64; i++) { - if (i < 16) { - W[i] = M[offset + i] | 0; - } else { - var gamma0x = W[i - 15]; - var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ - ((gamma0x << 14) | (gamma0x >>> 18)) ^ - (gamma0x >>> 3); - - var gamma1x = W[i - 2]; - var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ - ((gamma1x << 13) | (gamma1x >>> 19)) ^ - (gamma1x >>> 10); - - W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; - } - - var ch = (e & f) ^ (~e & g); - var maj = (a & b) ^ (a & c) ^ (b & c); - - var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); - var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); - - var t1 = h + sigma1 + ch + K[i] + W[i]; - var t2 = sigma0 + maj; - - h = g; - g = f; - f = e; - e = (d + t1) | 0; - d = c; - c = b; - b = a; - a = (t1 + t2) | 0; - } - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - H[4] = (H[4] + e) | 0; - H[5] = (H[5] + f) | 0; - H[6] = (H[6] + g) | 0; - H[7] = (H[7] + h) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Return final computed hash - return this._hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA256('message'); - * var hash = CryptoJS.SHA256(wordArray); - */ - C.SHA256 = Hasher._createHelper(SHA256); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA256(message, key); - */ - C.HmacSHA256 = Hasher._createHmacHelper(SHA256); - }(Math)); - - - return CryptoJS.SHA256; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha3.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/sha3.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var C_algo = C.algo; - - // Constants tables - var RHO_OFFSETS = []; - var PI_INDEXES = []; - var ROUND_CONSTANTS = []; - - // Compute Constants - (function () { - // Compute rho offset constants - var x = 1, y = 0; - for (var t = 0; t < 24; t++) { - RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; - - var newX = y % 5; - var newY = (2 * x + 3 * y) % 5; - x = newX; - y = newY; - } - - // Compute pi index constants - for (var x = 0; x < 5; x++) { - for (var y = 0; y < 5; y++) { - PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; - } - } - - // Compute round constants - var LFSR = 0x01; - for (var i = 0; i < 24; i++) { - var roundConstantMsw = 0; - var roundConstantLsw = 0; - - for (var j = 0; j < 7; j++) { - if (LFSR & 0x01) { - var bitPosition = (1 << j) - 1; - if (bitPosition < 32) { - roundConstantLsw ^= 1 << bitPosition; - } else /* if (bitPosition >= 32) */ { - roundConstantMsw ^= 1 << (bitPosition - 32); - } - } - - // Compute next LFSR - if (LFSR & 0x80) { - // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 - LFSR = (LFSR << 1) ^ 0x71; - } else { - LFSR <<= 1; - } - } - - ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); - } - }()); - - // Reusable objects for temporary values - var T = []; - (function () { - for (var i = 0; i < 25; i++) { - T[i] = X64Word.create(); - } - }()); - - /** - * SHA-3 hash algorithm. - */ - var SHA3 = C_algo.SHA3 = Hasher.extend({ - /** - * Configuration options. - * - * @property {number} outputLength - * The desired number of bits in the output hash. - * Only values permitted are: 224, 256, 384, 512. - * Default: 512 - */ - cfg: Hasher.cfg.extend({ - outputLength: 512 - }), - - _doReset: function () { - var state = this._state = [] - for (var i = 0; i < 25; i++) { - state[i] = new X64Word.init(); - } - - this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; - }, - - _doProcessBlock: function (M, offset) { - // Shortcuts - var state = this._state; - var nBlockSizeLanes = this.blockSize / 2; - - // Absorb - for (var i = 0; i < nBlockSizeLanes; i++) { - // Shortcuts - var M2i = M[offset + 2 * i]; - var M2i1 = M[offset + 2 * i + 1]; - - // Swap endian - M2i = ( - (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | - (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) - ); - M2i1 = ( - (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | - (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) - ); - - // Absorb message into state - var lane = state[i]; - lane.high ^= M2i1; - lane.low ^= M2i; - } - - // Rounds - for (var round = 0; round < 24; round++) { - // Theta - for (var x = 0; x < 5; x++) { - // Mix column lanes - var tMsw = 0, tLsw = 0; - for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - tMsw ^= lane.high; - tLsw ^= lane.low; - } - - // Temporary values - var Tx = T[x]; - Tx.high = tMsw; - Tx.low = tLsw; - } - for (var x = 0; x < 5; x++) { - // Shortcuts - var Tx4 = T[(x + 4) % 5]; - var Tx1 = T[(x + 1) % 5]; - var Tx1Msw = Tx1.high; - var Tx1Lsw = Tx1.low; - - // Mix surrounding columns - var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); - var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); - for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - lane.high ^= tMsw; - lane.low ^= tLsw; - } - } - - // Rho Pi - for (var laneIndex = 1; laneIndex < 25; laneIndex++) { - var tMsw; - var tLsw; - - // Shortcuts - var lane = state[laneIndex]; - var laneMsw = lane.high; - var laneLsw = lane.low; - var rhoOffset = RHO_OFFSETS[laneIndex]; - - // Rotate lanes - if (rhoOffset < 32) { - tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); - tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); - } else /* if (rhoOffset >= 32) */ { - tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); - tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); - } - - // Transpose lanes - var TPiLane = T[PI_INDEXES[laneIndex]]; - TPiLane.high = tMsw; - TPiLane.low = tLsw; - } - - // Rho pi at x = y = 0 - var T0 = T[0]; - var state0 = state[0]; - T0.high = state0.high; - T0.low = state0.low; - - // Chi - for (var x = 0; x < 5; x++) { - for (var y = 0; y < 5; y++) { - // Shortcuts - var laneIndex = x + 5 * y; - var lane = state[laneIndex]; - var TLane = T[laneIndex]; - var Tx1Lane = T[((x + 1) % 5) + 5 * y]; - var Tx2Lane = T[((x + 2) % 5) + 5 * y]; - - // Mix rows - lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); - lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); - } - } - - // Iota - var lane = state[0]; - var roundConstant = ROUND_CONSTANTS[round]; - lane.high ^= roundConstant.high; - lane.low ^= roundConstant.low; - } - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - var blockSizeBits = this.blockSize * 32; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); - dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var state = this._state; - var outputLengthBytes = this.cfg.outputLength / 8; - var outputLengthLanes = outputLengthBytes / 8; - - // Squeeze - var hashWords = []; - for (var i = 0; i < outputLengthLanes; i++) { - // Shortcuts - var lane = state[i]; - var laneMsw = lane.high; - var laneLsw = lane.low; - - // Swap endian - laneMsw = ( - (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | - (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) - ); - laneLsw = ( - (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | - (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) - ); - - // Squeeze state to retrieve hash - hashWords.push(laneLsw); - hashWords.push(laneMsw); - } - - // Return final computed hash - return new WordArray.init(hashWords, outputLengthBytes); - }, - - clone: function () { - var clone = Hasher.clone.call(this); - - var state = clone._state = this._state.slice(0); - for (var i = 0; i < 25; i++) { - state[i] = state[i].clone(); - } - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA3('message'); - * var hash = CryptoJS.SHA3(wordArray); - */ - C.SHA3 = Hasher._createHelper(SHA3); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA3(message, key); - */ - C.HmacSHA3 = Hasher._createHmacHelper(SHA3); - }(Math)); - - - return CryptoJS.SHA3; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha384.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha384.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js"), __webpack_require__(/*! ./sha512 */ "./node_modules/crypto-js/sha512.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; - var SHA512 = C_algo.SHA512; - - /** - * SHA-384 hash algorithm. - */ - var SHA384 = C_algo.SHA384 = SHA512.extend({ - _doReset: function () { - this._hash = new X64WordArray.init([ - new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), - new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), - new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), - new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) - ]); - }, - - _doFinalize: function () { - var hash = SHA512._doFinalize.call(this); - - hash.sigBytes -= 16; - - return hash; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA384('message'); - * var hash = CryptoJS.SHA384(wordArray); - */ - C.SHA384 = SHA512._createHelper(SHA384); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA384(message, key); - */ - C.HmacSHA384 = SHA512._createHmacHelper(SHA384); - }()); - - - return CryptoJS.SHA384; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha512.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha512.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; - - function X64Word_create() { - return X64Word.create.apply(X64Word, arguments); - } - - // Constants - var K = [ - X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), - X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), - X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), - X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), - X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), - X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), - X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), - X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), - X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), - X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), - X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), - X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), - X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), - X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), - X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), - X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), - X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), - X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), - X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), - X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), - X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), - X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), - X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), - X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), - X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), - X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), - X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), - X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), - X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), - X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), - X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), - X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), - X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), - X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), - X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), - X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), - X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), - X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), - X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), - X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) - ]; - - // Reusable objects - var W = []; - (function () { - for (var i = 0; i < 80; i++) { - W[i] = X64Word_create(); - } - }()); - - /** - * SHA-512 hash algorithm. - */ - var SHA512 = C_algo.SHA512 = Hasher.extend({ - _doReset: function () { - this._hash = new X64WordArray.init([ - new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), - new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), - new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), - new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) - ]); - }, - - _doProcessBlock: function (M, offset) { - // Shortcuts - var H = this._hash.words; - - var H0 = H[0]; - var H1 = H[1]; - var H2 = H[2]; - var H3 = H[3]; - var H4 = H[4]; - var H5 = H[5]; - var H6 = H[6]; - var H7 = H[7]; - - var H0h = H0.high; - var H0l = H0.low; - var H1h = H1.high; - var H1l = H1.low; - var H2h = H2.high; - var H2l = H2.low; - var H3h = H3.high; - var H3l = H3.low; - var H4h = H4.high; - var H4l = H4.low; - var H5h = H5.high; - var H5l = H5.low; - var H6h = H6.high; - var H6l = H6.low; - var H7h = H7.high; - var H7l = H7.low; - - // Working variables - var ah = H0h; - var al = H0l; - var bh = H1h; - var bl = H1l; - var ch = H2h; - var cl = H2l; - var dh = H3h; - var dl = H3l; - var eh = H4h; - var el = H4l; - var fh = H5h; - var fl = H5l; - var gh = H6h; - var gl = H6l; - var hh = H7h; - var hl = H7l; - - // Rounds - for (var i = 0; i < 80; i++) { - var Wil; - var Wih; - - // Shortcut - var Wi = W[i]; - - // Extend message - if (i < 16) { - Wih = Wi.high = M[offset + i * 2] | 0; - Wil = Wi.low = M[offset + i * 2 + 1] | 0; - } else { - // Gamma0 - var gamma0x = W[i - 15]; - var gamma0xh = gamma0x.high; - var gamma0xl = gamma0x.low; - var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); - var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); - - // Gamma1 - var gamma1x = W[i - 2]; - var gamma1xh = gamma1x.high; - var gamma1xl = gamma1x.low; - var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); - var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); - - // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] - var Wi7 = W[i - 7]; - var Wi7h = Wi7.high; - var Wi7l = Wi7.low; - - var Wi16 = W[i - 16]; - var Wi16h = Wi16.high; - var Wi16l = Wi16.low; - - Wil = gamma0l + Wi7l; - Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); - Wil = Wil + gamma1l; - Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); - Wil = Wil + Wi16l; - Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); - - Wi.high = Wih; - Wi.low = Wil; - } - - var chh = (eh & fh) ^ (~eh & gh); - var chl = (el & fl) ^ (~el & gl); - var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); - var majl = (al & bl) ^ (al & cl) ^ (bl & cl); - - var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); - var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); - var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); - var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); - - // t1 = h + sigma1 + ch + K[i] + W[i] - var Ki = K[i]; - var Kih = Ki.high; - var Kil = Ki.low; - - var t1l = hl + sigma1l; - var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); - var t1l = t1l + chl; - var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); - var t1l = t1l + Kil; - var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); - var t1l = t1l + Wil; - var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); - - // t2 = sigma0 + maj - var t2l = sigma0l + majl; - var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); - - // Update working variables - hh = gh; - hl = gl; - gh = fh; - gl = fl; - fh = eh; - fl = el; - el = (dl + t1l) | 0; - eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; - dh = ch; - dl = cl; - ch = bh; - cl = bl; - bh = ah; - bl = al; - al = (t1l + t2l) | 0; - ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; - } - - // Intermediate hash value - H0l = H0.low = (H0l + al); - H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); - H1l = H1.low = (H1l + bl); - H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); - H2l = H2.low = (H2l + cl); - H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); - H3l = H3.low = (H3l + dl); - H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); - H4l = H4.low = (H4l + el); - H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); - H5l = H5.low = (H5l + fl); - H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); - H6l = H6.low = (H6l + gl); - H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); - H7l = H7.low = (H7l + hl); - H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Convert hash to 32-bit word array before returning - var hash = this._hash.toX32(); - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - }, - - blockSize: 1024/32 - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA512('message'); - * var hash = CryptoJS.SHA512(wordArray); - */ - C.SHA512 = Hasher._createHelper(SHA512); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA512(message, key); - */ - C.HmacSHA512 = Hasher._createHmacHelper(SHA512); - }()); - - - return CryptoJS.SHA512; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/tripledes.js": -/*!*********************************************!*\ - !*** ./node_modules/crypto-js/tripledes.js ***! - \*********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - // Permuted Choice 1 constants - var PC1 = [ - 57, 49, 41, 33, 25, 17, 9, 1, - 58, 50, 42, 34, 26, 18, 10, 2, - 59, 51, 43, 35, 27, 19, 11, 3, - 60, 52, 44, 36, 63, 55, 47, 39, - 31, 23, 15, 7, 62, 54, 46, 38, - 30, 22, 14, 6, 61, 53, 45, 37, - 29, 21, 13, 5, 28, 20, 12, 4 - ]; - - // Permuted Choice 2 constants - var PC2 = [ - 14, 17, 11, 24, 1, 5, - 3, 28, 15, 6, 21, 10, - 23, 19, 12, 4, 26, 8, - 16, 7, 27, 20, 13, 2, - 41, 52, 31, 37, 47, 55, - 30, 40, 51, 45, 33, 48, - 44, 49, 39, 56, 34, 53, - 46, 42, 50, 36, 29, 32 - ]; - - // Cumulative bit shift constants - var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; - - // SBOXes and round permutation constants - var SBOX_P = [ - { - 0x0: 0x808200, - 0x10000000: 0x8000, - 0x20000000: 0x808002, - 0x30000000: 0x2, - 0x40000000: 0x200, - 0x50000000: 0x808202, - 0x60000000: 0x800202, - 0x70000000: 0x800000, - 0x80000000: 0x202, - 0x90000000: 0x800200, - 0xa0000000: 0x8200, - 0xb0000000: 0x808000, - 0xc0000000: 0x8002, - 0xd0000000: 0x800002, - 0xe0000000: 0x0, - 0xf0000000: 0x8202, - 0x8000000: 0x0, - 0x18000000: 0x808202, - 0x28000000: 0x8202, - 0x38000000: 0x8000, - 0x48000000: 0x808200, - 0x58000000: 0x200, - 0x68000000: 0x808002, - 0x78000000: 0x2, - 0x88000000: 0x800200, - 0x98000000: 0x8200, - 0xa8000000: 0x808000, - 0xb8000000: 0x800202, - 0xc8000000: 0x800002, - 0xd8000000: 0x8002, - 0xe8000000: 0x202, - 0xf8000000: 0x800000, - 0x1: 0x8000, - 0x10000001: 0x2, - 0x20000001: 0x808200, - 0x30000001: 0x800000, - 0x40000001: 0x808002, - 0x50000001: 0x8200, - 0x60000001: 0x200, - 0x70000001: 0x800202, - 0x80000001: 0x808202, - 0x90000001: 0x808000, - 0xa0000001: 0x800002, - 0xb0000001: 0x8202, - 0xc0000001: 0x202, - 0xd0000001: 0x800200, - 0xe0000001: 0x8002, - 0xf0000001: 0x0, - 0x8000001: 0x808202, - 0x18000001: 0x808000, - 0x28000001: 0x800000, - 0x38000001: 0x200, - 0x48000001: 0x8000, - 0x58000001: 0x800002, - 0x68000001: 0x2, - 0x78000001: 0x8202, - 0x88000001: 0x8002, - 0x98000001: 0x800202, - 0xa8000001: 0x202, - 0xb8000001: 0x808200, - 0xc8000001: 0x800200, - 0xd8000001: 0x0, - 0xe8000001: 0x8200, - 0xf8000001: 0x808002 - }, - { - 0x0: 0x40084010, - 0x1000000: 0x4000, - 0x2000000: 0x80000, - 0x3000000: 0x40080010, - 0x4000000: 0x40000010, - 0x5000000: 0x40084000, - 0x6000000: 0x40004000, - 0x7000000: 0x10, - 0x8000000: 0x84000, - 0x9000000: 0x40004010, - 0xa000000: 0x40000000, - 0xb000000: 0x84010, - 0xc000000: 0x80010, - 0xd000000: 0x0, - 0xe000000: 0x4010, - 0xf000000: 0x40080000, - 0x800000: 0x40004000, - 0x1800000: 0x84010, - 0x2800000: 0x10, - 0x3800000: 0x40004010, - 0x4800000: 0x40084010, - 0x5800000: 0x40000000, - 0x6800000: 0x80000, - 0x7800000: 0x40080010, - 0x8800000: 0x80010, - 0x9800000: 0x0, - 0xa800000: 0x4000, - 0xb800000: 0x40080000, - 0xc800000: 0x40000010, - 0xd800000: 0x84000, - 0xe800000: 0x40084000, - 0xf800000: 0x4010, - 0x10000000: 0x0, - 0x11000000: 0x40080010, - 0x12000000: 0x40004010, - 0x13000000: 0x40084000, - 0x14000000: 0x40080000, - 0x15000000: 0x10, - 0x16000000: 0x84010, - 0x17000000: 0x4000, - 0x18000000: 0x4010, - 0x19000000: 0x80000, - 0x1a000000: 0x80010, - 0x1b000000: 0x40000010, - 0x1c000000: 0x84000, - 0x1d000000: 0x40004000, - 0x1e000000: 0x40000000, - 0x1f000000: 0x40084010, - 0x10800000: 0x84010, - 0x11800000: 0x80000, - 0x12800000: 0x40080000, - 0x13800000: 0x4000, - 0x14800000: 0x40004000, - 0x15800000: 0x40084010, - 0x16800000: 0x10, - 0x17800000: 0x40000000, - 0x18800000: 0x40084000, - 0x19800000: 0x40000010, - 0x1a800000: 0x40004010, - 0x1b800000: 0x80010, - 0x1c800000: 0x0, - 0x1d800000: 0x4010, - 0x1e800000: 0x40080010, - 0x1f800000: 0x84000 - }, - { - 0x0: 0x104, - 0x100000: 0x0, - 0x200000: 0x4000100, - 0x300000: 0x10104, - 0x400000: 0x10004, - 0x500000: 0x4000004, - 0x600000: 0x4010104, - 0x700000: 0x4010000, - 0x800000: 0x4000000, - 0x900000: 0x4010100, - 0xa00000: 0x10100, - 0xb00000: 0x4010004, - 0xc00000: 0x4000104, - 0xd00000: 0x10000, - 0xe00000: 0x4, - 0xf00000: 0x100, - 0x80000: 0x4010100, - 0x180000: 0x4010004, - 0x280000: 0x0, - 0x380000: 0x4000100, - 0x480000: 0x4000004, - 0x580000: 0x10000, - 0x680000: 0x10004, - 0x780000: 0x104, - 0x880000: 0x4, - 0x980000: 0x100, - 0xa80000: 0x4010000, - 0xb80000: 0x10104, - 0xc80000: 0x10100, - 0xd80000: 0x4000104, - 0xe80000: 0x4010104, - 0xf80000: 0x4000000, - 0x1000000: 0x4010100, - 0x1100000: 0x10004, - 0x1200000: 0x10000, - 0x1300000: 0x4000100, - 0x1400000: 0x100, - 0x1500000: 0x4010104, - 0x1600000: 0x4000004, - 0x1700000: 0x0, - 0x1800000: 0x4000104, - 0x1900000: 0x4000000, - 0x1a00000: 0x4, - 0x1b00000: 0x10100, - 0x1c00000: 0x4010000, - 0x1d00000: 0x104, - 0x1e00000: 0x10104, - 0x1f00000: 0x4010004, - 0x1080000: 0x4000000, - 0x1180000: 0x104, - 0x1280000: 0x4010100, - 0x1380000: 0x0, - 0x1480000: 0x10004, - 0x1580000: 0x4000100, - 0x1680000: 0x100, - 0x1780000: 0x4010004, - 0x1880000: 0x10000, - 0x1980000: 0x4010104, - 0x1a80000: 0x10104, - 0x1b80000: 0x4000004, - 0x1c80000: 0x4000104, - 0x1d80000: 0x4010000, - 0x1e80000: 0x4, - 0x1f80000: 0x10100 - }, - { - 0x0: 0x80401000, - 0x10000: 0x80001040, - 0x20000: 0x401040, - 0x30000: 0x80400000, - 0x40000: 0x0, - 0x50000: 0x401000, - 0x60000: 0x80000040, - 0x70000: 0x400040, - 0x80000: 0x80000000, - 0x90000: 0x400000, - 0xa0000: 0x40, - 0xb0000: 0x80001000, - 0xc0000: 0x80400040, - 0xd0000: 0x1040, - 0xe0000: 0x1000, - 0xf0000: 0x80401040, - 0x8000: 0x80001040, - 0x18000: 0x40, - 0x28000: 0x80400040, - 0x38000: 0x80001000, - 0x48000: 0x401000, - 0x58000: 0x80401040, - 0x68000: 0x0, - 0x78000: 0x80400000, - 0x88000: 0x1000, - 0x98000: 0x80401000, - 0xa8000: 0x400000, - 0xb8000: 0x1040, - 0xc8000: 0x80000000, - 0xd8000: 0x400040, - 0xe8000: 0x401040, - 0xf8000: 0x80000040, - 0x100000: 0x400040, - 0x110000: 0x401000, - 0x120000: 0x80000040, - 0x130000: 0x0, - 0x140000: 0x1040, - 0x150000: 0x80400040, - 0x160000: 0x80401000, - 0x170000: 0x80001040, - 0x180000: 0x80401040, - 0x190000: 0x80000000, - 0x1a0000: 0x80400000, - 0x1b0000: 0x401040, - 0x1c0000: 0x80001000, - 0x1d0000: 0x400000, - 0x1e0000: 0x40, - 0x1f0000: 0x1000, - 0x108000: 0x80400000, - 0x118000: 0x80401040, - 0x128000: 0x0, - 0x138000: 0x401000, - 0x148000: 0x400040, - 0x158000: 0x80000000, - 0x168000: 0x80001040, - 0x178000: 0x40, - 0x188000: 0x80000040, - 0x198000: 0x1000, - 0x1a8000: 0x80001000, - 0x1b8000: 0x80400040, - 0x1c8000: 0x1040, - 0x1d8000: 0x80401000, - 0x1e8000: 0x400000, - 0x1f8000: 0x401040 - }, - { - 0x0: 0x80, - 0x1000: 0x1040000, - 0x2000: 0x40000, - 0x3000: 0x20000000, - 0x4000: 0x20040080, - 0x5000: 0x1000080, - 0x6000: 0x21000080, - 0x7000: 0x40080, - 0x8000: 0x1000000, - 0x9000: 0x20040000, - 0xa000: 0x20000080, - 0xb000: 0x21040080, - 0xc000: 0x21040000, - 0xd000: 0x0, - 0xe000: 0x1040080, - 0xf000: 0x21000000, - 0x800: 0x1040080, - 0x1800: 0x21000080, - 0x2800: 0x80, - 0x3800: 0x1040000, - 0x4800: 0x40000, - 0x5800: 0x20040080, - 0x6800: 0x21040000, - 0x7800: 0x20000000, - 0x8800: 0x20040000, - 0x9800: 0x0, - 0xa800: 0x21040080, - 0xb800: 0x1000080, - 0xc800: 0x20000080, - 0xd800: 0x21000000, - 0xe800: 0x1000000, - 0xf800: 0x40080, - 0x10000: 0x40000, - 0x11000: 0x80, - 0x12000: 0x20000000, - 0x13000: 0x21000080, - 0x14000: 0x1000080, - 0x15000: 0x21040000, - 0x16000: 0x20040080, - 0x17000: 0x1000000, - 0x18000: 0x21040080, - 0x19000: 0x21000000, - 0x1a000: 0x1040000, - 0x1b000: 0x20040000, - 0x1c000: 0x40080, - 0x1d000: 0x20000080, - 0x1e000: 0x0, - 0x1f000: 0x1040080, - 0x10800: 0x21000080, - 0x11800: 0x1000000, - 0x12800: 0x1040000, - 0x13800: 0x20040080, - 0x14800: 0x20000000, - 0x15800: 0x1040080, - 0x16800: 0x80, - 0x17800: 0x21040000, - 0x18800: 0x40080, - 0x19800: 0x21040080, - 0x1a800: 0x0, - 0x1b800: 0x21000000, - 0x1c800: 0x1000080, - 0x1d800: 0x40000, - 0x1e800: 0x20040000, - 0x1f800: 0x20000080 - }, - { - 0x0: 0x10000008, - 0x100: 0x2000, - 0x200: 0x10200000, - 0x300: 0x10202008, - 0x400: 0x10002000, - 0x500: 0x200000, - 0x600: 0x200008, - 0x700: 0x10000000, - 0x800: 0x0, - 0x900: 0x10002008, - 0xa00: 0x202000, - 0xb00: 0x8, - 0xc00: 0x10200008, - 0xd00: 0x202008, - 0xe00: 0x2008, - 0xf00: 0x10202000, - 0x80: 0x10200000, - 0x180: 0x10202008, - 0x280: 0x8, - 0x380: 0x200000, - 0x480: 0x202008, - 0x580: 0x10000008, - 0x680: 0x10002000, - 0x780: 0x2008, - 0x880: 0x200008, - 0x980: 0x2000, - 0xa80: 0x10002008, - 0xb80: 0x10200008, - 0xc80: 0x0, - 0xd80: 0x10202000, - 0xe80: 0x202000, - 0xf80: 0x10000000, - 0x1000: 0x10002000, - 0x1100: 0x10200008, - 0x1200: 0x10202008, - 0x1300: 0x2008, - 0x1400: 0x200000, - 0x1500: 0x10000000, - 0x1600: 0x10000008, - 0x1700: 0x202000, - 0x1800: 0x202008, - 0x1900: 0x0, - 0x1a00: 0x8, - 0x1b00: 0x10200000, - 0x1c00: 0x2000, - 0x1d00: 0x10002008, - 0x1e00: 0x10202000, - 0x1f00: 0x200008, - 0x1080: 0x8, - 0x1180: 0x202000, - 0x1280: 0x200000, - 0x1380: 0x10000008, - 0x1480: 0x10002000, - 0x1580: 0x2008, - 0x1680: 0x10202008, - 0x1780: 0x10200000, - 0x1880: 0x10202000, - 0x1980: 0x10200008, - 0x1a80: 0x2000, - 0x1b80: 0x202008, - 0x1c80: 0x200008, - 0x1d80: 0x0, - 0x1e80: 0x10000000, - 0x1f80: 0x10002008 - }, - { - 0x0: 0x100000, - 0x10: 0x2000401, - 0x20: 0x400, - 0x30: 0x100401, - 0x40: 0x2100401, - 0x50: 0x0, - 0x60: 0x1, - 0x70: 0x2100001, - 0x80: 0x2000400, - 0x90: 0x100001, - 0xa0: 0x2000001, - 0xb0: 0x2100400, - 0xc0: 0x2100000, - 0xd0: 0x401, - 0xe0: 0x100400, - 0xf0: 0x2000000, - 0x8: 0x2100001, - 0x18: 0x0, - 0x28: 0x2000401, - 0x38: 0x2100400, - 0x48: 0x100000, - 0x58: 0x2000001, - 0x68: 0x2000000, - 0x78: 0x401, - 0x88: 0x100401, - 0x98: 0x2000400, - 0xa8: 0x2100000, - 0xb8: 0x100001, - 0xc8: 0x400, - 0xd8: 0x2100401, - 0xe8: 0x1, - 0xf8: 0x100400, - 0x100: 0x2000000, - 0x110: 0x100000, - 0x120: 0x2000401, - 0x130: 0x2100001, - 0x140: 0x100001, - 0x150: 0x2000400, - 0x160: 0x2100400, - 0x170: 0x100401, - 0x180: 0x401, - 0x190: 0x2100401, - 0x1a0: 0x100400, - 0x1b0: 0x1, - 0x1c0: 0x0, - 0x1d0: 0x2100000, - 0x1e0: 0x2000001, - 0x1f0: 0x400, - 0x108: 0x100400, - 0x118: 0x2000401, - 0x128: 0x2100001, - 0x138: 0x1, - 0x148: 0x2000000, - 0x158: 0x100000, - 0x168: 0x401, - 0x178: 0x2100400, - 0x188: 0x2000001, - 0x198: 0x2100000, - 0x1a8: 0x0, - 0x1b8: 0x2100401, - 0x1c8: 0x100401, - 0x1d8: 0x400, - 0x1e8: 0x2000400, - 0x1f8: 0x100001 - }, - { - 0x0: 0x8000820, - 0x1: 0x20000, - 0x2: 0x8000000, - 0x3: 0x20, - 0x4: 0x20020, - 0x5: 0x8020820, - 0x6: 0x8020800, - 0x7: 0x800, - 0x8: 0x8020000, - 0x9: 0x8000800, - 0xa: 0x20800, - 0xb: 0x8020020, - 0xc: 0x820, - 0xd: 0x0, - 0xe: 0x8000020, - 0xf: 0x20820, - 0x80000000: 0x800, - 0x80000001: 0x8020820, - 0x80000002: 0x8000820, - 0x80000003: 0x8000000, - 0x80000004: 0x8020000, - 0x80000005: 0x20800, - 0x80000006: 0x20820, - 0x80000007: 0x20, - 0x80000008: 0x8000020, - 0x80000009: 0x820, - 0x8000000a: 0x20020, - 0x8000000b: 0x8020800, - 0x8000000c: 0x0, - 0x8000000d: 0x8020020, - 0x8000000e: 0x8000800, - 0x8000000f: 0x20000, - 0x10: 0x20820, - 0x11: 0x8020800, - 0x12: 0x20, - 0x13: 0x800, - 0x14: 0x8000800, - 0x15: 0x8000020, - 0x16: 0x8020020, - 0x17: 0x20000, - 0x18: 0x0, - 0x19: 0x20020, - 0x1a: 0x8020000, - 0x1b: 0x8000820, - 0x1c: 0x8020820, - 0x1d: 0x20800, - 0x1e: 0x820, - 0x1f: 0x8000000, - 0x80000010: 0x20000, - 0x80000011: 0x800, - 0x80000012: 0x8020020, - 0x80000013: 0x20820, - 0x80000014: 0x20, - 0x80000015: 0x8020000, - 0x80000016: 0x8000000, - 0x80000017: 0x8000820, - 0x80000018: 0x8020820, - 0x80000019: 0x8000020, - 0x8000001a: 0x8000800, - 0x8000001b: 0x0, - 0x8000001c: 0x20800, - 0x8000001d: 0x820, - 0x8000001e: 0x20020, - 0x8000001f: 0x8020800 - } - ]; - - // Masks that select the SBOX input - var SBOX_MASK = [ - 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, - 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f - ]; - - /** - * DES block cipher algorithm. - */ - var DES = C_algo.DES = BlockCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - - // Select 56 bits according to PC1 - var keyBits = []; - for (var i = 0; i < 56; i++) { - var keyBitPos = PC1[i] - 1; - keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; - } - - // Assemble 16 subkeys - var subKeys = this._subKeys = []; - for (var nSubKey = 0; nSubKey < 16; nSubKey++) { - // Create subkey - var subKey = subKeys[nSubKey] = []; - - // Shortcut - var bitShift = BIT_SHIFTS[nSubKey]; - - // Select 48 bits according to PC2 - for (var i = 0; i < 24; i++) { - // Select from the left 28 key bits - subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); - - // Select from the right 28 key bits - subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); - } - - // Since each subkey is applied to an expanded 32-bit input, - // the subkey can be broken into 8 values scaled to 32-bits, - // which allows the key to be used without expansion - subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); - for (var i = 1; i < 7; i++) { - subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); - } - subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); - } - - // Compute inverse subkeys - var invSubKeys = this._invSubKeys = []; - for (var i = 0; i < 16; i++) { - invSubKeys[i] = subKeys[15 - i]; - } - }, - - encryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._subKeys); - }, - - decryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._invSubKeys); - }, - - _doCryptBlock: function (M, offset, subKeys) { - // Get input - this._lBlock = M[offset]; - this._rBlock = M[offset + 1]; - - // Initial permutation - exchangeLR.call(this, 4, 0x0f0f0f0f); - exchangeLR.call(this, 16, 0x0000ffff); - exchangeRL.call(this, 2, 0x33333333); - exchangeRL.call(this, 8, 0x00ff00ff); - exchangeLR.call(this, 1, 0x55555555); - - // Rounds - for (var round = 0; round < 16; round++) { - // Shortcuts - var subKey = subKeys[round]; - var lBlock = this._lBlock; - var rBlock = this._rBlock; - - // Feistel function - var f = 0; - for (var i = 0; i < 8; i++) { - f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; - } - this._lBlock = rBlock; - this._rBlock = lBlock ^ f; - } - - // Undo swap from last round - var t = this._lBlock; - this._lBlock = this._rBlock; - this._rBlock = t; - - // Final permutation - exchangeLR.call(this, 1, 0x55555555); - exchangeRL.call(this, 8, 0x00ff00ff); - exchangeRL.call(this, 2, 0x33333333); - exchangeLR.call(this, 16, 0x0000ffff); - exchangeLR.call(this, 4, 0x0f0f0f0f); - - // Set output - M[offset] = this._lBlock; - M[offset + 1] = this._rBlock; - }, - - keySize: 64/32, - - ivSize: 64/32, - - blockSize: 64/32 - }); - - // Swap bits across the left and right words - function exchangeLR(offset, mask) { - var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; - this._rBlock ^= t; - this._lBlock ^= t << offset; - } - - function exchangeRL(offset, mask) { - var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; - this._lBlock ^= t; - this._rBlock ^= t << offset; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); - */ - C.DES = BlockCipher._createHelper(DES); - - /** - * Triple-DES block cipher algorithm. - */ - var TripleDES = C_algo.TripleDES = BlockCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - // Make sure the key length is valid (64, 128 or >= 192 bit) - if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) { - throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.'); - } - - // Extend the key according to the keying options defined in 3DES standard - var key1 = keyWords.slice(0, 2); - var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4); - var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6); - - // Create DES instances - this._des1 = DES.createEncryptor(WordArray.create(key1)); - this._des2 = DES.createEncryptor(WordArray.create(key2)); - this._des3 = DES.createEncryptor(WordArray.create(key3)); - }, - - encryptBlock: function (M, offset) { - this._des1.encryptBlock(M, offset); - this._des2.decryptBlock(M, offset); - this._des3.encryptBlock(M, offset); - }, - - decryptBlock: function (M, offset) { - this._des3.decryptBlock(M, offset); - this._des2.encryptBlock(M, offset); - this._des1.decryptBlock(M, offset); - }, - - keySize: 192/32, - - ivSize: 64/32, - - blockSize: 64/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); - */ - C.TripleDES = BlockCipher._createHelper(TripleDES); - }()); - - - return CryptoJS.TripleDES; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/x64-core.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/x64-core.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var X32WordArray = C_lib.WordArray; - - /** - * x64 namespace. - */ - var C_x64 = C.x64 = {}; - - /** - * A 64-bit word. - */ - var X64Word = C_x64.Word = Base.extend({ - /** - * Initializes a newly created 64-bit word. - * - * @param {number} high The high 32 bits. - * @param {number} low The low 32 bits. - * - * @example - * - * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); - */ - init: function (high, low) { - this.high = high; - this.low = low; - } - - /** - * Bitwise NOTs this word. - * - * @return {X64Word} A new x64-Word object after negating. - * - * @example - * - * var negated = x64Word.not(); - */ - // not: function () { - // var high = ~this.high; - // var low = ~this.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise ANDs this word with the passed word. - * - * @param {X64Word} word The x64-Word to AND with this word. - * - * @return {X64Word} A new x64-Word object after ANDing. - * - * @example - * - * var anded = x64Word.and(anotherX64Word); - */ - // and: function (word) { - // var high = this.high & word.high; - // var low = this.low & word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise ORs this word with the passed word. - * - * @param {X64Word} word The x64-Word to OR with this word. - * - * @return {X64Word} A new x64-Word object after ORing. - * - * @example - * - * var ored = x64Word.or(anotherX64Word); - */ - // or: function (word) { - // var high = this.high | word.high; - // var low = this.low | word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise XORs this word with the passed word. - * - * @param {X64Word} word The x64-Word to XOR with this word. - * - * @return {X64Word} A new x64-Word object after XORing. - * - * @example - * - * var xored = x64Word.xor(anotherX64Word); - */ - // xor: function (word) { - // var high = this.high ^ word.high; - // var low = this.low ^ word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Shifts this word n bits to the left. - * - * @param {number} n The number of bits to shift. - * - * @return {X64Word} A new x64-Word object after shifting. - * - * @example - * - * var shifted = x64Word.shiftL(25); - */ - // shiftL: function (n) { - // if (n < 32) { - // var high = (this.high << n) | (this.low >>> (32 - n)); - // var low = this.low << n; - // } else { - // var high = this.low << (n - 32); - // var low = 0; - // } - - // return X64Word.create(high, low); - // }, - - /** - * Shifts this word n bits to the right. - * - * @param {number} n The number of bits to shift. - * - * @return {X64Word} A new x64-Word object after shifting. - * - * @example - * - * var shifted = x64Word.shiftR(7); - */ - // shiftR: function (n) { - // if (n < 32) { - // var low = (this.low >>> n) | (this.high << (32 - n)); - // var high = this.high >>> n; - // } else { - // var low = this.high >>> (n - 32); - // var high = 0; - // } - - // return X64Word.create(high, low); - // }, - - /** - * Rotates this word n bits to the left. - * - * @param {number} n The number of bits to rotate. - * - * @return {X64Word} A new x64-Word object after rotating. - * - * @example - * - * var rotated = x64Word.rotL(25); - */ - // rotL: function (n) { - // return this.shiftL(n).or(this.shiftR(64 - n)); - // }, - - /** - * Rotates this word n bits to the right. - * - * @param {number} n The number of bits to rotate. - * - * @return {X64Word} A new x64-Word object after rotating. - * - * @example - * - * var rotated = x64Word.rotR(7); - */ - // rotR: function (n) { - // return this.shiftR(n).or(this.shiftL(64 - n)); - // }, - - /** - * Adds this word with the passed word. - * - * @param {X64Word} word The x64-Word to add with this word. - * - * @return {X64Word} A new x64-Word object after adding. - * - * @example - * - * var added = x64Word.add(anotherX64Word); - */ - // add: function (word) { - // var low = (this.low + word.low) | 0; - // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; - // var high = (this.high + word.high + carry) | 0; - - // return X64Word.create(high, low); - // } - }); - - /** - * An array of 64-bit words. - * - * @property {Array} words The array of CryptoJS.x64.Word objects. - * @property {number} sigBytes The number of significant bytes in this word array. - */ - var X64WordArray = C_x64.WordArray = Base.extend({ - /** - * Initializes a newly created word array. - * - * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. - * @param {number} sigBytes (Optional) The number of significant bytes in the words. - * - * @example - * - * var wordArray = CryptoJS.x64.WordArray.create(); - * - * var wordArray = CryptoJS.x64.WordArray.create([ - * CryptoJS.x64.Word.create(0x00010203, 0x04050607), - * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) - * ]); - * - * var wordArray = CryptoJS.x64.WordArray.create([ - * CryptoJS.x64.Word.create(0x00010203, 0x04050607), - * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) - * ], 10); - */ - init: function (words, sigBytes) { - words = this.words = words || []; - - if (sigBytes != undefined) { - this.sigBytes = sigBytes; - } else { - this.sigBytes = words.length * 8; - } - }, - - /** - * Converts this 64-bit word array to a 32-bit word array. - * - * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. - * - * @example - * - * var x32WordArray = x64WordArray.toX32(); - */ - toX32: function () { - // Shortcuts - var x64Words = this.words; - var x64WordsLength = x64Words.length; - - // Convert - var x32Words = []; - for (var i = 0; i < x64WordsLength; i++) { - var x64Word = x64Words[i]; - x32Words.push(x64Word.high); - x32Words.push(x64Word.low); - } - - return X32WordArray.create(x32Words, this.sigBytes); - }, - - /** - * Creates a copy of this word array. - * - * @return {X64WordArray} The clone. - * - * @example - * - * var clone = x64WordArray.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - - // Clone "words" array - var words = clone.words = this.words.slice(0); - - // Clone each X64Word object - var wordsLength = words.length; - for (var i = 0; i < wordsLength; i++) { - words[i] = words[i].clone(); - } - - return clone; - } - }); - }()); - - - return CryptoJS; - -})); - -/***/ }), - -/***/ "./node_modules/desandro-matches-selector/matches-selector.js": -/*!********************************************************************!*\ - !*** ./node_modules/desandro-matches-selector/matches-selector.js ***! - \********************************************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * matchesSelector v2.0.2 - * matchesSelector( element, '.selector' ) - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true */ - -( function( window, factory ) { - /*global define: false, module: false */ - 'use strict'; - // universal module definition - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory() { - 'use strict'; - - var matchesMethod = ( function() { - var ElemProto = window.Element.prototype; - // check for the standard method name first - if ( ElemProto.matches ) { - return 'matches'; - } - // check un-prefixed - if ( ElemProto.matchesSelector ) { - return 'matchesSelector'; - } - // check vendor prefixes - var prefixes = [ 'webkit', 'moz', 'ms', 'o' ]; - - for ( var i=0; i < prefixes.length; i++ ) { - var prefix = prefixes[i]; - var method = prefix + 'MatchesSelector'; - if ( ElemProto[ method ] ) { - return method; - } - } - })(); - - return function matchesSelector( elem, selector ) { - return elem[ matchesMethod ]( selector ); - }; - -})); - - -/***/ }), - -/***/ "./node_modules/ev-emitter/ev-emitter.js": -/*!***********************************************!*\ - !*** ./node_modules/ev-emitter/ev-emitter.js ***! - \***********************************************/ -/***/ (function(module) { - -/** - * EvEmitter v2.1.1 - * Lil' event emitter - * MIT License - */ - -( function( global, factory ) { - // universal module definition - if ( true && module.exports ) { - // CommonJS - Browserify, Webpack - module.exports = factory(); - } else { - // Browser globals - global.EvEmitter = factory(); - } - -}( typeof window != 'undefined' ? window : this, function() { - -function EvEmitter() {} - -let proto = EvEmitter.prototype; - -proto.on = function( eventName, listener ) { - if ( !eventName || !listener ) return this; - - // set events hash - let events = this._events = this._events || {}; - // set listeners array - let listeners = events[ eventName ] = events[ eventName ] || []; - // only add once - if ( !listeners.includes( listener ) ) { - listeners.push( listener ); - } - - return this; -}; - -proto.once = function( eventName, listener ) { - if ( !eventName || !listener ) return this; - - // add event - this.on( eventName, listener ); - // set once flag - // set onceEvents hash - let onceEvents = this._onceEvents = this._onceEvents || {}; - // set onceListeners object - let onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {}; - // set flag - onceListeners[ listener ] = true; - - return this; -}; - -proto.off = function( eventName, listener ) { - let listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) return this; - - let index = listeners.indexOf( listener ); - if ( index != -1 ) { - listeners.splice( index, 1 ); - } - - return this; -}; - -proto.emitEvent = function( eventName, args ) { - let listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) return this; - - // copy over to avoid interference if .off() in listener - listeners = listeners.slice( 0 ); - args = args || []; - // once stuff - let onceListeners = this._onceEvents && this._onceEvents[ eventName ]; - - for ( let listener of listeners ) { - let isOnce = onceListeners && onceListeners[ listener ]; - if ( isOnce ) { - // remove listener - // remove before trigger to prevent recursion - this.off( eventName, listener ); - // unset once flag - delete onceListeners[ listener ]; - } - // trigger listener - listener.apply( this, args ); - } - - return this; -}; - -proto.allOff = function() { - delete this._events; - delete this._onceEvents; - return this; -}; - -return EvEmitter; - -} ) ); - - -/***/ }), - -/***/ "./node_modules/fizzy-ui-utils/utils.js": -/*!**********************************************!*\ - !*** ./node_modules/fizzy-ui-utils/utils.js ***! - \**********************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * Fizzy UI utils v2.0.7 - * MIT license - */ - -/*jshint browser: true, undef: true, unused: true, strict: true */ - -( function( window, factory ) { - // universal module definition - /*jshint strict: false */ /*globals define, module, require */ - - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! desandro-matches-selector/matches-selector */ "./node_modules/desandro-matches-selector/matches-selector.js") - ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( matchesSelector ) { - return factory( window, matchesSelector ); - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( window, matchesSelector ) { - -'use strict'; - -var utils = {}; - -// ----- extend ----- // - -// extends objects -utils.extend = function( a, b ) { - for ( var prop in b ) { - a[ prop ] = b[ prop ]; - } - return a; -}; - -// ----- modulo ----- // - -utils.modulo = function( num, div ) { - return ( ( num % div ) + div ) % div; -}; - -// ----- makeArray ----- // - -var arraySlice = Array.prototype.slice; - -// turn element or nodeList into an array -utils.makeArray = function( obj ) { - if ( Array.isArray( obj ) ) { - // use object if already an array - return obj; - } - // return empty array if undefined or null. #6 - if ( obj === null || obj === undefined ) { - return []; - } - - var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number'; - if ( isArrayLike ) { - // convert nodeList to array - return arraySlice.call( obj ); - } - - // array of single index - return [ obj ]; -}; - -// ----- removeFrom ----- // - -utils.removeFrom = function( ary, obj ) { - var index = ary.indexOf( obj ); - if ( index != -1 ) { - ary.splice( index, 1 ); - } -}; - -// ----- getParent ----- // - -utils.getParent = function( elem, selector ) { - while ( elem.parentNode && elem != document.body ) { - elem = elem.parentNode; - if ( matchesSelector( elem, selector ) ) { - return elem; - } - } -}; - -// ----- getQueryElement ----- // - -// use element as selector string -utils.getQueryElement = function( elem ) { - if ( typeof elem == 'string' ) { - return document.querySelector( elem ); - } - return elem; -}; - -// ----- handleEvent ----- // - -// enable .ontype to trigger from .addEventListener( elem, 'type' ) -utils.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -// ----- filterFindElements ----- // - -utils.filterFindElements = function( elems, selector ) { - // make array of elems - elems = utils.makeArray( elems ); - var ffElems = []; - - elems.forEach( function( elem ) { - // check that elem is an actual element - if ( !( elem instanceof HTMLElement ) ) { - return; - } - // add elem if no selector - if ( !selector ) { - ffElems.push( elem ); - return; - } - // filter & find items if we have a selector - // filter - if ( matchesSelector( elem, selector ) ) { - ffElems.push( elem ); - } - // find children - var childElems = elem.querySelectorAll( selector ); - // concat childElems to filterFound array - for ( var i=0; i < childElems.length; i++ ) { - ffElems.push( childElems[i] ); - } - }); - - return ffElems; -}; - -// ----- debounceMethod ----- // - -utils.debounceMethod = function( _class, methodName, threshold ) { - threshold = threshold || 100; - // original method - var method = _class.prototype[ methodName ]; - var timeoutName = methodName + 'Timeout'; - - _class.prototype[ methodName ] = function() { - var timeout = this[ timeoutName ]; - clearTimeout( timeout ); - - var args = arguments; - var _this = this; - this[ timeoutName ] = setTimeout( function() { - method.apply( _this, args ); - delete _this[ timeoutName ]; - }, threshold ); - }; -}; - -// ----- docReady ----- // - -utils.docReady = function( callback ) { - var readyState = document.readyState; - if ( readyState == 'complete' || readyState == 'interactive' ) { - // do async to allow for other scripts to run. metafizzy/flickity#441 - setTimeout( callback ); - } else { - document.addEventListener( 'DOMContentLoaded', callback ); - } -}; - -// ----- htmlInit ----- // - -// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/ -utils.toDashed = function( str ) { - return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) { - return $1 + '-' + $2; - }).toLowerCase(); -}; - -var console = window.console; -/** - * allow user to initialize classes via [data-namespace] or .js-namespace class - * htmlInit( Widget, 'widgetName' ) - * options are parsed from data-namespace-options - */ -utils.htmlInit = function( WidgetClass, namespace ) { - utils.docReady( function() { - var dashedNamespace = utils.toDashed( namespace ); - var dataAttr = 'data-' + dashedNamespace; - var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' ); - var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace ); - var elems = utils.makeArray( dataAttrElems ) - .concat( utils.makeArray( jsDashElems ) ); - var dataOptionsAttr = dataAttr + '-options'; - var jQuery = window.jQuery; - - elems.forEach( function( elem ) { - var attr = elem.getAttribute( dataAttr ) || - elem.getAttribute( dataOptionsAttr ); - var options; - try { - options = attr && JSON.parse( attr ); - } catch ( error ) { - // log error, do not initialize - if ( console ) { - console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className + - ': ' + error ); - } - return; - } - // initialize - var instance = new WidgetClass( elem, options ); - // make available via $().data('namespace') - if ( jQuery ) { - jQuery.data( elem, namespace, instance ); - } - }); - - }); -}; - -// ----- ----- // - -return utils; - -})); - - -/***/ }), - -/***/ "./node_modules/get-size/get-size.js": -/*!*******************************************!*\ - !*** ./node_modules/get-size/get-size.js ***! - \*******************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - * getSize v2.0.3 - * measure size of elements - * MIT license - */ - -/* jshint browser: true, strict: true, undef: true, unused: true */ -/* globals console: false */ - -( function( window, factory ) { - /* jshint strict: false */ /* globals define, module */ - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -})( window, function factory() { -'use strict'; - -// -------------------------- helpers -------------------------- // - -// get a number from a string, not a percentage -function getStyleSize( value ) { - var num = parseFloat( value ); - // not a percent like '100%', and a number - var isValid = value.indexOf('%') == -1 && !isNaN( num ); - return isValid && num; -} - -function noop() {} - -var logError = typeof console == 'undefined' ? noop : - function( message ) { - console.error( message ); - }; - -// -------------------------- measurements -------------------------- // - -var measurements = [ - 'paddingLeft', - 'paddingRight', - 'paddingTop', - 'paddingBottom', - 'marginLeft', - 'marginRight', - 'marginTop', - 'marginBottom', - 'borderLeftWidth', - 'borderRightWidth', - 'borderTopWidth', - 'borderBottomWidth' -]; - -var measurementsLength = measurements.length; - -function getZeroSize() { - var size = { - width: 0, - height: 0, - innerWidth: 0, - innerHeight: 0, - outerWidth: 0, - outerHeight: 0 - }; - for ( var i=0; i < measurementsLength; i++ ) { - var measurement = measurements[i]; - size[ measurement ] = 0; - } - return size; -} - -// -------------------------- getStyle -------------------------- // - -/** - * getStyle, get style of element, check for Firefox bug - * https://bugzilla.mozilla.org/show_bug.cgi?id=548397 - */ -function getStyle( elem ) { - var style = getComputedStyle( elem ); - if ( !style ) { - logError( 'Style returned ' + style + - '. Are you running this code in a hidden iframe on Firefox? ' + - 'See https://bit.ly/getsizebug1' ); - } - return style; -} - -// -------------------------- setup -------------------------- // - -var isSetup = false; - -var isBoxSizeOuter; - -/** - * setup - * check isBoxSizerOuter - * do on first getSize() rather than on page load for Firefox bug - */ -function setup() { - // setup once - if ( isSetup ) { - return; - } - isSetup = true; - - // -------------------------- box sizing -------------------------- // - - /** - * Chrome & Safari measure the outer-width on style.width on border-box elems - * IE11 & Firefox<29 measures the inner-width - */ - var div = document.createElement('div'); - div.style.width = '200px'; - div.style.padding = '1px 2px 3px 4px'; - div.style.borderStyle = 'solid'; - div.style.borderWidth = '1px 2px 3px 4px'; - div.style.boxSizing = 'border-box'; - - var body = document.body || document.documentElement; - body.appendChild( div ); - var style = getStyle( div ); - // round value for browser zoom. desandro/masonry#928 - isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200; - getSize.isBoxSizeOuter = isBoxSizeOuter; - - body.removeChild( div ); -} - -// -------------------------- getSize -------------------------- // - -function getSize( elem ) { - setup(); - - // use querySeletor if elem is string - if ( typeof elem == 'string' ) { - elem = document.querySelector( elem ); - } - - // do not proceed on non-objects - if ( !elem || typeof elem != 'object' || !elem.nodeType ) { - return; - } - - var style = getStyle( elem ); - - // if hidden, everything is 0 - if ( style.display == 'none' ) { - return getZeroSize(); - } - - var size = {}; - size.width = elem.offsetWidth; - size.height = elem.offsetHeight; - - var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box'; - - // get all measurements - for ( var i=0; i < measurementsLength; i++ ) { - var measurement = measurements[i]; - var value = style[ measurement ]; - var num = parseFloat( value ); - // any 'auto', 'medium' value will be 0 - size[ measurement ] = !isNaN( num ) ? num : 0; - } - - var paddingWidth = size.paddingLeft + size.paddingRight; - var paddingHeight = size.paddingTop + size.paddingBottom; - var marginWidth = size.marginLeft + size.marginRight; - var marginHeight = size.marginTop + size.marginBottom; - var borderWidth = size.borderLeftWidth + size.borderRightWidth; - var borderHeight = size.borderTopWidth + size.borderBottomWidth; - - var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter; - - // overwrite width and height if we can get it from style - var styleWidth = getStyleSize( style.width ); - if ( styleWidth !== false ) { - size.width = styleWidth + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth ); - } - - var styleHeight = getStyleSize( style.height ); - if ( styleHeight !== false ) { - size.height = styleHeight + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight ); - } - - size.innerWidth = size.width - ( paddingWidth + borderWidth ); - size.innerHeight = size.height - ( paddingHeight + borderHeight ); - - size.outerWidth = size.width + marginWidth; - size.outerHeight = size.height + marginHeight; - - return size; -} - -return getSize; - -}); - - -/***/ }), - -/***/ "./node_modules/imagesloaded/imagesloaded.js": -/*!***************************************************!*\ - !*** ./node_modules/imagesloaded/imagesloaded.js ***! - \***************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -/*! - * imagesLoaded v5.0.0 - * JavaScript is all like "You images are done yet or what?" - * MIT License - */ - -( function( window, factory ) { - // universal module definition - if ( true && module.exports ) { - // CommonJS - module.exports = factory( window, __webpack_require__(/*! ev-emitter */ "./node_modules/ev-emitter/ev-emitter.js") ); - } else { - // browser global - window.imagesLoaded = factory( window, window.EvEmitter ); - } - -} )( typeof window !== 'undefined' ? window : this, - function factory( window, EvEmitter ) { - -let $ = window.jQuery; -let console = window.console; - -// -------------------------- helpers -------------------------- // - -// turn element or nodeList into an array -function makeArray( obj ) { - // use object if already an array - if ( Array.isArray( obj ) ) return obj; - - let isArrayLike = typeof obj == 'object' && typeof obj.length == 'number'; - // convert nodeList to array - if ( isArrayLike ) return [ ...obj ]; - - // array of single index - return [ obj ]; -} - -// -------------------------- imagesLoaded -------------------------- // - -/** - * @param {[Array, Element, NodeList, String]} elem - * @param {[Object, Function]} options - if function, use as callback - * @param {Function} onAlways - callback function - * @returns {ImagesLoaded} - */ -function ImagesLoaded( elem, options, onAlways ) { - // coerce ImagesLoaded() without new, to be new ImagesLoaded() - if ( !( this instanceof ImagesLoaded ) ) { - return new ImagesLoaded( elem, options, onAlways ); - } - // use elem as selector string - let queryElem = elem; - if ( typeof elem == 'string' ) { - queryElem = document.querySelectorAll( elem ); - } - // bail if bad element - if ( !queryElem ) { - console.error(`Bad element for imagesLoaded ${queryElem || elem}`); - return; - } - - this.elements = makeArray( queryElem ); - this.options = {}; - // shift arguments if no options set - if ( typeof options == 'function' ) { - onAlways = options; - } else { - Object.assign( this.options, options ); - } - - if ( onAlways ) this.on( 'always', onAlways ); - - this.getImages(); - // add jQuery Deferred object - if ( $ ) this.jqDeferred = new $.Deferred(); - - // HACK check async to allow time to bind listeners - setTimeout( this.check.bind( this ) ); -} - -ImagesLoaded.prototype = Object.create( EvEmitter.prototype ); - -ImagesLoaded.prototype.getImages = function() { - this.images = []; - - // filter & find items if we have an item selector - this.elements.forEach( this.addElementImages, this ); -}; - -const elementNodeTypes = [ 1, 9, 11 ]; - -/** - * @param {Node} elem - */ -ImagesLoaded.prototype.addElementImages = function( elem ) { - // filter siblings - if ( elem.nodeName === 'IMG' ) { - this.addImage( elem ); - } - // get background image on element - if ( this.options.background === true ) { - this.addElementBackgroundImages( elem ); - } - - // find children - // no non-element nodes, #143 - let { nodeType } = elem; - if ( !nodeType || !elementNodeTypes.includes( nodeType ) ) return; - - let childImgs = elem.querySelectorAll('img'); - // concat childElems to filterFound array - for ( let img of childImgs ) { - this.addImage( img ); - } - - // get child background images - if ( typeof this.options.background == 'string' ) { - let children = elem.querySelectorAll( this.options.background ); - for ( let child of children ) { - this.addElementBackgroundImages( child ); - } - } -}; - -const reURL = /url\((['"])?(.*?)\1\)/gi; - -ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) { - let style = getComputedStyle( elem ); - // Firefox returns null if in a hidden iframe https://bugzil.la/548397 - if ( !style ) return; - - // get url inside url("...") - let matches = reURL.exec( style.backgroundImage ); - while ( matches !== null ) { - let url = matches && matches[2]; - if ( url ) { - this.addBackground( url, elem ); - } - matches = reURL.exec( style.backgroundImage ); - } -}; - -/** - * @param {Image} img - */ -ImagesLoaded.prototype.addImage = function( img ) { - let loadingImage = new LoadingImage( img ); - this.images.push( loadingImage ); -}; - -ImagesLoaded.prototype.addBackground = function( url, elem ) { - let background = new Background( url, elem ); - this.images.push( background ); -}; - -ImagesLoaded.prototype.check = function() { - this.progressedCount = 0; - this.hasAnyBroken = false; - // complete if no images - if ( !this.images.length ) { - this.complete(); - return; - } - - /* eslint-disable-next-line func-style */ - let onProgress = ( image, elem, message ) => { - // HACK - Chrome triggers event before object properties have changed. #83 - setTimeout( () => { - this.progress( image, elem, message ); - } ); - }; - - this.images.forEach( function( loadingImage ) { - loadingImage.once( 'progress', onProgress ); - loadingImage.check(); - } ); -}; - -ImagesLoaded.prototype.progress = function( image, elem, message ) { - this.progressedCount++; - this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded; - // progress event - this.emitEvent( 'progress', [ this, image, elem ] ); - if ( this.jqDeferred && this.jqDeferred.notify ) { - this.jqDeferred.notify( this, image ); - } - // check if completed - if ( this.progressedCount === this.images.length ) { - this.complete(); - } - - if ( this.options.debug && console ) { - console.log( `progress: ${message}`, image, elem ); - } -}; - -ImagesLoaded.prototype.complete = function() { - let eventName = this.hasAnyBroken ? 'fail' : 'done'; - this.isComplete = true; - this.emitEvent( eventName, [ this ] ); - this.emitEvent( 'always', [ this ] ); - if ( this.jqDeferred ) { - let jqMethod = this.hasAnyBroken ? 'reject' : 'resolve'; - this.jqDeferred[ jqMethod ]( this ); - } -}; - -// -------------------------- -------------------------- // - -function LoadingImage( img ) { - this.img = img; -} - -LoadingImage.prototype = Object.create( EvEmitter.prototype ); - -LoadingImage.prototype.check = function() { - // If complete is true and browser supports natural sizes, - // try to check for image status manually. - let isComplete = this.getIsImageComplete(); - if ( isComplete ) { - // report based on naturalWidth - this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' ); - return; - } - - // If none of the checks above matched, simulate loading on detached element. - this.proxyImage = new Image(); - // add crossOrigin attribute. #204 - if ( this.img.crossOrigin ) { - this.proxyImage.crossOrigin = this.img.crossOrigin; - } - this.proxyImage.addEventListener( 'load', this ); - this.proxyImage.addEventListener( 'error', this ); - // bind to image as well for Firefox. #191 - this.img.addEventListener( 'load', this ); - this.img.addEventListener( 'error', this ); - this.proxyImage.src = this.img.currentSrc || this.img.src; -}; - -LoadingImage.prototype.getIsImageComplete = function() { - // check for non-zero, non-undefined naturalWidth - // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671 - return this.img.complete && this.img.naturalWidth; -}; - -LoadingImage.prototype.confirm = function( isLoaded, message ) { - this.isLoaded = isLoaded; - let { parentNode } = this.img; - // emit progress with parent or self - let elem = parentNode.nodeName === 'PICTURE' ? parentNode : this.img; - this.emitEvent( 'progress', [ this, elem, message ] ); -}; - -// ----- events ----- // - -// trigger specified handler for event type -LoadingImage.prototype.handleEvent = function( event ) { - let method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -LoadingImage.prototype.onload = function() { - this.confirm( true, 'onload' ); - this.unbindEvents(); -}; - -LoadingImage.prototype.onerror = function() { - this.confirm( false, 'onerror' ); - this.unbindEvents(); -}; - -LoadingImage.prototype.unbindEvents = function() { - this.proxyImage.removeEventListener( 'load', this ); - this.proxyImage.removeEventListener( 'error', this ); - this.img.removeEventListener( 'load', this ); - this.img.removeEventListener( 'error', this ); -}; - -// -------------------------- Background -------------------------- // - -function Background( url, element ) { - this.url = url; - this.element = element; - this.img = new Image(); -} - -// inherit LoadingImage prototype -Background.prototype = Object.create( LoadingImage.prototype ); - -Background.prototype.check = function() { - this.img.addEventListener( 'load', this ); - this.img.addEventListener( 'error', this ); - this.img.src = this.url; - // check if image is already complete - let isComplete = this.getIsImageComplete(); - if ( isComplete ) { - this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' ); - this.unbindEvents(); - } -}; - -Background.prototype.unbindEvents = function() { - this.img.removeEventListener( 'load', this ); - this.img.removeEventListener( 'error', this ); -}; - -Background.prototype.confirm = function( isLoaded, message ) { - this.isLoaded = isLoaded; - this.emitEvent( 'progress', [ this, this.element, message ] ); -}; - -// -------------------------- jQuery -------------------------- // - -ImagesLoaded.makeJQueryPlugin = function( jQuery ) { - jQuery = jQuery || window.jQuery; - if ( !jQuery ) return; - - // set local variable - $ = jQuery; - // $().imagesLoaded() - $.fn.imagesLoaded = function( options, onAlways ) { - let instance = new ImagesLoaded( this, options, onAlways ); - return instance.jqDeferred.promise( $( this ) ); - }; -}; -// try making plugin -ImagesLoaded.makeJQueryPlugin(); - -// -------------------------- -------------------------- // - -return ImagesLoaded; - -} ); - - -/***/ }), - -/***/ "./node_modules/masonry-layout/masonry.js": -/*!************************************************!*\ - !*** ./node_modules/masonry-layout/masonry.js ***! - \************************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - * Masonry v4.2.2 - * Cascading grid layout library - * https://masonry.desandro.com - * MIT License - * by David DeSandro - */ - -( function( window, factory ) { - // universal module definition - /* jshint strict: false */ /*globals define, module, require */ - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! outlayer/outlayer */ "./node_modules/outlayer/outlayer.js"), - __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js") - ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( Outlayer, getSize ) { - -'use strict'; - -// -------------------------- masonryDefinition -------------------------- // - - // create an Outlayer layout class - var Masonry = Outlayer.create('masonry'); - // isFitWidth -> fitWidth - Masonry.compatOptions.fitWidth = 'isFitWidth'; - - var proto = Masonry.prototype; - - proto._resetLayout = function() { - this.getSize(); - this._getMeasurement( 'columnWidth', 'outerWidth' ); - this._getMeasurement( 'gutter', 'outerWidth' ); - this.measureColumns(); - - // reset column Y - this.colYs = []; - for ( var i=0; i < this.cols; i++ ) { - this.colYs.push( 0 ); - } - - this.maxY = 0; - this.horizontalColIndex = 0; - }; - - proto.measureColumns = function() { - this.getContainerWidth(); - // if columnWidth is 0, default to outerWidth of first item - if ( !this.columnWidth ) { - var firstItem = this.items[0]; - var firstItemElem = firstItem && firstItem.element; - // columnWidth fall back to item of first element - this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth || - // if first elem has no width, default to size of container - this.containerWidth; - } - - var columnWidth = this.columnWidth += this.gutter; - - // calculate columns - var containerWidth = this.containerWidth + this.gutter; - var cols = containerWidth / columnWidth; - // fix rounding errors, typically with gutters - var excess = columnWidth - containerWidth % columnWidth; - // if overshoot is less than a pixel, round up, otherwise floor it - var mathMethod = excess && excess < 1 ? 'round' : 'floor'; - cols = Math[ mathMethod ]( cols ); - this.cols = Math.max( cols, 1 ); - }; - - proto.getContainerWidth = function() { - // container is parent if fit width - var isFitWidth = this._getOption('fitWidth'); - var container = isFitWidth ? this.element.parentNode : this.element; - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var size = getSize( container ); - this.containerWidth = size && size.innerWidth; - }; - - proto._getItemLayoutPosition = function( item ) { - item.getSize(); - // how many columns does this brick span - var remainder = item.size.outerWidth % this.columnWidth; - var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil'; - // round if off by 1 pixel, otherwise use ceil - var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth ); - colSpan = Math.min( colSpan, this.cols ); - // use horizontal or top column position - var colPosMethod = this.options.horizontalOrder ? - '_getHorizontalColPosition' : '_getTopColPosition'; - var colPosition = this[ colPosMethod ]( colSpan, item ); - // position the brick - var position = { - x: this.columnWidth * colPosition.col, - y: colPosition.y - }; - // apply setHeight to necessary columns - var setHeight = colPosition.y + item.size.outerHeight; - var setMax = colSpan + colPosition.col; - for ( var i = colPosition.col; i < setMax; i++ ) { - this.colYs[i] = setHeight; - } - - return position; - }; - - proto._getTopColPosition = function( colSpan ) { - var colGroup = this._getTopColGroup( colSpan ); - // get the minimum Y value from the columns - var minimumY = Math.min.apply( Math, colGroup ); - - return { - col: colGroup.indexOf( minimumY ), - y: minimumY, - }; - }; - - /** - * @param {Number} colSpan - number of columns the element spans - * @returns {Array} colGroup - */ - proto._getTopColGroup = function( colSpan ) { - if ( colSpan < 2 ) { - // if brick spans only one column, use all the column Ys - return this.colYs; - } - - var colGroup = []; - // how many different places could this brick fit horizontally - var groupCount = this.cols + 1 - colSpan; - // for each group potential horizontal position - for ( var i = 0; i < groupCount; i++ ) { - colGroup[i] = this._getColGroupY( i, colSpan ); - } - return colGroup; - }; - - proto._getColGroupY = function( col, colSpan ) { - if ( colSpan < 2 ) { - return this.colYs[ col ]; - } - // make an array of colY values for that one group - var groupColYs = this.colYs.slice( col, col + colSpan ); - // and get the max value of the array - return Math.max.apply( Math, groupColYs ); - }; - - // get column position based on horizontal index. #873 - proto._getHorizontalColPosition = function( colSpan, item ) { - var col = this.horizontalColIndex % this.cols; - var isOver = colSpan > 1 && col + colSpan > this.cols; - // shift to next row if item can't fit on current row - col = isOver ? 0 : col; - // don't let zero-size items take up space - var hasSize = item.size.outerWidth && item.size.outerHeight; - this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex; - - return { - col: col, - y: this._getColGroupY( col, colSpan ), - }; - }; - - proto._manageStamp = function( stamp ) { - var stampSize = getSize( stamp ); - var offset = this._getElementOffset( stamp ); - // get the columns that this stamp affects - var isOriginLeft = this._getOption('originLeft'); - var firstX = isOriginLeft ? offset.left : offset.right; - var lastX = firstX + stampSize.outerWidth; - var firstCol = Math.floor( firstX / this.columnWidth ); - firstCol = Math.max( 0, firstCol ); - var lastCol = Math.floor( lastX / this.columnWidth ); - // lastCol should not go over if multiple of columnWidth #425 - lastCol -= lastX % this.columnWidth ? 0 : 1; - lastCol = Math.min( this.cols - 1, lastCol ); - // set colYs to bottom of the stamp - - var isOriginTop = this._getOption('originTop'); - var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) + - stampSize.outerHeight; - for ( var i = firstCol; i <= lastCol; i++ ) { - this.colYs[i] = Math.max( stampMaxY, this.colYs[i] ); - } - }; - - proto._getContainerSize = function() { - this.maxY = Math.max.apply( Math, this.colYs ); - var size = { - height: this.maxY - }; - - if ( this._getOption('fitWidth') ) { - size.width = this._getContainerFitWidth(); - } - - return size; - }; - - proto._getContainerFitWidth = function() { - var unusedCols = 0; - // count unused columns - var i = this.cols; - while ( --i ) { - if ( this.colYs[i] !== 0 ) { - break; - } - unusedCols++; - } - // fit container to columns that have been used - return ( this.cols - unusedCols ) * this.columnWidth - this.gutter; - }; - - proto.needsResizeLayout = function() { - var previousWidth = this.containerWidth; - this.getContainerWidth(); - return previousWidth != this.containerWidth; - }; - - return Masonry; - -})); - - -/***/ }), - -/***/ "./node_modules/outlayer/item.js": -/*!***************************************!*\ - !*** ./node_modules/outlayer/item.js ***! - \***************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * Outlayer Item - */ - -( function( window, factory ) { - // universal module definition - /* jshint strict: false */ /* globals define, module, require */ - if ( true ) { - // AMD - RequireJS - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js"), - __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js") - ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( EvEmitter, getSize ) { -'use strict'; - -// ----- helpers ----- // - -function isEmptyObj( obj ) { - for ( var prop in obj ) { - return false; - } - prop = null; - return true; -} - -// -------------------------- CSS3 support -------------------------- // - - -var docElemStyle = document.documentElement.style; - -var transitionProperty = typeof docElemStyle.transition == 'string' ? - 'transition' : 'WebkitTransition'; -var transformProperty = typeof docElemStyle.transform == 'string' ? - 'transform' : 'WebkitTransform'; - -var transitionEndEvent = { - WebkitTransition: 'webkitTransitionEnd', - transition: 'transitionend' -}[ transitionProperty ]; - -// cache all vendor properties that could have vendor prefix -var vendorProperties = { - transform: transformProperty, - transition: transitionProperty, - transitionDuration: transitionProperty + 'Duration', - transitionProperty: transitionProperty + 'Property', - transitionDelay: transitionProperty + 'Delay' -}; - -// -------------------------- Item -------------------------- // - -function Item( element, layout ) { - if ( !element ) { - return; - } - - this.element = element; - // parent layout class, i.e. Masonry, Isotope, or Packery - this.layout = layout; - this.position = { - x: 0, - y: 0 - }; - - this._create(); -} - -// inherit EvEmitter -var proto = Item.prototype = Object.create( EvEmitter.prototype ); -proto.constructor = Item; - -proto._create = function() { - // transition objects - this._transn = { - ingProperties: {}, - clean: {}, - onEnd: {} - }; - - this.css({ - position: 'absolute' - }); -}; - -// trigger specified handler for event type -proto.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -proto.getSize = function() { - this.size = getSize( this.element ); -}; - -/** - * apply CSS styles to element - * @param {Object} style - */ -proto.css = function( style ) { - var elemStyle = this.element.style; - - for ( var prop in style ) { - // use vendor property if available - var supportedProp = vendorProperties[ prop ] || prop; - elemStyle[ supportedProp ] = style[ prop ]; - } -}; - - // measure position, and sets it -proto.getPosition = function() { - var style = getComputedStyle( this.element ); - var isOriginLeft = this.layout._getOption('originLeft'); - var isOriginTop = this.layout._getOption('originTop'); - var xValue = style[ isOriginLeft ? 'left' : 'right' ]; - var yValue = style[ isOriginTop ? 'top' : 'bottom' ]; - var x = parseFloat( xValue ); - var y = parseFloat( yValue ); - // convert percent to pixels - var layoutSize = this.layout.size; - if ( xValue.indexOf('%') != -1 ) { - x = ( x / 100 ) * layoutSize.width; - } - if ( yValue.indexOf('%') != -1 ) { - y = ( y / 100 ) * layoutSize.height; - } - // clean up 'auto' or other non-integer values - x = isNaN( x ) ? 0 : x; - y = isNaN( y ) ? 0 : y; - // remove padding from measurement - x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight; - y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom; - - this.position.x = x; - this.position.y = y; -}; - -// set settled position, apply padding -proto.layoutPosition = function() { - var layoutSize = this.layout.size; - var style = {}; - var isOriginLeft = this.layout._getOption('originLeft'); - var isOriginTop = this.layout._getOption('originTop'); - - // x - var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight'; - var xProperty = isOriginLeft ? 'left' : 'right'; - var xResetProperty = isOriginLeft ? 'right' : 'left'; - - var x = this.position.x + layoutSize[ xPadding ]; - // set in percentage or pixels - style[ xProperty ] = this.getXValue( x ); - // reset other property - style[ xResetProperty ] = ''; - - // y - var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom'; - var yProperty = isOriginTop ? 'top' : 'bottom'; - var yResetProperty = isOriginTop ? 'bottom' : 'top'; - - var y = this.position.y + layoutSize[ yPadding ]; - // set in percentage or pixels - style[ yProperty ] = this.getYValue( y ); - // reset other property - style[ yResetProperty ] = ''; - - this.css( style ); - this.emitEvent( 'layout', [ this ] ); -}; - -proto.getXValue = function( x ) { - var isHorizontal = this.layout._getOption('horizontal'); - return this.layout.options.percentPosition && !isHorizontal ? - ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px'; -}; - -proto.getYValue = function( y ) { - var isHorizontal = this.layout._getOption('horizontal'); - return this.layout.options.percentPosition && isHorizontal ? - ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px'; -}; - -proto._transitionTo = function( x, y ) { - this.getPosition(); - // get current x & y from top/left - var curX = this.position.x; - var curY = this.position.y; - - var didNotMove = x == this.position.x && y == this.position.y; - - // save end position - this.setPosition( x, y ); - - // if did not move and not transitioning, just go to layout - if ( didNotMove && !this.isTransitioning ) { - this.layoutPosition(); - return; - } - - var transX = x - curX; - var transY = y - curY; - var transitionStyle = {}; - transitionStyle.transform = this.getTranslate( transX, transY ); - - this.transition({ - to: transitionStyle, - onTransitionEnd: { - transform: this.layoutPosition - }, - isCleaning: true - }); -}; - -proto.getTranslate = function( x, y ) { - // flip cooridinates if origin on right or bottom - var isOriginLeft = this.layout._getOption('originLeft'); - var isOriginTop = this.layout._getOption('originTop'); - x = isOriginLeft ? x : -x; - y = isOriginTop ? y : -y; - return 'translate3d(' + x + 'px, ' + y + 'px, 0)'; -}; - -// non transition + transform support -proto.goTo = function( x, y ) { - this.setPosition( x, y ); - this.layoutPosition(); -}; - -proto.moveTo = proto._transitionTo; - -proto.setPosition = function( x, y ) { - this.position.x = parseFloat( x ); - this.position.y = parseFloat( y ); -}; - -// ----- transition ----- // - -/** - * @param {Object} style - CSS - * @param {Function} onTransitionEnd - */ - -// non transition, just trigger callback -proto._nonTransition = function( args ) { - this.css( args.to ); - if ( args.isCleaning ) { - this._removeStyles( args.to ); - } - for ( var prop in args.onTransitionEnd ) { - args.onTransitionEnd[ prop ].call( this ); - } -}; - -/** - * proper transition - * @param {Object} args - arguments - * @param {Object} to - style to transition to - * @param {Object} from - style to start transition from - * @param {Boolean} isCleaning - removes transition styles after transition - * @param {Function} onTransitionEnd - callback - */ -proto.transition = function( args ) { - // redirect to nonTransition if no transition duration - if ( !parseFloat( this.layout.options.transitionDuration ) ) { - this._nonTransition( args ); - return; - } - - var _transition = this._transn; - // keep track of onTransitionEnd callback by css property - for ( var prop in args.onTransitionEnd ) { - _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ]; - } - // keep track of properties that are transitioning - for ( prop in args.to ) { - _transition.ingProperties[ prop ] = true; - // keep track of properties to clean up when transition is done - if ( args.isCleaning ) { - _transition.clean[ prop ] = true; - } - } - - // set from styles - if ( args.from ) { - this.css( args.from ); - // force redraw. http://blog.alexmaccaw.com/css-transitions - var h = this.element.offsetHeight; - // hack for JSHint to hush about unused var - h = null; - } - // enable transition - this.enableTransition( args.to ); - // set styles that are transitioning - this.css( args.to ); - - this.isTransitioning = true; - -}; - -// dash before all cap letters, including first for -// WebkitTransform => -webkit-transform -function toDashedAll( str ) { - return str.replace( /([A-Z])/g, function( $1 ) { - return '-' + $1.toLowerCase(); - }); -} - -var transitionProps = 'opacity,' + toDashedAll( transformProperty ); - -proto.enableTransition = function(/* style */) { - // HACK changing transitionProperty during a transition - // will cause transition to jump - if ( this.isTransitioning ) { - return; - } - - // make `transition: foo, bar, baz` from style object - // HACK un-comment this when enableTransition can work - // while a transition is happening - // var transitionValues = []; - // for ( var prop in style ) { - // // dash-ify camelCased properties like WebkitTransition - // prop = vendorProperties[ prop ] || prop; - // transitionValues.push( toDashedAll( prop ) ); - // } - // munge number to millisecond, to match stagger - var duration = this.layout.options.transitionDuration; - duration = typeof duration == 'number' ? duration + 'ms' : duration; - // enable transition styles - this.css({ - transitionProperty: transitionProps, - transitionDuration: duration, - transitionDelay: this.staggerDelay || 0 - }); - // listen for transition end event - this.element.addEventListener( transitionEndEvent, this, false ); -}; - -// ----- events ----- // - -proto.onwebkitTransitionEnd = function( event ) { - this.ontransitionend( event ); -}; - -proto.onotransitionend = function( event ) { - this.ontransitionend( event ); -}; - -// properties that I munge to make my life easier -var dashedVendorProperties = { - '-webkit-transform': 'transform' -}; - -proto.ontransitionend = function( event ) { - // disregard bubbled events from children - if ( event.target !== this.element ) { - return; - } - var _transition = this._transn; - // get property name of transitioned property, convert to prefix-free - var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName; - - // remove property that has completed transitioning - delete _transition.ingProperties[ propertyName ]; - // check if any properties are still transitioning - if ( isEmptyObj( _transition.ingProperties ) ) { - // all properties have completed transitioning - this.disableTransition(); - } - // clean style - if ( propertyName in _transition.clean ) { - // clean up style - this.element.style[ event.propertyName ] = ''; - delete _transition.clean[ propertyName ]; - } - // trigger onTransitionEnd callback - if ( propertyName in _transition.onEnd ) { - var onTransitionEnd = _transition.onEnd[ propertyName ]; - onTransitionEnd.call( this ); - delete _transition.onEnd[ propertyName ]; - } - - this.emitEvent( 'transitionEnd', [ this ] ); -}; - -proto.disableTransition = function() { - this.removeTransitionStyles(); - this.element.removeEventListener( transitionEndEvent, this, false ); - this.isTransitioning = false; -}; - -/** - * removes style property from element - * @param {Object} style -**/ -proto._removeStyles = function( style ) { - // clean up transition styles - var cleanStyle = {}; - for ( var prop in style ) { - cleanStyle[ prop ] = ''; - } - this.css( cleanStyle ); -}; - -var cleanTransitionStyle = { - transitionProperty: '', - transitionDuration: '', - transitionDelay: '' -}; - -proto.removeTransitionStyles = function() { - // remove transition - this.css( cleanTransitionStyle ); -}; - -// ----- stagger ----- // - -proto.stagger = function( delay ) { - delay = isNaN( delay ) ? 0 : delay; - this.staggerDelay = delay + 'ms'; -}; - -// ----- show/hide/remove ----- // - -// remove element from DOM -proto.removeElem = function() { - this.element.parentNode.removeChild( this.element ); - // remove display: none - this.css({ display: '' }); - this.emitEvent( 'remove', [ this ] ); -}; - -proto.remove = function() { - // just remove element if no transition support or no transition - if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) { - this.removeElem(); - return; - } - - // start transition - this.once( 'transitionEnd', function() { - this.removeElem(); - }); - this.hide(); -}; - -proto.reveal = function() { - delete this.isHidden; - // remove display: none - this.css({ display: '' }); - - var options = this.layout.options; - - var onTransitionEnd = {}; - var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle'); - onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd; - - this.transition({ - from: options.hiddenStyle, - to: options.visibleStyle, - isCleaning: true, - onTransitionEnd: onTransitionEnd - }); -}; - -proto.onRevealTransitionEnd = function() { - // check if still visible - // during transition, item may have been hidden - if ( !this.isHidden ) { - this.emitEvent('reveal'); - } -}; - -/** - * get style property use for hide/reveal transition end - * @param {String} styleProperty - hiddenStyle/visibleStyle - * @returns {String} - */ -proto.getHideRevealTransitionEndProperty = function( styleProperty ) { - var optionStyle = this.layout.options[ styleProperty ]; - // use opacity - if ( optionStyle.opacity ) { - return 'opacity'; - } - // get first property - for ( var prop in optionStyle ) { - return prop; - } -}; - -proto.hide = function() { - // set flag - this.isHidden = true; - // remove display: none - this.css({ display: '' }); - - var options = this.layout.options; - - var onTransitionEnd = {}; - var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle'); - onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd; - - this.transition({ - from: options.visibleStyle, - to: options.hiddenStyle, - // keep hidden stuff hidden - isCleaning: true, - onTransitionEnd: onTransitionEnd - }); -}; - -proto.onHideTransitionEnd = function() { - // check if still hidden - // during transition, item may have been un-hidden - if ( this.isHidden ) { - this.css({ display: 'none' }); - this.emitEvent('hide'); - } -}; - -proto.destroy = function() { - this.css({ - position: '', - left: '', - right: '', - top: '', - bottom: '', - transition: '', - transform: '' - }); -}; - -return Item; - -})); - - -/***/ }), - -/***/ "./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js": -/*!*********************************************************************!*\ - !*** ./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js ***! - \*********************************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * EvEmitter v1.1.0 - * Lil' event emitter - * MIT License - */ - -/* jshint unused: true, undef: true, strict: true */ - -( function( global, factory ) { - // universal module definition - /* jshint strict: false */ /* globals define, module, window */ - if ( true ) { - // AMD - RequireJS - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( typeof window != 'undefined' ? window : this, function() { - -"use strict"; - -function EvEmitter() {} - -var proto = EvEmitter.prototype; - -proto.on = function( eventName, listener ) { - if ( !eventName || !listener ) { - return; - } - // set events hash - var events = this._events = this._events || {}; - // set listeners array - var listeners = events[ eventName ] = events[ eventName ] || []; - // only add once - if ( listeners.indexOf( listener ) == -1 ) { - listeners.push( listener ); - } - - return this; -}; - -proto.once = function( eventName, listener ) { - if ( !eventName || !listener ) { - return; - } - // add event - this.on( eventName, listener ); - // set once flag - // set onceEvents hash - var onceEvents = this._onceEvents = this._onceEvents || {}; - // set onceListeners object - var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {}; - // set flag - onceListeners[ listener ] = true; - - return this; -}; - -proto.off = function( eventName, listener ) { - var listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) { - return; - } - var index = listeners.indexOf( listener ); - if ( index != -1 ) { - listeners.splice( index, 1 ); - } - - return this; -}; - -proto.emitEvent = function( eventName, args ) { - var listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) { - return; - } - // copy over to avoid interference if .off() in listener - listeners = listeners.slice(0); - args = args || []; - // once stuff - var onceListeners = this._onceEvents && this._onceEvents[ eventName ]; - - for ( var i=0; i < listeners.length; i++ ) { - var listener = listeners[i] - var isOnce = onceListeners && onceListeners[ listener ]; - if ( isOnce ) { - // remove listener - // remove before trigger to prevent recursion - this.off( eventName, listener ); - // unset once flag - delete onceListeners[ listener ]; - } - // trigger listener - listener.apply( this, args ); - } - - return this; -}; - -proto.allOff = function() { - delete this._events; - delete this._onceEvents; -}; - -return EvEmitter; - -})); - - -/***/ }), - -/***/ "./node_modules/outlayer/outlayer.js": -/*!*******************************************!*\ - !*** ./node_modules/outlayer/outlayer.js ***! - \*******************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - * Outlayer v2.1.1 - * the brains and guts of a layout library - * MIT license - */ - -( function( window, factory ) { - 'use strict'; - // universal module definition - /* jshint strict: false */ /* globals define, module, require */ - if ( true ) { - // AMD - RequireJS - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js"), - __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js"), - __webpack_require__(/*! fizzy-ui-utils/utils */ "./node_modules/fizzy-ui-utils/utils.js"), - __webpack_require__(/*! ./item */ "./node_modules/outlayer/item.js") - ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( EvEmitter, getSize, utils, Item ) { - return factory( window, EvEmitter, getSize, utils, Item); - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( window, EvEmitter, getSize, utils, Item ) { -'use strict'; - -// ----- vars ----- // - -var console = window.console; -var jQuery = window.jQuery; -var noop = function() {}; - -// -------------------------- Outlayer -------------------------- // - -// globally unique identifiers -var GUID = 0; -// internal store of all Outlayer intances -var instances = {}; - - -/** - * @param {Element, String} element - * @param {Object} options - * @constructor - */ -function Outlayer( element, options ) { - var queryElement = utils.getQueryElement( element ); - if ( !queryElement ) { - if ( console ) { - console.error( 'Bad element for ' + this.constructor.namespace + - ': ' + ( queryElement || element ) ); - } - return; - } - this.element = queryElement; - // add jQuery - if ( jQuery ) { - this.$element = jQuery( this.element ); - } - - // options - this.options = utils.extend( {}, this.constructor.defaults ); - this.option( options ); - - // add id for Outlayer.getFromElement - var id = ++GUID; - this.element.outlayerGUID = id; // expando - instances[ id ] = this; // associate via id - - // kick it off - this._create(); - - var isInitLayout = this._getOption('initLayout'); - if ( isInitLayout ) { - this.layout(); - } -} - -// settings are for internal use only -Outlayer.namespace = 'outlayer'; -Outlayer.Item = Item; - -// default options -Outlayer.defaults = { - containerStyle: { - position: 'relative' - }, - initLayout: true, - originLeft: true, - originTop: true, - resize: true, - resizeContainer: true, - // item options - transitionDuration: '0.4s', - hiddenStyle: { - opacity: 0, - transform: 'scale(0.001)' - }, - visibleStyle: { - opacity: 1, - transform: 'scale(1)' - } -}; - -var proto = Outlayer.prototype; -// inherit EvEmitter -utils.extend( proto, EvEmitter.prototype ); - -/** - * set options - * @param {Object} opts - */ -proto.option = function( opts ) { - utils.extend( this.options, opts ); -}; - -/** - * get backwards compatible option value, check old name - */ -proto._getOption = function( option ) { - var oldOption = this.constructor.compatOptions[ option ]; - return oldOption && this.options[ oldOption ] !== undefined ? - this.options[ oldOption ] : this.options[ option ]; -}; - -Outlayer.compatOptions = { - // currentName: oldName - initLayout: 'isInitLayout', - horizontal: 'isHorizontal', - layoutInstant: 'isLayoutInstant', - originLeft: 'isOriginLeft', - originTop: 'isOriginTop', - resize: 'isResizeBound', - resizeContainer: 'isResizingContainer' -}; - -proto._create = function() { - // get items from children - this.reloadItems(); - // elements that affect layout, but are not laid out - this.stamps = []; - this.stamp( this.options.stamp ); - // set container style - utils.extend( this.element.style, this.options.containerStyle ); - - // bind resize method - var canBindResize = this._getOption('resize'); - if ( canBindResize ) { - this.bindResize(); - } -}; - -// goes through all children again and gets bricks in proper order -proto.reloadItems = function() { - // collection of item elements - this.items = this._itemize( this.element.children ); -}; - - -/** - * turn elements into Outlayer.Items to be used in layout - * @param {Array or NodeList or HTMLElement} elems - * @returns {Array} items - collection of new Outlayer Items - */ -proto._itemize = function( elems ) { - - var itemElems = this._filterFindItemElements( elems ); - var Item = this.constructor.Item; - - // create new Outlayer Items for collection - var items = []; - for ( var i=0; i < itemElems.length; i++ ) { - var elem = itemElems[i]; - var item = new Item( elem, this ); - items.push( item ); - } - - return items; -}; - -/** - * get item elements to be used in layout - * @param {Array or NodeList or HTMLElement} elems - * @returns {Array} items - item elements - */ -proto._filterFindItemElements = function( elems ) { - return utils.filterFindElements( elems, this.options.itemSelector ); -}; - -/** - * getter method for getting item elements - * @returns {Array} elems - collection of item elements - */ -proto.getItemElements = function() { - return this.items.map( function( item ) { - return item.element; - }); -}; - -// ----- init & layout ----- // - -/** - * lays out all items - */ -proto.layout = function() { - this._resetLayout(); - this._manageStamps(); - - // don't animate first layout - var layoutInstant = this._getOption('layoutInstant'); - var isInstant = layoutInstant !== undefined ? - layoutInstant : !this._isLayoutInited; - this.layoutItems( this.items, isInstant ); - - // flag for initalized - this._isLayoutInited = true; -}; - -// _init is alias for layout -proto._init = proto.layout; - -/** - * logic before any new layout - */ -proto._resetLayout = function() { - this.getSize(); -}; - - -proto.getSize = function() { - this.size = getSize( this.element ); -}; - -/** - * get measurement from option, for columnWidth, rowHeight, gutter - * if option is String -> get element from selector string, & get size of element - * if option is Element -> get size of element - * else use option as a number - * - * @param {String} measurement - * @param {String} size - width or height - * @private - */ -proto._getMeasurement = function( measurement, size ) { - var option = this.options[ measurement ]; - var elem; - if ( !option ) { - // default to 0 - this[ measurement ] = 0; - } else { - // use option as an element - if ( typeof option == 'string' ) { - elem = this.element.querySelector( option ); - } else if ( option instanceof HTMLElement ) { - elem = option; - } - // use size of element, if element - this[ measurement ] = elem ? getSize( elem )[ size ] : option; - } -}; - -/** - * layout a collection of item elements - * @api public - */ -proto.layoutItems = function( items, isInstant ) { - items = this._getItemsForLayout( items ); - - this._layoutItems( items, isInstant ); - - this._postLayout(); -}; - -/** - * get the items to be laid out - * you may want to skip over some items - * @param {Array} items - * @returns {Array} items - */ -proto._getItemsForLayout = function( items ) { - return items.filter( function( item ) { - return !item.isIgnored; - }); -}; - -/** - * layout items - * @param {Array} items - * @param {Boolean} isInstant - */ -proto._layoutItems = function( items, isInstant ) { - this._emitCompleteOnItems( 'layout', items ); - - if ( !items || !items.length ) { - // no items, emit event with empty array - return; - } - - var queue = []; - - items.forEach( function( item ) { - // get x/y object from method - var position = this._getItemLayoutPosition( item ); - // enqueue - position.item = item; - position.isInstant = isInstant || item.isLayoutInstant; - queue.push( position ); - }, this ); - - this._processLayoutQueue( queue ); -}; - -/** - * get item layout position - * @param {Outlayer.Item} item - * @returns {Object} x and y position - */ -proto._getItemLayoutPosition = function( /* item */ ) { - return { - x: 0, - y: 0 - }; -}; - -/** - * iterate over array and position each item - * Reason being - separating this logic prevents 'layout invalidation' - * thx @paul_irish - * @param {Array} queue - */ -proto._processLayoutQueue = function( queue ) { - this.updateStagger(); - queue.forEach( function( obj, i ) { - this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i ); - }, this ); -}; - -// set stagger from option in milliseconds number -proto.updateStagger = function() { - var stagger = this.options.stagger; - if ( stagger === null || stagger === undefined ) { - this.stagger = 0; - return; - } - this.stagger = getMilliseconds( stagger ); - return this.stagger; -}; - -/** - * Sets position of item in DOM - * @param {Outlayer.Item} item - * @param {Number} x - horizontal position - * @param {Number} y - vertical position - * @param {Boolean} isInstant - disables transitions - */ -proto._positionItem = function( item, x, y, isInstant, i ) { - if ( isInstant ) { - // if not transition, just set CSS - item.goTo( x, y ); - } else { - item.stagger( i * this.stagger ); - item.moveTo( x, y ); - } -}; - -/** - * Any logic you want to do after each layout, - * i.e. size the container - */ -proto._postLayout = function() { - this.resizeContainer(); -}; - -proto.resizeContainer = function() { - var isResizingContainer = this._getOption('resizeContainer'); - if ( !isResizingContainer ) { - return; - } - var size = this._getContainerSize(); - if ( size ) { - this._setContainerMeasure( size.width, true ); - this._setContainerMeasure( size.height, false ); - } -}; - -/** - * Sets width or height of container if returned - * @returns {Object} size - * @param {Number} width - * @param {Number} height - */ -proto._getContainerSize = noop; - -/** - * @param {Number} measure - size of width or height - * @param {Boolean} isWidth - */ -proto._setContainerMeasure = function( measure, isWidth ) { - if ( measure === undefined ) { - return; - } - - var elemSize = this.size; - // add padding and border width if border box - if ( elemSize.isBorderBox ) { - measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight + - elemSize.borderLeftWidth + elemSize.borderRightWidth : - elemSize.paddingBottom + elemSize.paddingTop + - elemSize.borderTopWidth + elemSize.borderBottomWidth; - } - - measure = Math.max( measure, 0 ); - this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px'; -}; - -/** - * emit eventComplete on a collection of items events - * @param {String} eventName - * @param {Array} items - Outlayer.Items - */ -proto._emitCompleteOnItems = function( eventName, items ) { - var _this = this; - function onComplete() { - _this.dispatchEvent( eventName + 'Complete', null, [ items ] ); - } - - var count = items.length; - if ( !items || !count ) { - onComplete(); - return; - } - - var doneCount = 0; - function tick() { - doneCount++; - if ( doneCount == count ) { - onComplete(); - } - } - - // bind callback - items.forEach( function( item ) { - item.once( eventName, tick ); - }); -}; - -/** - * emits events via EvEmitter and jQuery events - * @param {String} type - name of event - * @param {Event} event - original event - * @param {Array} args - extra arguments - */ -proto.dispatchEvent = function( type, event, args ) { - // add original event to arguments - var emitArgs = event ? [ event ].concat( args ) : args; - this.emitEvent( type, emitArgs ); - - if ( jQuery ) { - // set this.$element - this.$element = this.$element || jQuery( this.element ); - if ( event ) { - // create jQuery event - var $event = jQuery.Event( event ); - $event.type = type; - this.$element.trigger( $event, args ); - } else { - // just trigger with type if no event available - this.$element.trigger( type, args ); - } - } -}; - -// -------------------------- ignore & stamps -------------------------- // - - -/** - * keep item in collection, but do not lay it out - * ignored items do not get skipped in layout - * @param {Element} elem - */ -proto.ignore = function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - item.isIgnored = true; - } -}; - -/** - * return item to layout collection - * @param {Element} elem - */ -proto.unignore = function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - delete item.isIgnored; - } -}; - -/** - * adds elements to stamps - * @param {NodeList, Array, Element, or String} elems - */ -proto.stamp = function( elems ) { - elems = this._find( elems ); - if ( !elems ) { - return; - } - - this.stamps = this.stamps.concat( elems ); - // ignore - elems.forEach( this.ignore, this ); -}; - -/** - * removes elements to stamps - * @param {NodeList, Array, or Element} elems - */ -proto.unstamp = function( elems ) { - elems = this._find( elems ); - if ( !elems ){ - return; - } - - elems.forEach( function( elem ) { - // filter out removed stamp elements - utils.removeFrom( this.stamps, elem ); - this.unignore( elem ); - }, this ); -}; - -/** - * finds child elements - * @param {NodeList, Array, Element, or String} elems - * @returns {Array} elems - */ -proto._find = function( elems ) { - if ( !elems ) { - return; - } - // if string, use argument as selector string - if ( typeof elems == 'string' ) { - elems = this.element.querySelectorAll( elems ); - } - elems = utils.makeArray( elems ); - return elems; -}; - -proto._manageStamps = function() { - if ( !this.stamps || !this.stamps.length ) { - return; - } - - this._getBoundingRect(); - - this.stamps.forEach( this._manageStamp, this ); -}; - -// update boundingLeft / Top -proto._getBoundingRect = function() { - // get bounding rect for container element - var boundingRect = this.element.getBoundingClientRect(); - var size = this.size; - this._boundingRect = { - left: boundingRect.left + size.paddingLeft + size.borderLeftWidth, - top: boundingRect.top + size.paddingTop + size.borderTopWidth, - right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ), - bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth ) - }; -}; - -/** - * @param {Element} stamp -**/ -proto._manageStamp = noop; - -/** - * get x/y position of element relative to container element - * @param {Element} elem - * @returns {Object} offset - has left, top, right, bottom - */ -proto._getElementOffset = function( elem ) { - var boundingRect = elem.getBoundingClientRect(); - var thisRect = this._boundingRect; - var size = getSize( elem ); - var offset = { - left: boundingRect.left - thisRect.left - size.marginLeft, - top: boundingRect.top - thisRect.top - size.marginTop, - right: thisRect.right - boundingRect.right - size.marginRight, - bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom - }; - return offset; -}; - -// -------------------------- resize -------------------------- // - -// enable event handlers for listeners -// i.e. resize -> onresize -proto.handleEvent = utils.handleEvent; - -/** - * Bind layout to window resizing - */ -proto.bindResize = function() { - window.addEventListener( 'resize', this ); - this.isResizeBound = true; -}; - -/** - * Unbind layout to window resizing - */ -proto.unbindResize = function() { - window.removeEventListener( 'resize', this ); - this.isResizeBound = false; -}; - -proto.onresize = function() { - this.resize(); -}; - -utils.debounceMethod( Outlayer, 'onresize', 100 ); - -proto.resize = function() { - // don't trigger if size did not change - // or if resize was unbound. See #9 - if ( !this.isResizeBound || !this.needsResizeLayout() ) { - return; - } - - this.layout(); -}; - -/** - * check if layout is needed post layout - * @returns Boolean - */ -proto.needsResizeLayout = function() { - var size = getSize( this.element ); - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var hasSizes = this.size && size; - return hasSizes && size.innerWidth !== this.size.innerWidth; -}; - -// -------------------------- methods -------------------------- // - -/** - * add items to Outlayer instance - * @param {Array or NodeList or Element} elems - * @returns {Array} items - Outlayer.Items -**/ -proto.addItems = function( elems ) { - var items = this._itemize( elems ); - // add items to collection - if ( items.length ) { - this.items = this.items.concat( items ); - } - return items; -}; - -/** - * Layout newly-appended item elements - * @param {Array or NodeList or Element} elems - */ -proto.appended = function( elems ) { - var items = this.addItems( elems ); - if ( !items.length ) { - return; - } - // layout and reveal just the new items - this.layoutItems( items, true ); - this.reveal( items ); -}; - -/** - * Layout prepended elements - * @param {Array or NodeList or Element} elems - */ -proto.prepended = function( elems ) { - var items = this._itemize( elems ); - if ( !items.length ) { - return; - } - // add items to beginning of collection - var previousItems = this.items.slice(0); - this.items = items.concat( previousItems ); - // start new layout - this._resetLayout(); - this._manageStamps(); - // layout new stuff without transition - this.layoutItems( items, true ); - this.reveal( items ); - // layout previous items - this.layoutItems( previousItems ); -}; - -/** - * reveal a collection of items - * @param {Array of Outlayer.Items} items - */ -proto.reveal = function( items ) { - this._emitCompleteOnItems( 'reveal', items ); - if ( !items || !items.length ) { - return; - } - var stagger = this.updateStagger(); - items.forEach( function( item, i ) { - item.stagger( i * stagger ); - item.reveal(); - }); -}; - -/** - * hide a collection of items - * @param {Array of Outlayer.Items} items - */ -proto.hide = function( items ) { - this._emitCompleteOnItems( 'hide', items ); - if ( !items || !items.length ) { - return; - } - var stagger = this.updateStagger(); - items.forEach( function( item, i ) { - item.stagger( i * stagger ); - item.hide(); - }); -}; - -/** - * reveal item elements - * @param {Array}, {Element}, {NodeList} items - */ -proto.revealItemElements = function( elems ) { - var items = this.getItems( elems ); - this.reveal( items ); -}; - -/** - * hide item elements - * @param {Array}, {Element}, {NodeList} items - */ -proto.hideItemElements = function( elems ) { - var items = this.getItems( elems ); - this.hide( items ); -}; - -/** - * get Outlayer.Item, given an Element - * @param {Element} elem - * @param {Function} callback - * @returns {Outlayer.Item} item - */ -proto.getItem = function( elem ) { - // loop through items to get the one that matches - for ( var i=0; i < this.items.length; i++ ) { - var item = this.items[i]; - if ( item.element == elem ) { - // return item - return item; - } - } -}; - -/** - * get collection of Outlayer.Items, given Elements - * @param {Array} elems - * @returns {Array} items - Outlayer.Items - */ -proto.getItems = function( elems ) { - elems = utils.makeArray( elems ); - var items = []; - elems.forEach( function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - items.push( item ); - } - }, this ); - - return items; -}; - -/** - * remove element(s) from instance and DOM - * @param {Array or NodeList or Element} elems - */ -proto.remove = function( elems ) { - var removeItems = this.getItems( elems ); - - this._emitCompleteOnItems( 'remove', removeItems ); - - // bail if no items to remove - if ( !removeItems || !removeItems.length ) { - return; - } - - removeItems.forEach( function( item ) { - item.remove(); - // remove item from collection - utils.removeFrom( this.items, item ); - }, this ); -}; - -// ----- destroy ----- // - -// remove and disable Outlayer instance -proto.destroy = function() { - // clean up dynamic styles - var style = this.element.style; - style.height = ''; - style.position = ''; - style.width = ''; - // destroy items - this.items.forEach( function( item ) { - item.destroy(); - }); - - this.unbindResize(); - - var id = this.element.outlayerGUID; - delete instances[ id ]; // remove reference to instance by id - delete this.element.outlayerGUID; - // remove data for jQuery - if ( jQuery ) { - jQuery.removeData( this.element, this.constructor.namespace ); - } - -}; - -// -------------------------- data -------------------------- // - -/** - * get Outlayer instance from element - * @param {Element} elem - * @returns {Outlayer} - */ -Outlayer.data = function( elem ) { - elem = utils.getQueryElement( elem ); - var id = elem && elem.outlayerGUID; - return id && instances[ id ]; -}; - - -// -------------------------- create Outlayer class -------------------------- // - -/** - * create a layout class - * @param {String} namespace - */ -Outlayer.create = function( namespace, options ) { - // sub-class Outlayer - var Layout = subclass( Outlayer ); - // apply new options and compatOptions - Layout.defaults = utils.extend( {}, Outlayer.defaults ); - utils.extend( Layout.defaults, options ); - Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions ); - - Layout.namespace = namespace; - - Layout.data = Outlayer.data; - - // sub-class Item - Layout.Item = subclass( Item ); - - // -------------------------- declarative -------------------------- // - - utils.htmlInit( Layout, namespace ); - - // -------------------------- jQuery bridge -------------------------- // - - // make into jQuery plugin - if ( jQuery && jQuery.bridget ) { - jQuery.bridget( namespace, Layout ); - } - - return Layout; -}; - -function subclass( Parent ) { - function SubClass() { - Parent.apply( this, arguments ); - } - - SubClass.prototype = Object.create( Parent.prototype ); - SubClass.prototype.constructor = SubClass; - - return SubClass; -} - -// ----- helpers ----- // - -// how many milliseconds are in each unit -var msUnits = { - ms: 1, - s: 1000 -}; - -// munge time-like parameter into millisecond number -// '0.4s' -> 40 -function getMilliseconds( time ) { - if ( typeof time == 'number' ) { - return time; - } - var matches = time.match( /(^\d*\.?\d*)(\w*)/ ); - var num = matches && matches[1]; - var unit = matches && matches[2]; - if ( !num.length ) { - return 0; - } - num = parseFloat( num ); - var mult = msUnits[ unit ] || 1; - return num * mult; -} - -// ----- fin ----- // - -// back in global -Outlayer.Item = Item; - -return Outlayer; - -})); - - -/***/ }), - -/***/ "./node_modules/react/cjs/react-jsx-runtime.development.js": -/*!*****************************************************************!*\ - !*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -"use strict"; -/** - * @license React - * react-jsx-runtime.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - - -if (true) { - (function() { -'use strict'; - -var React = __webpack_require__(/*! react */ "react"); - -// ATTENTION -// When adding new symbols to this file, -// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' -// The Symbol used to tag the ReactElement-like types. -var REACT_ELEMENT_TYPE = Symbol.for('react.element'); -var REACT_PORTAL_TYPE = Symbol.for('react.portal'); -var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); -var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); -var REACT_PROFILER_TYPE = Symbol.for('react.profiler'); -var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); -var REACT_CONTEXT_TYPE = Symbol.for('react.context'); -var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); -var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'); -var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list'); -var REACT_MEMO_TYPE = Symbol.for('react.memo'); -var REACT_LAZY_TYPE = Symbol.for('react.lazy'); -var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen'); -var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; -var FAUX_ITERATOR_SYMBOL = '@@iterator'; -function getIteratorFn(maybeIterable) { - if (maybeIterable === null || typeof maybeIterable !== 'object') { - return null; - } - - var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; - - if (typeof maybeIterator === 'function') { - return maybeIterator; - } - - return null; -} - -var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - -function error(format) { - { - { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - - printWarning('error', format, args); - } - } -} - -function printWarning(level, format, args) { - // When changing this logic, you might want to also - // update consoleWithStackDev.www.js as well. - { - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); - - if (stack !== '') { - format += '%s'; - args = args.concat([stack]); - } // eslint-disable-next-line react-internal/safe-string-coercion - - - var argsWithFormat = args.map(function (item) { - return String(item); - }); // Careful: RN currently depends on this prefix - - argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it - // breaks IE9: https://github.com/facebook/react/issues/13610 - // eslint-disable-next-line react-internal/no-production-logging - - Function.prototype.apply.call(console[level], console, argsWithFormat); - } -} - -// ----------------------------------------------------------------------------- - -var enableScopeAPI = false; // Experimental Create Event Handle API. -var enableCacheElement = false; -var enableTransitionTracing = false; // No known bugs, but needs performance testing - -var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber -// stuff. Intended to enable React core members to more easily debug scheduling -// issues in DEV builds. - -var enableDebugTracing = false; // Track which Fiber(s) schedule render work. - -var REACT_MODULE_REFERENCE; - -{ - REACT_MODULE_REFERENCE = Symbol.for('react.module.reference'); -} - -function isValidElementType(type) { - if (typeof type === 'string' || typeof type === 'function') { - return true; - } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). - - - if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) { - return true; - } - - if (typeof type === 'object' && type !== null) { - if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object - // types supported by any Flight configuration anywhere since - // we don't know which Flight build this will end up being used - // with. - type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) { - return true; - } - } - - return false; -} - -function getWrappedName(outerType, innerType, wrapperName) { - var displayName = outerType.displayName; - - if (displayName) { - return displayName; - } - - var functionName = innerType.displayName || innerType.name || ''; - return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName; -} // Keep in sync with react-reconciler/getComponentNameFromFiber - - -function getContextName(type) { - return type.displayName || 'Context'; -} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. - - -function getComponentNameFromType(type) { - if (type == null) { - // Host root, text node or just invalid type. - return null; - } - - { - if (typeof type.tag === 'number') { - error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.'); - } - } - - if (typeof type === 'function') { - return type.displayName || type.name || null; - } - - if (typeof type === 'string') { - return type; - } - - switch (type) { - case REACT_FRAGMENT_TYPE: - return 'Fragment'; - - case REACT_PORTAL_TYPE: - return 'Portal'; - - case REACT_PROFILER_TYPE: - return 'Profiler'; - - case REACT_STRICT_MODE_TYPE: - return 'StrictMode'; - - case REACT_SUSPENSE_TYPE: - return 'Suspense'; - - case REACT_SUSPENSE_LIST_TYPE: - return 'SuspenseList'; - - } - - if (typeof type === 'object') { - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - var context = type; - return getContextName(context) + '.Consumer'; - - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + '.Provider'; - - case REACT_FORWARD_REF_TYPE: - return getWrappedName(type, type.render, 'ForwardRef'); - - case REACT_MEMO_TYPE: - var outerName = type.displayName || null; - - if (outerName !== null) { - return outerName; - } - - return getComponentNameFromType(type.type) || 'Memo'; - - case REACT_LAZY_TYPE: - { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - - try { - return getComponentNameFromType(init(payload)); - } catch (x) { - return null; - } - } - - // eslint-disable-next-line no-fallthrough - } - } - - return null; -} - -var assign = Object.assign; - -// Helpers to patch console.logs to avoid logging during side-effect free -// replaying on render function. This currently only patches the object -// lazily which won't cover if the log function was extracted eagerly. -// We could also eagerly patch the method. -var disabledDepth = 0; -var prevLog; -var prevInfo; -var prevWarn; -var prevError; -var prevGroup; -var prevGroupCollapsed; -var prevGroupEnd; - -function disabledLog() {} - -disabledLog.__reactDisabledLog = true; -function disableLogs() { - { - if (disabledDepth === 0) { - /* eslint-disable react-internal/no-production-logging */ - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099 - - var props = { - configurable: true, - enumerable: true, - value: disabledLog, - writable: true - }; // $FlowFixMe Flow thinks console is immutable. - - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - /* eslint-enable react-internal/no-production-logging */ - } - - disabledDepth++; - } -} -function reenableLogs() { - { - disabledDepth--; - - if (disabledDepth === 0) { - /* eslint-disable react-internal/no-production-logging */ - var props = { - configurable: true, - enumerable: true, - writable: true - }; // $FlowFixMe Flow thinks console is immutable. - - Object.defineProperties(console, { - log: assign({}, props, { - value: prevLog - }), - info: assign({}, props, { - value: prevInfo - }), - warn: assign({}, props, { - value: prevWarn - }), - error: assign({}, props, { - value: prevError - }), - group: assign({}, props, { - value: prevGroup - }), - groupCollapsed: assign({}, props, { - value: prevGroupCollapsed - }), - groupEnd: assign({}, props, { - value: prevGroupEnd - }) - }); - /* eslint-enable react-internal/no-production-logging */ - } - - if (disabledDepth < 0) { - error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.'); - } - } -} - -var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; -var prefix; -function describeBuiltInComponentFrame(name, source, ownerFn) { - { - if (prefix === undefined) { - // Extract the VM specific prefix used by each line. - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = match && match[1] || ''; - } - } // We use the prefix to ensure our stacks line up with native stack frames. - - - return '\n' + prefix + name; - } -} -var reentry = false; -var componentFrameCache; - -{ - var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; - componentFrameCache = new PossiblyWeakMap(); -} - -function describeNativeComponentFrame(fn, construct) { - // If something asked for a stack inside a fake render, it should get ignored. - if ( !fn || reentry) { - return ''; - } - - { - var frame = componentFrameCache.get(fn); - - if (frame !== undefined) { - return frame; - } - } - - var control; - reentry = true; - var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined. - - Error.prepareStackTrace = undefined; - var previousDispatcher; - - { - previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function - // for warnings. - - ReactCurrentDispatcher.current = null; - disableLogs(); - } - - try { - // This should throw. - if (construct) { - // Something should be setting the props in the constructor. - var Fake = function () { - throw Error(); - }; // $FlowFixMe - - - Object.defineProperty(Fake.prototype, 'props', { - set: function () { - // We use a throwing setter instead of frozen or non-writable props - // because that won't throw in a non-strict mode function. - throw Error(); - } - }); - - if (typeof Reflect === 'object' && Reflect.construct) { - // We construct a different control for this case to include any extra - // frames added by the construct call. - try { - Reflect.construct(Fake, []); - } catch (x) { - control = x; - } - - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x) { - control = x; - } - - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x) { - control = x; - } - - fn(); - } - } catch (sample) { - // This is inlined manually because closure doesn't do it for us. - if (sample && control && typeof sample.stack === 'string') { - // This extracts the first frame from the sample that isn't also in the control. - // Skipping one frame that we assume is the frame that calls the two. - var sampleLines = sample.stack.split('\n'); - var controlLines = control.stack.split('\n'); - var s = sampleLines.length - 1; - var c = controlLines.length - 1; - - while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { - // We expect at least one stack frame to be shared. - // Typically this will be the root most one. However, stack frames may be - // cut off due to maximum stack limits. In this case, one maybe cut off - // earlier than the other. We assume that the sample is longer or the same - // and there for cut off earlier. So we should find the root most frame in - // the sample somewhere in the control. - c--; - } - - for (; s >= 1 && c >= 0; s--, c--) { - // Next we find the first one that isn't the same which should be the - // frame that called our sample function and the control. - if (sampleLines[s] !== controlLines[c]) { - // In V8, the first line is describing the message but other VMs don't. - // If we're about to return the first line, and the control is also on the same - // line, that's a pretty good indicator that our sample threw at same line as - // the control. I.e. before we entered the sample frame. So we ignore this result. - // This can happen if you passed a class to function component, or non-function. - if (s !== 1 || c !== 1) { - do { - s--; - c--; // We may still have similar intermediate frames from the construct call. - // The next one that isn't the same should be our match though. - - if (c < 0 || sampleLines[s] !== controlLines[c]) { - // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier. - var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "" - // but we have a user-provided "displayName" - // splice it in to make the stack more readable. - - - if (fn.displayName && _frame.includes('')) { - _frame = _frame.replace('', fn.displayName); - } - - { - if (typeof fn === 'function') { - componentFrameCache.set(fn, _frame); - } - } // Return the line we found. - - - return _frame; - } - } while (s >= 1 && c >= 0); - } - - break; - } - } - } - } finally { - reentry = false; - - { - ReactCurrentDispatcher.current = previousDispatcher; - reenableLogs(); - } - - Error.prepareStackTrace = previousPrepareStackTrace; - } // Fallback to just using the name if we couldn't make it throw. - - - var name = fn ? fn.displayName || fn.name : ''; - var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ''; - - { - if (typeof fn === 'function') { - componentFrameCache.set(fn, syntheticFrame); - } - } - - return syntheticFrame; -} -function describeFunctionComponentFrame(fn, source, ownerFn) { - { - return describeNativeComponentFrame(fn, false); - } -} - -function shouldConstruct(Component) { - var prototype = Component.prototype; - return !!(prototype && prototype.isReactComponent); -} - -function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { - - if (type == null) { - return ''; - } - - if (typeof type === 'function') { - { - return describeNativeComponentFrame(type, shouldConstruct(type)); - } - } - - if (typeof type === 'string') { - return describeBuiltInComponentFrame(type); - } - - switch (type) { - case REACT_SUSPENSE_TYPE: - return describeBuiltInComponentFrame('Suspense'); - - case REACT_SUSPENSE_LIST_TYPE: - return describeBuiltInComponentFrame('SuspenseList'); - } - - if (typeof type === 'object') { - switch (type.$$typeof) { - case REACT_FORWARD_REF_TYPE: - return describeFunctionComponentFrame(type.render); - - case REACT_MEMO_TYPE: - // Memo may contain any component type so we recursively resolve it. - return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); - - case REACT_LAZY_TYPE: - { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - - try { - // Lazy may contain any component type so we recursively resolve it. - return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); - } catch (x) {} - } - } - } - - return ''; -} - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -var loggedTypeFailures = {}; -var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - -function setCurrentlyValidatingElement(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame.setExtraStackFrame(null); - } - } -} - -function checkPropTypes(typeSpecs, values, location, componentName, element) { - { - // $FlowFixMe This is okay but Flow doesn't know it. - var has = Function.call.bind(hasOwnProperty); - - for (var typeSpecName in typeSpecs) { - if (has(typeSpecs, typeSpecName)) { - var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - if (typeof typeSpecs[typeSpecName] !== 'function') { - // eslint-disable-next-line react-internal/prod-error-codes - var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'); - err.name = 'Invariant Violation'; - throw err; - } - - error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'); - } catch (ex) { - error$1 = ex; - } - - if (error$1 && !(error$1 instanceof Error)) { - setCurrentlyValidatingElement(element); - - error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1); - - setCurrentlyValidatingElement(null); - } - - if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error$1.message] = true; - setCurrentlyValidatingElement(element); - - error('Failed %s type: %s', location, error$1.message); - - setCurrentlyValidatingElement(null); - } - } - } - } -} - -var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare - -function isArray(a) { - return isArrayImpl(a); -} - -/* - * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol - * and Temporal.* types. See https://github.com/facebook/react/pull/22064. - * - * The functions in this module will throw an easier-to-understand, - * easier-to-debug exception with a clear errors message message explaining the - * problem. (Instead of a confusing exception thrown inside the implementation - * of the `value` object). - */ -// $FlowFixMe only called in DEV, so void return is not possible. -function typeName(value) { - { - // toStringTag is needed for namespaced types like Temporal.Instant - var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag; - var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; - return type; - } -} // $FlowFixMe only called in DEV, so void return is not possible. - - -function willCoercionThrow(value) { - { - try { - testStringCoercion(value); - return false; - } catch (e) { - return true; - } - } -} - -function testStringCoercion(value) { - // If you ended up here by following an exception call stack, here's what's - // happened: you supplied an object or symbol value to React (as a prop, key, - // DOM attribute, CSS property, string ref, etc.) and when React tried to - // coerce it to a string using `'' + value`, an exception was thrown. - // - // The most common types that will cause this exception are `Symbol` instances - // and Temporal objects like `Temporal.Instant`. But any object that has a - // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this - // exception. (Library authors do this to prevent users from using built-in - // numeric operators like `+` or comparison operators like `>=` because custom - // methods are needed to perform accurate arithmetic or comparison.) - // - // To fix the problem, coerce this object or symbol value to a string before - // passing it to React. The most reliable way is usually `String(value)`. - // - // To find which value is throwing, check the browser or debugger console. - // Before this exception was thrown, there should be `console.error` output - // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the - // problem and how that type was used: key, atrribute, input value prop, etc. - // In most cases, this console output also shows the component and its - // ancestor components where the exception happened. - // - // eslint-disable-next-line react-internal/safe-string-coercion - return '' + value; -} -function checkKeyStringCoercion(value) { - { - if (willCoercionThrow(value)) { - error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value)); - - return testStringCoercion(value); // throw (to help callers find troubleshooting comments) - } - } -} - -var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; -var RESERVED_PROPS = { - key: true, - ref: true, - __self: true, - __source: true -}; -var specialPropKeyWarningShown; -var specialPropRefWarningShown; -var didWarnAboutStringRefs; - -{ - didWarnAboutStringRefs = {}; -} - -function hasValidRef(config) { - { - if (hasOwnProperty.call(config, 'ref')) { - var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; - - if (getter && getter.isReactWarning) { - return false; - } - } - } - - return config.ref !== undefined; -} - -function hasValidKey(config) { - { - if (hasOwnProperty.call(config, 'key')) { - var getter = Object.getOwnPropertyDescriptor(config, 'key').get; - - if (getter && getter.isReactWarning) { - return false; - } - } - } - - return config.key !== undefined; -} - -function warnIfStringRefCannotBeAutoConverted(config, self) { - { - if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) { - var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); - - if (!didWarnAboutStringRefs[componentName]) { - error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref); - - didWarnAboutStringRefs[componentName] = true; - } - } - } -} - -function defineKeyPropWarningGetter(props, displayName) { - { - var warnAboutAccessingKey = function () { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - - error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); - } - }; - - warnAboutAccessingKey.isReactWarning = true; - Object.defineProperty(props, 'key', { - get: warnAboutAccessingKey, - configurable: true - }); - } -} - -function defineRefPropWarningGetter(props, displayName) { - { - var warnAboutAccessingRef = function () { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - - error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); - } - }; - - warnAboutAccessingRef.isReactWarning = true; - Object.defineProperty(props, 'ref', { - get: warnAboutAccessingRef, - configurable: true - }); - } -} -/** - * Factory method to create a new React element. This no longer adheres to - * the class pattern, so do not use new to call it. Also, instanceof check - * will not work. Instead test $$typeof field against Symbol.for('react.element') to check - * if something is a React Element. - * - * @param {*} type - * @param {*} props - * @param {*} key - * @param {string|object} ref - * @param {*} owner - * @param {*} self A *temporary* helper to detect places where `this` is - * different from the `owner` when React.createElement is called, so that we - * can warn. We want to get rid of owner and replace string `ref`s with arrow - * functions, and as long as `this` and owner are the same, there will be no - * change in behavior. - * @param {*} source An annotation object (added by a transpiler or otherwise) - * indicating filename, line number, and/or other information. - * @internal - */ - - -var ReactElement = function (type, key, ref, self, source, owner, props) { - var element = { - // This tag allows us to uniquely identify this as a React Element - $$typeof: REACT_ELEMENT_TYPE, - // Built-in properties that belong on the element - type: type, - key: key, - ref: ref, - props: props, - // Record the component responsible for creating this element. - _owner: owner - }; - - { - // The validation flag is currently mutative. We put it on - // an external backing store so that we can freeze the whole object. - // This can be replaced with a WeakMap once they are implemented in - // commonly used development environments. - element._store = {}; // To make comparing ReactElements easier for testing purposes, we make - // the validation flag non-enumerable (where possible, which should - // include every environment we run tests in), so the test framework - // ignores it. - - Object.defineProperty(element._store, 'validated', { - configurable: false, - enumerable: false, - writable: true, - value: false - }); // self and source are DEV only properties. - - Object.defineProperty(element, '_self', { - configurable: false, - enumerable: false, - writable: false, - value: self - }); // Two elements created in two different places should be considered - // equal for testing purposes and therefore we hide it from enumeration. - - Object.defineProperty(element, '_source', { - configurable: false, - enumerable: false, - writable: false, - value: source - }); - - if (Object.freeze) { - Object.freeze(element.props); - Object.freeze(element); - } - } - - return element; -}; -/** - * https://github.com/reactjs/rfcs/pull/107 - * @param {*} type - * @param {object} props - * @param {string} key - */ - -function jsxDEV(type, config, maybeKey, source, self) { - { - var propName; // Reserved names are extracted - - var props = {}; - var key = null; - var ref = null; // Currently, key can be spread in as a prop. This causes a potential - // issue if key is also explicitly declared (ie.
- // or
). We want to deprecate key spread, - // but as an intermediary step, we will use jsxDEV for everything except - //
, because we aren't currently able to tell if - // key is explicitly declared to be undefined or not. - - if (maybeKey !== undefined) { - { - checkKeyStringCoercion(maybeKey); - } - - key = '' + maybeKey; - } - - if (hasValidKey(config)) { - { - checkKeyStringCoercion(config.key); - } - - key = '' + config.key; - } - - if (hasValidRef(config)) { - ref = config.ref; - warnIfStringRefCannotBeAutoConverted(config, self); - } // Remaining properties are added to a new props object - - - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config[propName]; - } - } // Resolve default props - - - if (type && type.defaultProps) { - var defaultProps = type.defaultProps; - - for (propName in defaultProps) { - if (props[propName] === undefined) { - props[propName] = defaultProps[propName]; - } - } - } - - if (key || ref) { - var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; - - if (key) { - defineKeyPropWarningGetter(props, displayName); - } - - if (ref) { - defineRefPropWarningGetter(props, displayName); - } - } - - return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); - } -} - -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; -var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; - -function setCurrentlyValidatingElement$1(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame$1.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame$1.setExtraStackFrame(null); - } - } -} - -var propTypesMisspellWarningShown; - -{ - propTypesMisspellWarningShown = false; -} -/** - * Verifies the object is a ReactElement. - * See https://reactjs.org/docs/react-api.html#isvalidelement - * @param {?object} object - * @return {boolean} True if `object` is a ReactElement. - * @final - */ - - -function isValidElement(object) { - { - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; - } -} - -function getDeclarationErrorAddendum() { - { - if (ReactCurrentOwner$1.current) { - var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); - - if (name) { - return '\n\nCheck the render method of `' + name + '`.'; - } - } - - return ''; - } -} - -function getSourceInfoErrorAddendum(source) { - { - if (source !== undefined) { - var fileName = source.fileName.replace(/^.*[\\\/]/, ''); - var lineNumber = source.lineNumber; - return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; - } - - return ''; - } -} -/** - * Warn if there's no key explicitly set on dynamic arrays of children or - * object keys are not valid. This allows us to keep track of children between - * updates. - */ - - -var ownerHasKeyUseWarning = {}; - -function getCurrentComponentErrorInfo(parentType) { - { - var info = getDeclarationErrorAddendum(); - - if (!info) { - var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; - - if (parentName) { - info = "\n\nCheck the top-level render call using <" + parentName + ">."; - } - } - - return info; - } -} -/** - * Warn if the element doesn't have an explicit key assigned to it. - * This element is in an array. The array could grow and shrink or be - * reordered. All children that haven't already been validated are required to - * have a "key" property assigned to it. Error statuses are cached so a warning - * will only be shown once. - * - * @internal - * @param {ReactElement} element Element that requires a key. - * @param {*} parentType element's parent's type. - */ - - -function validateExplicitKey(element, parentType) { - { - if (!element._store || element._store.validated || element.key != null) { - return; - } - - element._store.validated = true; - var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); - - if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { - return; - } - - ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a - // property, it may be the creator of the child that's responsible for - // assigning it a key. - - var childOwner = ''; - - if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { - // Give the component that originally created this child. - childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; - } - - setCurrentlyValidatingElement$1(element); - - error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); - - setCurrentlyValidatingElement$1(null); - } -} -/** - * Ensure that every element either is passed in a static location, in an - * array with an explicit keys property defined, or in an object literal - * with valid key property. - * - * @internal - * @param {ReactNode} node Statically passed child of any type. - * @param {*} parentType node's parent's type. - */ - - -function validateChildKeys(node, parentType) { - { - if (typeof node !== 'object') { - return; - } - - if (isArray(node)) { - for (var i = 0; i < node.length; i++) { - var child = node[i]; - - if (isValidElement(child)) { - validateExplicitKey(child, parentType); - } - } - } else if (isValidElement(node)) { - // This element was passed in a valid location. - if (node._store) { - node._store.validated = true; - } - } else if (node) { - var iteratorFn = getIteratorFn(node); - - if (typeof iteratorFn === 'function') { - // Entry iterators used to provide implicit keys, - // but now we print a separate warning for them later. - if (iteratorFn !== node.entries) { - var iterator = iteratorFn.call(node); - var step; - - while (!(step = iterator.next()).done) { - if (isValidElement(step.value)) { - validateExplicitKey(step.value, parentType); - } - } - } - } - } - } -} -/** - * Given an element, validate that its props follow the propTypes definition, - * provided by the type. - * - * @param {ReactElement} element - */ - - -function validatePropTypes(element) { - { - var type = element.type; - - if (type === null || type === undefined || typeof type === 'string') { - return; - } - - var propTypes; - - if (typeof type === 'function') { - propTypes = type.propTypes; - } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. - // Inner props are checked in the reconciler. - type.$$typeof === REACT_MEMO_TYPE)) { - propTypes = type.propTypes; - } else { - return; - } - - if (propTypes) { - // Intentionally inside to avoid triggering lazy initializers: - var name = getComponentNameFromType(type); - checkPropTypes(propTypes, element.props, 'prop', name, element); - } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { - propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers: - - var _name = getComponentNameFromType(type); - - error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown'); - } - - if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) { - error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); - } - } -} -/** - * Given a fragment, validate that it can only be provided with fragment props - * @param {ReactElement} fragment - */ - - -function validateFragmentProps(fragment) { - { - var keys = Object.keys(fragment.props); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - - if (key !== 'children' && key !== 'key') { - setCurrentlyValidatingElement$1(fragment); - - error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); - - setCurrentlyValidatingElement$1(null); - break; - } - } - - if (fragment.ref !== null) { - setCurrentlyValidatingElement$1(fragment); - - error('Invalid attribute `ref` supplied to `React.Fragment`.'); - - setCurrentlyValidatingElement$1(null); - } - } -} - -var didWarnAboutKeySpread = {}; -function jsxWithValidation(type, props, key, isStaticChildren, source, self) { - { - var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to - // succeed and there will likely be errors in render. - - if (!validType) { - var info = ''; - - if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { - info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; - } - - var sourceInfo = getSourceInfoErrorAddendum(source); - - if (sourceInfo) { - info += sourceInfo; - } else { - info += getDeclarationErrorAddendum(); - } - - var typeString; - - if (type === null) { - typeString = 'null'; - } else if (isArray(type)) { - typeString = 'array'; - } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { - typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />"; - info = ' Did you accidentally export a JSX literal instead of a component?'; - } else { - typeString = typeof type; - } - - error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); - } - - var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used. - // TODO: Drop this when these are no longer allowed as the type argument. - - if (element == null) { - return element; - } // Skip key warning if the type isn't valid since our key validation logic - // doesn't expect a non-string/function type and can throw confusing errors. - // We don't want exception behavior to differ between dev and prod. - // (Rendering will throw with a helpful message and as soon as the type is - // fixed, the key warnings will appear.) - - - if (validType) { - var children = props.children; - - if (children !== undefined) { - if (isStaticChildren) { - if (isArray(children)) { - for (var i = 0; i < children.length; i++) { - validateChildKeys(children[i], type); - } - - if (Object.freeze) { - Object.freeze(children); - } - } else { - error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.'); - } - } else { - validateChildKeys(children, type); - } - } - } - - { - if (hasOwnProperty.call(props, 'key')) { - var componentName = getComponentNameFromType(type); - var keys = Object.keys(props).filter(function (k) { - return k !== 'key'; - }); - var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}'; - - if (!didWarnAboutKeySpread[componentName + beforeExample]) { - var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}'; - - error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName); - - didWarnAboutKeySpread[componentName + beforeExample] = true; - } - } - } - - if (type === REACT_FRAGMENT_TYPE) { - validateFragmentProps(element); - } else { - validatePropTypes(element); - } - - return element; - } -} // These two functions exist to still get child warnings in dev -// even with the prod transform. This means that jsxDEV is purely -// opt-in behavior for better messages but that we won't stop -// giving you warnings if you use production apis. - -function jsxWithValidationStatic(type, props, key) { - { - return jsxWithValidation(type, props, key, true); - } -} -function jsxWithValidationDynamic(type, props, key) { - { - return jsxWithValidation(type, props, key, false); - } -} - -var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children. -// for now we can ship identical prod functions - -var jsxs = jsxWithValidationStatic ; - -exports.Fragment = REACT_FRAGMENT_TYPE; -exports.jsx = jsx; -exports.jsxs = jsxs; - })(); -} - - -/***/ }), - -/***/ "./node_modules/react/jsx-runtime.js": -/*!*******************************************!*\ - !*** ./node_modules/react/jsx-runtime.js ***! - \*******************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; - - -if (false) {} else { - module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "./node_modules/react/cjs/react-jsx-runtime.development.js"); -} - - -/***/ }), - -/***/ "./src/img/logos/giphy-powered.png": -/*!*****************************************!*\ - !*** ./src/img/logos/giphy-powered.png ***! - \*****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -module.exports = __webpack_require__.p + "images/giphy-powered.9748c37d.png"; - -/***/ }), - -/***/ "react": -/*!************************!*\ - !*** external "React" ***! - \************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["React"]; - -/***/ }), - -/***/ "@wordpress/block-editor": -/*!*************************************!*\ - !*** external ["wp","blockEditor"] ***! - \*************************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["blockEditor"]; - -/***/ }), - -/***/ "@wordpress/blocks": -/*!********************************!*\ - !*** external ["wp","blocks"] ***! - \********************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["blocks"]; - -/***/ }), - -/***/ "@wordpress/components": -/*!************************************!*\ - !*** external ["wp","components"] ***! - \************************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["components"]; - -/***/ }), - -/***/ "@wordpress/data": -/*!******************************!*\ - !*** external ["wp","data"] ***! - \******************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["data"]; - -/***/ }), - -/***/ "@wordpress/element": -/*!*********************************!*\ - !*** external ["wp","element"] ***! - \*********************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["element"]; - -/***/ }), - -/***/ "@wordpress/i18n": -/*!******************************!*\ - !*** external ["wp","i18n"] ***! - \******************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["i18n"]; - -/***/ }), - -/***/ "@wordpress/primitives": -/*!************************************!*\ - !*** external ["wp","primitives"] ***! - \************************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["primitives"]; - -/***/ }), - -/***/ "?9157": -/*!************************!*\ - !*** crypto (ignored) ***! - \************************/ -/***/ (() => { - -/* (ignored) */ - -/***/ }), - -/***/ "./node_modules/classnames/index.js": -/*!******************************************!*\ - !*** ./node_modules/classnames/index.js ***! - \******************************************/ -/***/ ((module, exports) => { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/* global define */ - -(function () { - 'use strict'; - - var hasOwn = {}.hasOwnProperty; - - function classNames () { - var classes = ''; - - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - if (arg) { - classes = appendClass(classes, parseValue(arg)); - } - } - - return classes; - } - - function parseValue (arg) { - if (typeof arg === 'string' || typeof arg === 'number') { - return arg; - } - - if (typeof arg !== 'object') { - return ''; - } - - if (Array.isArray(arg)) { - return classNames.apply(null, arg); - } - - if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { - return arg.toString(); - } - - var classes = ''; - - for (var key in arg) { - if (hasOwn.call(arg, key) && arg[key]) { - classes = appendClass(classes, key); - } - } - - return classes; - } - - function appendClass (value, newClass) { - if (!newClass) { - return value; - } - - if (value) { - return value + ' ' + newClass; - } - - return value + newClass; - } - - if ( true && module.exports) { - classNames.default = classNames; - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return classNames; - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}()); - - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/adapters.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/adapters/adapters.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _http_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./http.js */ "./node_modules/axios/lib/helpers/null.js"); -/* harmony import */ var _xhr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./xhr.js */ "./node_modules/axios/lib/adapters/xhr.js"); -/* harmony import */ var _fetch_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fetch.js */ "./node_modules/axios/lib/adapters/fetch.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - - - - - - -const knownAdapters = { - http: _http_js__WEBPACK_IMPORTED_MODULE_0__["default"], - xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_1__["default"], - fetch: _fetch_js__WEBPACK_IMPORTED_MODULE_2__["default"] -} - -_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(knownAdapters, (fn, value) => { - if (fn) { - try { - Object.defineProperty(fn, 'name', {value}); - } catch (e) { - // eslint-disable-next-line no-empty - } - Object.defineProperty(fn, 'adapterName', {value}); - } -}); - -const renderReason = (reason) => `- ${reason}`; - -const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(adapter) || adapter === null || adapter === false; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - getAdapter: (adapters) => { - adapters = _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isArray(adapters) ? adapters : [adapters]; - - const {length} = adapters; - let nameOrAdapter; - let adapter; - - const rejectedReasons = {}; - - for (let i = 0; i < length; i++) { - nameOrAdapter = adapters[i]; - let id; - - adapter = nameOrAdapter; - - if (!isResolvedHandle(nameOrAdapter)) { - adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; - - if (adapter === undefined) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"](`Unknown adapter '${id}'`); - } - } - - if (adapter) { - break; - } - - rejectedReasons[id || '#' + i] = adapter; - } - - if (!adapter) { - - const reasons = Object.entries(rejectedReasons) - .map(([id, state]) => `adapter ${id} ` + - (state === false ? 'is not supported by the environment' : 'is not available in the build') - ); - - let s = length ? - (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : - 'as no adapter specified'; - - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"]( - `There is no suitable adapter to dispatch the request ` + s, - 'ERR_NOT_SUPPORT' - ); - } - - return adapter; - }, - adapters: knownAdapters -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/fetch.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/adapters/fetch.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/composeSignals.js */ "./node_modules/axios/lib/helpers/composeSignals.js"); -/* harmony import */ var _helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/trackStream.js */ "./node_modules/axios/lib/helpers/trackStream.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../helpers/progressEventReducer.js */ "./node_modules/axios/lib/helpers/progressEventReducer.js"); -/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/resolveConfig.js */ "./node_modules/axios/lib/helpers/resolveConfig.js"); -/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/settle.js */ "./node_modules/axios/lib/core/settle.js"); - - - - - - - - - - -const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function'; -const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function'; - -// used only inside the fetch adapter -const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? - ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : - async (str) => new Uint8Array(await new Response(str).arrayBuffer()) -); - -const test = (fn, ...args) => { - try { - return !!fn(...args); - } catch (e) { - return false - } -} - -const supportsRequestStream = isReadableStreamSupported && test(() => { - let duplexAccessed = false; - - const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, { - body: new ReadableStream(), - method: 'POST', - get duplex() { - duplexAccessed = true; - return 'half'; - }, - }).headers.has('Content-Type'); - - return duplexAccessed && !hasContentType; -}); - -const DEFAULT_CHUNK_SIZE = 64 * 1024; - -const supportsResponseStream = isReadableStreamSupported && - test(() => _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReadableStream(new Response('').body)); - - -const resolvers = { - stream: supportsResponseStream && ((res) => res.body) -}; - -isFetchSupported && (((res) => { - ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => { - !resolvers[type] && (resolvers[type] = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(res[type]) ? (res) => res[type]() : - (_, config) => { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](`Response type '${type}' is not supported`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT, config); - }) - }); -})(new Response)); - -const getBodyLength = async (body) => { - if (body == null) { - return 0; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isBlob(body)) { - return body.size; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isSpecCompliantForm(body)) { - const _request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, { - method: 'POST', - body, - }); - return (await _request.arrayBuffer()).byteLength; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBufferView(body) || _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBuffer(body)) { - return body.byteLength; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isURLSearchParams(body)) { - body = body + ''; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(body)) { - return (await encodeText(body)).byteLength; - } -} - -const resolveBodyLength = async (headers, body) => { - const length = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(headers.getContentLength()); - - return length == null ? getBodyLength(body) : length; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isFetchSupported && (async (config) => { - let { - url, - method, - data, - signal, - cancelToken, - timeout, - onDownloadProgress, - onUploadProgress, - responseType, - headers, - withCredentials = 'same-origin', - fetchOptions - } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(config); - - responseType = responseType ? (responseType + '').toLowerCase() : 'text'; - - let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__["default"])([signal, cancelToken && cancelToken.toAbortSignal()], timeout); - - let request; - - const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { - composedSignal.unsubscribe(); - }); - - let requestContentLength; - - try { - if ( - onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' && - (requestContentLength = await resolveBodyLength(headers, data)) !== 0 - ) { - let _request = new Request(url, { - method: 'POST', - body: data, - duplex: "half" - }); - - let contentTypeHeader; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { - headers.setContentType(contentTypeHeader) - } - - if (_request.body) { - const [onProgress, flush] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)( - requestContentLength, - (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onUploadProgress)) - ); - - data = (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); - } - } - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(withCredentials)) { - withCredentials = withCredentials ? 'include' : 'omit'; - } - - // Cloudflare Workers throws when credentials are defined - // see https://github.com/cloudflare/workerd/issues/902 - const isCredentialsSupported = "credentials" in Request.prototype; - request = new Request(url, { - ...fetchOptions, - signal: composedSignal, - method: method.toUpperCase(), - headers: headers.normalize().toJSON(), - body: data, - duplex: "half", - credentials: isCredentialsSupported ? withCredentials : undefined - }); - - let response = await fetch(request); - - const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); - - if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) { - const options = {}; - - ['status', 'statusText', 'headers'].forEach(prop => { - options[prop] = response[prop]; - }); - - const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length')); - - const [onProgress, flush] = onDownloadProgress && (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)( - responseContentLength, - (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onDownloadProgress), true) - ) || []; - - response = new Response( - (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { - flush && flush(); - unsubscribe && unsubscribe(); - }), - options - ); - } - - responseType = responseType || 'text'; - - let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].findKey(resolvers, responseType) || 'text'](response, config); - - !isStreamResponse && unsubscribe && unsubscribe(); - - return await new Promise((resolve, reject) => { - (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_7__["default"])(resolve, reject, { - data: responseData, - headers: _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].from(response.headers), - status: response.status, - statusText: response.statusText, - config, - request - }) - }) - } catch (err) { - unsubscribe && unsubscribe(); - - if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) { - throw Object.assign( - new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NETWORK, config, request), - { - cause: err.cause || err - } - ) - } - - throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(err, err && err.code, config, request); - } -})); - - - - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/xhr.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/adapters/xhr.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../core/settle.js */ "./node_modules/axios/lib/core/settle.js"); -/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaults/transitional.js */ "./node_modules/axios/lib/defaults/transitional.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../helpers/parseProtocol.js */ "./node_modules/axios/lib/helpers/parseProtocol.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/progressEventReducer.js */ "./node_modules/axios/lib/helpers/progressEventReducer.js"); -/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/resolveConfig.js */ "./node_modules/axios/lib/helpers/resolveConfig.js"); - - - - - - - - - - - -const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported && function (config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_0__["default"])(config); - let requestData = _config.data; - const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(_config.headers).normalize(); - let {responseType, onUploadProgress, onDownloadProgress} = _config; - let onCanceled; - let uploadThrottled, downloadThrottled; - let flushUpload, flushDownload; - - function done() { - flushUpload && flushUpload(); // flush events - flushDownload && flushDownload(); // flush events - - _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); - - _config.signal && _config.signal.removeEventListener('abort', onCanceled); - } - - let request = new XMLHttpRequest(); - - request.open(_config.method.toUpperCase(), _config.url, true); - - // Set the request timeout in MS - request.timeout = _config.timeout; - - function onloadend() { - if (!request) { - return; - } - // Prepare the response - const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from( - 'getAllResponseHeaders' in request && request.getAllResponseHeaders() - ); - const responseData = !responseType || responseType === 'text' || responseType === 'json' ? - request.responseText : request.response; - const response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config, - request - }; - - (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(function _resolve(value) { - resolve(value); - done(); - }, function _reject(err) { - reject(err); - done(); - }, response); - - // Clean up request - request = null; - } - - if ('onloadend' in request) { - // Use onloadend if available - request.onloadend = onloadend; - } else { - // Listen for ready state to emulate onloadend - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - // readystate handler is calling before onerror or ontimeout handlers, - // so we should call onloadend on the next 'tick' - setTimeout(onloadend); - }; - } - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, config, request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_NETWORK, config, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; - const transitional = _config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_4__["default"]; - if (_config.timeoutErrorMessage) { - timeoutErrorMessage = _config.timeoutErrorMessage; - } - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]( - timeoutErrorMessage, - transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, - config, - request)); - - // Clean up request - request = null; - }; - - // Remove Content-Type if data is undefined - requestData === undefined && requestHeaders.setContentType(null); - - // Add headers to the request - if ('setRequestHeader' in request) { - _utils_js__WEBPACK_IMPORTED_MODULE_5__["default"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { - request.setRequestHeader(key, val); - }); - } - - // Add withCredentials to request if needed - if (!_utils_js__WEBPACK_IMPORTED_MODULE_5__["default"].isUndefined(_config.withCredentials)) { - request.withCredentials = !!_config.withCredentials; - } - - // Add responseType to request if needed - if (responseType && responseType !== 'json') { - request.responseType = _config.responseType; - } - - // Handle progress if needed - if (onDownloadProgress) { - ([downloadThrottled, flushDownload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)(onDownloadProgress, true)); - request.addEventListener('progress', downloadThrottled); - } - - // Not all browsers support upload events - if (onUploadProgress && request.upload) { - ([uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)(onUploadProgress)); - - request.upload.addEventListener('progress', uploadThrottled); - - request.upload.addEventListener('loadend', flushUpload); - } - - if (_config.cancelToken || _config.signal) { - // Handle cancellation - // eslint-disable-next-line func-names - onCanceled = cancel => { - if (!request) { - return; - } - reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_7__["default"](null, config, request) : cancel); - request.abort(); - request = null; - }; - - _config.cancelToken && _config.cancelToken.subscribe(onCanceled); - if (_config.signal) { - _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); - } - } - - const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_config.url); - - if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_9__["default"].protocols.indexOf(protocol) === -1) { - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Unsupported protocol ' + protocol + ':', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_BAD_REQUEST, config)); - return; - } - - - // Send the request - request.send(requestData || null); - }); -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/axios.js": -/*!*****************************************!*\ - !*** ./node_modules/axios/lib/axios.js ***! - \*****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js"); -/* harmony import */ var _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/Axios.js */ "./node_modules/axios/lib/core/Axios.js"); -/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); -/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); -/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js"); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cancel/CancelToken.js */ "./node_modules/axios/lib/cancel/CancelToken.js"); -/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js"); -/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./env/data.js */ "./node_modules/axios/lib/env/data.js"); -/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/spread.js */ "./node_modules/axios/lib/helpers/spread.js"); -/* harmony import */ var _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/isAxiosError.js */ "./node_modules/axios/lib/helpers/isAxiosError.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js"); -/* harmony import */ var _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers/HttpStatusCode.js */ "./node_modules/axios/lib/helpers/HttpStatusCode.js"); - - - - - - - - - - - - - - - - - - - - -/** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * - * @returns {Axios} A new instance of Axios - */ -function createInstance(defaultConfig) { - const context = new _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"](defaultConfig); - const instance = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.request, context); - - // Copy axios.prototype to instance - _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype, context, {allOwnKeys: true}); - - // Copy context to instance - _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, context, null, {allOwnKeys: true}); - - // Factory for creating new instances - instance.create = function create(instanceConfig) { - return createInstance((0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(defaultConfig, instanceConfig)); - }; - - return instance; -} - -// Create the default instance to be exported -const axios = createInstance(_defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"]); - -// Expose Axios class to allow class inheritance -axios.Axios = _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"]; - -// Expose Cancel & CancelToken -axios.CanceledError = _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__["default"]; -axios.CancelToken = _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__["default"]; -axios.isCancel = _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__["default"]; -axios.VERSION = _env_data_js__WEBPACK_IMPORTED_MODULE_8__.VERSION; -axios.toFormData = _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__["default"]; - -// Expose AxiosError class -axios.AxiosError = _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__["default"]; - -// alias for CanceledError for backward compatibility -axios.Cancel = axios.CanceledError; - -// Expose all/spread -axios.all = function all(promises) { - return Promise.all(promises); -}; - -axios.spread = _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__["default"]; - -// Expose isAxiosError -axios.isAxiosError = _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__["default"]; - -// Expose mergeConfig -axios.mergeConfig = _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"]; - -axios.AxiosHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__["default"]; - -axios.formToJSON = thing => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isHTMLForm(thing) ? new FormData(thing) : thing); - -axios.getAdapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__["default"].getAdapter; - -axios.HttpStatusCode = _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__["default"]; - -axios.default = axios; - -// this module should only have a default export -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (axios); - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/CancelToken.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/cancel/CancelToken.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); - - - - -/** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @param {Function} executor The executor function. - * - * @returns {CancelToken} - */ -class CancelToken { - constructor(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - let resolvePromise; - - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - const token = this; - - // eslint-disable-next-line func-names - this.promise.then(cancel => { - if (!token._listeners) return; - - let i = token._listeners.length; - - while (i-- > 0) { - token._listeners[i](cancel); - } - token._listeners = null; - }); - - // eslint-disable-next-line func-names - this.promise.then = onfulfilled => { - let _resolve; - // eslint-disable-next-line func-names - const promise = new Promise(resolve => { - token.subscribe(resolve); - _resolve = resolve; - }).then(onfulfilled); - - promise.cancel = function reject() { - token.unsubscribe(_resolve); - }; - - return promise; - }; - - executor(function cancel(message, config, request) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](message, config, request); - resolvePromise(token.reason); - }); - } - - /** - * Throws a `CanceledError` if cancellation has been requested. - */ - throwIfRequested() { - if (this.reason) { - throw this.reason; - } - } - - /** - * Subscribe to the cancel signal - */ - - subscribe(listener) { - if (this.reason) { - listener(this.reason); - return; - } - - if (this._listeners) { - this._listeners.push(listener); - } else { - this._listeners = [listener]; - } - } - - /** - * Unsubscribe from the cancel signal - */ - - unsubscribe(listener) { - if (!this._listeners) { - return; - } - const index = this._listeners.indexOf(listener); - if (index !== -1) { - this._listeners.splice(index, 1); - } - } - - toAbortSignal() { - const controller = new AbortController(); - - const abort = (err) => { - controller.abort(err); - }; - - this.subscribe(abort); - - controller.signal.unsubscribe = () => this.unsubscribe(abort); - - return controller.signal; - } - - /** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ - static source() { - let cancel; - const token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token, - cancel - }; - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CancelToken); - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/CanceledError.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/cancel/CanceledError.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - - -/** - * A `CanceledError` is an object that is thrown when an operation is canceled. - * - * @param {string=} message The message. - * @param {Object=} config The config. - * @param {Object=} request The request. - * - * @returns {CanceledError} The created error. - */ -function CanceledError(message, config, request) { - // eslint-disable-next-line no-eq-null,eqeqeq - _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, message == null ? 'canceled' : message, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_CANCELED, config, request); - this.name = 'CanceledError'; -} - -_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].inherits(CanceledError, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"], { - __CANCEL__: true -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CanceledError); - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/isCancel.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/cancel/isCancel.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ isCancel) -/* harmony export */ }); - - -function isCancel(value) { - return !!(value && value.__CANCEL__); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/Axios.js": -/*!**********************************************!*\ - !*** ./node_modules/axios/lib/core/Axios.js ***! - \**********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js"); -/* harmony import */ var _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InterceptorManager.js */ "./node_modules/axios/lib/core/InterceptorManager.js"); -/* harmony import */ var _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dispatchRequest.js */ "./node_modules/axios/lib/core/dispatchRequest.js"); -/* harmony import */ var _mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); -/* harmony import */ var _buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js"); -/* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/validator.js */ "./node_modules/axios/lib/helpers/validator.js"); -/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - - - - - - - - - - - -const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].validators; - -/** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - * - * @return {Axios} A new instance of Axios - */ -class Axios { - constructor(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"](), - response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"]() - }; - } - - /** - * Dispatch a request - * - * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) - * @param {?Object} config - * - * @returns {Promise} The Promise to be fulfilled - */ - async request(configOrUrl, config) { - try { - return await this._request(configOrUrl, config); - } catch (err) { - if (err instanceof Error) { - let dummy; - - Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error()); - - // slice off the Error: ... line - const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; - try { - if (!err.stack) { - err.stack = stack; - // match without the 2 top stack lines - } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) { - err.stack += '\n' + stack - } - } catch (e) { - // ignore the case where "stack" is an un-writable property - } - } - - throw err; - } - } - - _request(configOrUrl, config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof configOrUrl === 'string') { - config = config || {}; - config.url = configOrUrl; - } else { - config = configOrUrl || {}; - } - - config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config); - - const {transitional, paramsSerializer, headers} = config; - - if (transitional !== undefined) { - _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(transitional, { - silentJSONParsing: validators.transitional(validators.boolean), - forcedJSONParsing: validators.transitional(validators.boolean), - clarifyTimeoutError: validators.transitional(validators.boolean) - }, false); - } - - if (paramsSerializer != null) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(paramsSerializer)) { - config.paramsSerializer = { - serialize: paramsSerializer - } - } else { - _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(paramsSerializer, { - encode: validators.function, - serialize: validators.function - }, true); - } - } - - // Set config.method - config.method = (config.method || this.defaults.method || 'get').toLowerCase(); - - // Flatten headers - let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].merge( - headers.common, - headers[config.method] - ); - - headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - (method) => { - delete headers[method]; - } - ); - - config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].concat(contextHeaders, headers); - - // filter out skipped interceptors - const requestInterceptorChain = []; - let synchronousRequestInterceptors = true; - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { - return; - } - - synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - const responseInterceptorChain = []; - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); - }); - - let promise; - let i = 0; - let len; - - if (!synchronousRequestInterceptors) { - const chain = [_dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].bind(this), undefined]; - chain.unshift.apply(chain, requestInterceptorChain); - chain.push.apply(chain, responseInterceptorChain); - len = chain.length; - - promise = Promise.resolve(config); - - while (i < len) { - promise = promise.then(chain[i++], chain[i++]); - } - - return promise; - } - - len = requestInterceptorChain.length; - - let newConfig = config; - - i = 0; - - while (i < len) { - const onFulfilled = requestInterceptorChain[i++]; - const onRejected = requestInterceptorChain[i++]; - try { - newConfig = onFulfilled(newConfig); - } catch (error) { - onRejected.call(this, error); - break; - } - } - - try { - promise = _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].call(this, newConfig); - } catch (error) { - return Promise.reject(error); - } - - i = 0; - len = responseInterceptorChain.length; - - while (i < len) { - promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); - } - - return promise; - } - - getUri(config) { - config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config); - const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__["default"])(config.baseURL, config.url); - return (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(fullPath, config.params, config.paramsSerializer); - } -} - -// Provide aliases for supported request methods -_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, { - method, - url, - data: (config || {}).data - })); - }; -}); - -_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - - function generateHTTPMethod(isForm) { - return function httpMethod(url, data, config) { - return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, { - method, - headers: isForm ? { - 'Content-Type': 'multipart/form-data' - } : {}, - url, - data - })); - }; - } - - Axios.prototype[method] = generateHTTPMethod(); - - Axios.prototype[method + 'Form'] = generateHTTPMethod(true); -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Axios); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/AxiosError.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/core/AxiosError.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [config] The config. - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * - * @returns {Error} The created error. - */ -function AxiosError(message, code, config, request, response) { - Error.call(this); - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = (new Error()).stack; - } - - this.message = message; - this.name = 'AxiosError'; - code && (this.code = code); - config && (this.config = config); - request && (this.request = request); - if (response) { - this.response = response; - this.status = response.status ? response.status : null; - } -} - -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].inherits(AxiosError, Error, { - toJSON: function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(this.config), - code: this.code, - status: this.status - }; - } -}); - -const prototype = AxiosError.prototype; -const descriptors = {}; - -[ - 'ERR_BAD_OPTION_VALUE', - 'ERR_BAD_OPTION', - 'ECONNABORTED', - 'ETIMEDOUT', - 'ERR_NETWORK', - 'ERR_FR_TOO_MANY_REDIRECTS', - 'ERR_DEPRECATED', - 'ERR_BAD_RESPONSE', - 'ERR_BAD_REQUEST', - 'ERR_CANCELED', - 'ERR_NOT_SUPPORT', - 'ERR_INVALID_URL' -// eslint-disable-next-line func-names -].forEach(code => { - descriptors[code] = {value: code}; -}); - -Object.defineProperties(AxiosError, descriptors); -Object.defineProperty(prototype, 'isAxiosError', {value: true}); - -// eslint-disable-next-line func-names -AxiosError.from = (error, code, config, request, response, customProps) => { - const axiosError = Object.create(prototype); - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(error, axiosError, function filter(obj) { - return obj !== Error.prototype; - }, prop => { - return prop !== 'isAxiosError'; - }); - - AxiosError.call(axiosError, error.message, code, config, request, response); - - axiosError.cause = error; - - axiosError.name = error.name; - - customProps && Object.assign(axiosError, customProps); - - return axiosError; -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/AxiosHeaders.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/core/AxiosHeaders.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/parseHeaders.js */ "./node_modules/axios/lib/helpers/parseHeaders.js"); - - - - - -const $internals = Symbol('internals'); - -function normalizeHeader(header) { - return header && String(header).trim().toLowerCase(); -} - -function normalizeValue(value) { - if (value === false || value == null) { - return value; - } - - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : String(value); -} - -function parseTokens(str) { - const tokens = Object.create(null); - const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; - let match; - - while ((match = tokensRE.exec(str))) { - tokens[match[1]] = match[2]; - } - - return tokens; -} - -const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); - -function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(filter)) { - return filter.call(this, value, header); - } - - if (isHeaderNameFilter) { - value = header; - } - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(value)) return; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(filter)) { - return value.indexOf(filter) !== -1; - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(filter)) { - return filter.test(value); - } -} - -function formatHeader(header) { - return header.trim() - .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { - return char.toUpperCase() + str; - }); -} - -function buildAccessors(obj, header) { - const accessorName = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toCamelCase(' ' + header); - - ['get', 'set', 'has'].forEach(methodName => { - Object.defineProperty(obj, methodName + accessorName, { - value: function(arg1, arg2, arg3) { - return this[methodName].call(this, header, arg1, arg2, arg3); - }, - configurable: true - }); - }); -} - -class AxiosHeaders { - constructor(headers) { - headers && this.set(headers); - } - - set(header, valueOrRewrite, rewrite) { - const self = this; - - function setHeader(_value, _header, _rewrite) { - const lHeader = normalizeHeader(_header); - - if (!lHeader) { - throw new Error('header name must be a non-empty string'); - } - - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, lHeader); - - if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { - self[key || _header] = normalizeValue(_value); - } - } - - const setHeaders = (headers, _rewrite) => - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(header) || header instanceof this.constructor) { - setHeaders(header, valueOrRewrite) - } else if(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { - setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"])(header), valueOrRewrite); - } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHeaders(header)) { - for (const [key, value] of header.entries()) { - setHeader(value, key, rewrite); - } - } else { - header != null && setHeader(valueOrRewrite, header, rewrite); - } - - return this; - } - - get(header, parser) { - header = normalizeHeader(header); - - if (header) { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header); - - if (key) { - const value = this[key]; - - if (!parser) { - return value; - } - - if (parser === true) { - return parseTokens(value); - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(parser)) { - return parser.call(this, value, key); - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(parser)) { - return parser.exec(value); - } - - throw new TypeError('parser must be boolean|regexp|function'); - } - } - } - - has(header, matcher) { - header = normalizeHeader(header); - - if (header) { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header); - - return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); - } - - return false; - } - - delete(header, matcher) { - const self = this; - let deleted = false; - - function deleteHeader(_header) { - _header = normalizeHeader(_header); - - if (_header) { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, _header); - - if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { - delete self[key]; - - deleted = true; - } - } - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header)) { - header.forEach(deleteHeader); - } else { - deleteHeader(header); - } - - return deleted; - } - - clear(matcher) { - const keys = Object.keys(this); - let i = keys.length; - let deleted = false; - - while (i--) { - const key = keys[i]; - if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { - delete this[key]; - deleted = true; - } - } - - return deleted; - } - - normalize(format) { - const self = this; - const headers = {}; - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(headers, header); - - if (key) { - self[key] = normalizeValue(value); - delete self[header]; - return; - } - - const normalized = format ? formatHeader(header) : String(header).trim(); - - if (normalized !== header) { - delete self[header]; - } - - self[normalized] = normalizeValue(value); - - headers[normalized] = true; - }); - - return this; - } - - concat(...targets) { - return this.constructor.concat(this, ...targets); - } - - toJSON(asStrings) { - const obj = Object.create(null); - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => { - value != null && value !== false && (obj[header] = asStrings && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.join(', ') : value); - }); - - return obj; - } - - [Symbol.iterator]() { - return Object.entries(this.toJSON())[Symbol.iterator](); - } - - toString() { - return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); - } - - get [Symbol.toStringTag]() { - return 'AxiosHeaders'; - } - - static from(thing) { - return thing instanceof this ? thing : new this(thing); - } - - static concat(first, ...targets) { - const computed = new this(first); - - targets.forEach((target) => computed.set(target)); - - return computed; - } - - static accessor(header) { - const internals = this[$internals] = (this[$internals] = { - accessors: {} - }); - - const accessors = internals.accessors; - const prototype = this.prototype; - - function defineAccessor(_header) { - const lHeader = normalizeHeader(_header); - - if (!accessors[lHeader]) { - buildAccessors(prototype, _header); - accessors[lHeader] = true; - } - } - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); - - return this; - } -} - -AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); - -// reserved names hotfix -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => { - let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` - return { - get: () => value, - set(headerValue) { - this[mapped] = headerValue; - } - } -}); - -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosHeaders); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/InterceptorManager.js": -/*!***********************************************************!*\ - !*** ./node_modules/axios/lib/core/InterceptorManager.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -class InterceptorManager { - constructor() { - this.handlers = []; - } - - /** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ - use(fulfilled, rejected, options) { - this.handlers.push({ - fulfilled, - rejected, - synchronous: options ? options.synchronous : false, - runWhen: options ? options.runWhen : null - }); - return this.handlers.length - 1; - } - - /** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - * - * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise - */ - eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } - } - - /** - * Clear all interceptors from the stack - * - * @returns {void} - */ - clear() { - if (this.handlers) { - this.handlers = []; - } - } - - /** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - * - * @returns {void} - */ - forEach(fn) { - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InterceptorManager); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/buildFullPath.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/core/buildFullPath.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ buildFullPath) -/* harmony export */ }); -/* harmony import */ var _helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/isAbsoluteURL.js */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js"); -/* harmony import */ var _helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/combineURLs.js */ "./node_modules/axios/lib/helpers/combineURLs.js"); - - - - - -/** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * - * @returns {string} The combined full path - */ -function buildFullPath(baseURL, requestedURL) { - if (baseURL && !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL)) { - return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL); - } - return requestedURL; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/dispatchRequest.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/core/dispatchRequest.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ dispatchRequest) -/* harmony export */ }); -/* harmony import */ var _transformData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transformData.js */ "./node_modules/axios/lib/core/transformData.js"); -/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js"); -/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js"); - - - - - - - - - -/** - * Throws a `CanceledError` if cancellation has been requested. - * - * @param {Object} config The config that is to be used for the request - * - * @returns {void} - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } - - if (config.signal && config.signal.aborted) { - throw new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](null, config); - } -} - -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * - * @returns {Promise} The Promise to be fulfilled - */ -function dispatchRequest(config) { - throwIfCancellationRequested(config); - - config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(config.headers); - - // Transform request data - config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( - config, - config.transformRequest - ); - - if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { - config.headers.setContentType('application/x-www-form-urlencoded', false); - } - - const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].adapter); - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( - config, - config.transformResponse, - response - ); - - response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(response.headers); - - return response; - }, function onAdapterRejection(reason) { - if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__["default"])(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( - config, - config.transformResponse, - reason.response - ); - reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(reason.response.headers); - } - } - - return Promise.reject(reason); - }); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/mergeConfig.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/core/mergeConfig.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ mergeConfig) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - - - - - -const headersToObject = (thing) => thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? { ...thing } : thing; - -/** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * - * @returns {Object} New object resulting from merging config2 to config1 - */ -function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - const config = {}; - - function getMergedValue(target, source, caseless) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) { - return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call({caseless}, target, source); - } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) { - return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge({}, source); - } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArray(source)) { - return source.slice(); - } - return source; - } - - // eslint-disable-next-line consistent-return - function mergeDeepProperties(a, b, caseless) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { - return getMergedValue(a, b, caseless); - } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) { - return getMergedValue(undefined, a, caseless); - } - } - - // eslint-disable-next-line consistent-return - function valueFromConfig2(a, b) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { - return getMergedValue(undefined, b); - } - } - - // eslint-disable-next-line consistent-return - function defaultToConfig2(a, b) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { - return getMergedValue(undefined, b); - } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) { - return getMergedValue(undefined, a); - } - } - - // eslint-disable-next-line consistent-return - function mergeDirectKeys(a, b, prop) { - if (prop in config2) { - return getMergedValue(a, b); - } else if (prop in config1) { - return getMergedValue(undefined, a); - } - } - - const mergeMap = { - url: valueFromConfig2, - method: valueFromConfig2, - data: valueFromConfig2, - baseURL: defaultToConfig2, - transformRequest: defaultToConfig2, - transformResponse: defaultToConfig2, - paramsSerializer: defaultToConfig2, - timeout: defaultToConfig2, - timeoutMessage: defaultToConfig2, - withCredentials: defaultToConfig2, - withXSRFToken: defaultToConfig2, - adapter: defaultToConfig2, - responseType: defaultToConfig2, - xsrfCookieName: defaultToConfig2, - xsrfHeaderName: defaultToConfig2, - onUploadProgress: defaultToConfig2, - onDownloadProgress: defaultToConfig2, - decompress: defaultToConfig2, - maxContentLength: defaultToConfig2, - maxBodyLength: defaultToConfig2, - beforeRedirect: defaultToConfig2, - transport: defaultToConfig2, - httpAgent: defaultToConfig2, - httpsAgent: defaultToConfig2, - cancelToken: defaultToConfig2, - socketPath: defaultToConfig2, - responseEncoding: defaultToConfig2, - validateStatus: mergeDirectKeys, - headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true) - }; - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { - const merge = mergeMap[prop] || mergeDeepProperties; - const configValue = merge(config1[prop], config2[prop], prop); - (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); - }); - - return config; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/settle.js": -/*!***********************************************!*\ - !*** ./node_modules/axios/lib/core/settle.js ***! - \***********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ settle) -/* harmony export */ }); -/* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - - - - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - * - * @returns {object} The response. - */ -function settle(resolve, reject, response) { - const validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"]( - 'Request failed with status code ' + response.status, - [_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST, _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], - response.config, - response.request, - response - )); - } -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/transformData.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/core/transformData.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ transformData) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - - - - - - -/** - * Transform the data for a request or a response - * - * @param {Array|Function} fns A single function or Array of functions - * @param {?Object} response The response object - * - * @returns {*} The resulting transformed data - */ -function transformData(fns, response) { - const config = this || _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__["default"]; - const context = response || config; - const headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(context.headers); - let data = context.data; - - _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(fns, function transform(fn) { - data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); - }); - - headers.normalize(); - - return data; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/defaults/index.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/defaults/index.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _transitional_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transitional.js */ "./node_modules/axios/lib/defaults/transitional.js"); -/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -/* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/toURLEncodedForm.js */ "./node_modules/axios/lib/helpers/toURLEncodedForm.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js"); - - - - - - - - - - -/** - * It takes a string, tries to parse it, and if it fails, it returns the stringified version - * of the input - * - * @param {any} rawValue - The value to be stringified. - * @param {Function} parser - A function that parses a string into a JavaScript object. - * @param {Function} encoder - A function that takes a value and returns a string. - * - * @returns {string} A stringified version of the rawValue. - */ -function stringifySafely(rawValue, parser, encoder) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(rawValue)) { - try { - (parser || JSON.parse)(rawValue); - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].trim(rawValue); - } catch (e) { - if (e.name !== 'SyntaxError') { - throw e; - } - } - } - - return (encoder || JSON.stringify)(rawValue); -} - -const defaults = { - - transitional: _transitional_js__WEBPACK_IMPORTED_MODULE_1__["default"], - - adapter: ['xhr', 'http', 'fetch'], - - transformRequest: [function transformRequest(data, headers) { - const contentType = headers.getContentType() || ''; - const hasJSONContentType = contentType.indexOf('application/json') > -1; - const isObjectPayload = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(data); - - if (isObjectPayload && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(data)) { - data = new FormData(data); - } - - const isFormData = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(data); - - if (isFormData) { - return hasJSONContentType ? JSON.stringify((0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__["default"])(data)) : data; - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStream(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFile(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data) - ) { - return data; - } - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBufferView(data)) { - return data.buffer; - } - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(data)) { - headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); - return data.toString(); - } - - let isFileList; - - if (isObjectPayload) { - if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { - return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__["default"])(data, this.formSerializer).toString(); - } - - if ((isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { - const _FormData = this.env && this.env.FormData; - - return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__["default"])( - isFileList ? {'files[]': data} : data, - _FormData && new _FormData(), - this.formSerializer - ); - } - } - - if (isObjectPayload || hasJSONContentType ) { - headers.setContentType('application/json', false); - return stringifySafely(data); - } - - return data; - }], - - transformResponse: [function transformResponse(data) { - const transitional = this.transitional || defaults.transitional; - const forcedJSONParsing = transitional && transitional.forcedJSONParsing; - const JSONRequested = this.responseType === 'json'; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isResponse(data) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)) { - return data; - } - - if (data && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { - const silentJSONParsing = transitional && transitional.silentJSONParsing; - const strictJSONParsing = !silentJSONParsing && JSONRequested; - - try { - return JSON.parse(data); - } catch (e) { - if (strictJSONParsing) { - if (e.name === 'SyntaxError') { - throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].ERR_BAD_RESPONSE, this, null, this.response); - } - throw e; - } - } - } - - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - maxBodyLength: -1, - - env: { - FormData: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.FormData, - Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.Blob - }, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - }, - - headers: { - common: { - 'Accept': 'application/json, text/plain, */*', - 'Content-Type': undefined - } - } -}; - -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { - defaults.headers[method] = {}; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); - - -/***/ }), - -/***/ "./node_modules/axios/lib/defaults/transitional.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/defaults/transitional.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - silentJSONParsing: true, - forcedJSONParsing: true, - clarifyTimeoutError: false -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/env/data.js": -/*!********************************************!*\ - !*** ./node_modules/axios/lib/env/data.js ***! - \********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ VERSION: () => (/* binding */ VERSION) -/* harmony export */ }); -const VERSION = "1.7.7"; - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js": -/*!****************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/AxiosURLSearchParams.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); - - - - -/** - * It encodes a string by replacing all characters that are not in the unreserved set with - * their percent-encoded equivalents - * - * @param {string} str - The string to encode. - * - * @returns {string} The encoded string. - */ -function encode(str) { - const charMap = { - '!': '%21', - "'": '%27', - '(': '%28', - ')': '%29', - '~': '%7E', - '%20': '+', - '%00': '\x00' - }; - return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { - return charMap[match]; - }); -} - -/** - * It takes a params object and converts it to a FormData object - * - * @param {Object} params - The parameters to be converted to a FormData object. - * @param {Object} options - The options object passed to the Axios constructor. - * - * @returns {void} - */ -function AxiosURLSearchParams(params, options) { - this._pairs = []; - - params && (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, this, options); -} - -const prototype = AxiosURLSearchParams.prototype; - -prototype.append = function append(name, value) { - this._pairs.push([name, value]); -}; - -prototype.toString = function toString(encoder) { - const _encode = encoder ? function(value) { - return encoder.call(this, value, encode); - } : encode; - - return this._pairs.map(function each(pair) { - return _encode(pair[0]) + '=' + _encode(pair[1]); - }, '').join('&'); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosURLSearchParams); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/HttpStatusCode.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/HttpStatusCode.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -const HttpStatusCode = { - Continue: 100, - SwitchingProtocols: 101, - Processing: 102, - EarlyHints: 103, - Ok: 200, - Created: 201, - Accepted: 202, - NonAuthoritativeInformation: 203, - NoContent: 204, - ResetContent: 205, - PartialContent: 206, - MultiStatus: 207, - AlreadyReported: 208, - ImUsed: 226, - MultipleChoices: 300, - MovedPermanently: 301, - Found: 302, - SeeOther: 303, - NotModified: 304, - UseProxy: 305, - Unused: 306, - TemporaryRedirect: 307, - PermanentRedirect: 308, - BadRequest: 400, - Unauthorized: 401, - PaymentRequired: 402, - Forbidden: 403, - NotFound: 404, - MethodNotAllowed: 405, - NotAcceptable: 406, - ProxyAuthenticationRequired: 407, - RequestTimeout: 408, - Conflict: 409, - Gone: 410, - LengthRequired: 411, - PreconditionFailed: 412, - PayloadTooLarge: 413, - UriTooLong: 414, - UnsupportedMediaType: 415, - RangeNotSatisfiable: 416, - ExpectationFailed: 417, - ImATeapot: 418, - MisdirectedRequest: 421, - UnprocessableEntity: 422, - Locked: 423, - FailedDependency: 424, - TooEarly: 425, - UpgradeRequired: 426, - PreconditionRequired: 428, - TooManyRequests: 429, - RequestHeaderFieldsTooLarge: 431, - UnavailableForLegalReasons: 451, - InternalServerError: 500, - NotImplemented: 501, - BadGateway: 502, - ServiceUnavailable: 503, - GatewayTimeout: 504, - HttpVersionNotSupported: 505, - VariantAlsoNegotiates: 506, - InsufficientStorage: 507, - LoopDetected: 508, - NotExtended: 510, - NetworkAuthenticationRequired: 511, -}; - -Object.entries(HttpStatusCode).forEach(([key, value]) => { - HttpStatusCode[value] = key; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HttpStatusCode); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/bind.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/helpers/bind.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ bind) -/* harmony export */ }); - - -function bind(fn, thisArg) { - return function wrap() { - return fn.apply(thisArg, arguments); - }; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/buildURL.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/buildURL.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ buildURL) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js"); - - - - - -/** - * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their - * URI encoded counterparts - * - * @param {string} val The value to be encoded. - * - * @returns {string} The encoded value. - */ -function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @param {?object} options - * - * @returns {string} The formatted url - */ -function buildURL(url, params, options) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - const _encode = options && options.encode || encode; - - const serializeFn = options && options.serialize; - - let serializedParams; - - if (serializeFn) { - serializedParams = serializeFn(params, options); - } else { - serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(params) ? - params.toString() : - new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"](params, options).toString(_encode); - } - - if (serializedParams) { - const hashmarkIndex = url.indexOf("#"); - - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/combineURLs.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/combineURLs.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ combineURLs) -/* harmony export */ }); - - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * - * @returns {string} The combined URL - */ -function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/composeSignals.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/composeSignals.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -const composeSignals = (signals, timeout) => { - const {length} = (signals = signals ? signals.filter(Boolean) : []); - - if (timeout || length) { - let controller = new AbortController(); - - let aborted; - - const onabort = function (reason) { - if (!aborted) { - aborted = true; - unsubscribe(); - const err = reason instanceof Error ? reason : this.reason; - controller.abort(err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? err : new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_1__["default"](err instanceof Error ? err.message : err)); - } - } - - let timer = timeout && setTimeout(() => { - timer = null; - onabort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](`timeout ${timeout} of ms exceeded`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ETIMEDOUT)) - }, timeout) - - const unsubscribe = () => { - if (signals) { - timer && clearTimeout(timer); - timer = null; - signals.forEach(signal => { - signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort); - }); - signals = null; - } - } - - signals.forEach((signal) => signal.addEventListener('abort', onabort)); - - const {signal} = controller; - - signal.unsubscribe = () => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(unsubscribe); - - return signal; - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (composeSignals); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/cookies.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/helpers/cookies.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ? - - // Standard browser envs support document.cookie - { - write(name, value, expires, path, domain, secure) { - const cookie = [name + '=' + encodeURIComponent(value)]; - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(path) && cookie.push('path=' + path); - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(domain) && cookie.push('domain=' + domain); - - secure === true && cookie.push('secure'); - - document.cookie = cookie.join('; '); - }, - - read(name) { - const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove(name) { - this.write(name, '', Date.now() - 86400000); - } - } - - : - - // Non-standard browser env (web workers, react-native) lack needed support. - { - write() {}, - read() { - return null; - }, - remove() {} - }); - - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/formDataToJSON.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/formDataToJSON.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -/** - * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] - * - * @param {string} name - The name of the property to get. - * - * @returns An array of strings. - */ -function parsePropPath(name) { - // foo[x][y][z] - // foo.x.y.z - // foo-x-y-z - // foo x y z - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map(match => { - return match[0] === '[]' ? '' : match[1] || match[0]; - }); -} - -/** - * Convert an array to an object. - * - * @param {Array} arr - The array to convert to an object. - * - * @returns An object with the same keys and values as the array. - */ -function arrayToObject(arr) { - const obj = {}; - const keys = Object.keys(arr); - let i; - const len = keys.length; - let key; - for (i = 0; i < len; i++) { - key = keys[i]; - obj[key] = arr[key]; - } - return obj; -} - -/** - * It takes a FormData object and returns a JavaScript object - * - * @param {string} formData The FormData object to convert to JSON. - * - * @returns {Object | null} The converted object. - */ -function formDataToJSON(formData) { - function buildPath(path, value, target, index) { - let name = path[index++]; - - if (name === '__proto__') return true; - - const isNumericKey = Number.isFinite(+name); - const isLast = index >= path.length; - name = !name && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target) ? target.length : name; - - if (isLast) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name)) { - target[name] = [target[name], value]; - } else { - target[name] = value; - } - - return !isNumericKey; - } - - if (!target[name] || !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(target[name])) { - target[name] = []; - } - - const result = buildPath(path, value, target[name], index); - - if (result && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target[name])) { - target[name] = arrayToObject(target[name]); - } - - return !isNumericKey; - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(formData) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(formData.entries)) { - const obj = {}; - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEachEntry(formData, (name, value) => { - buildPath(parsePropPath(name), value, obj, 0); - }); - - return obj; - } - - return null; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (formDataToJSON); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ isAbsoluteURL) -/* harmony export */ }); - - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isAxiosError.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isAxiosError.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ isAxiosError) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -/** - * Determines whether the payload is an error thrown by Axios - * - * @param {*} payload The value to test - * - * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false - */ -function isAxiosError(payload) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(payload) && (payload.isAxiosError === true); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js": -/*!***********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); - - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ? - -// Standard browser envs have full support of the APIs needed to test -// whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - const msie = _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent); - const urlParsingNode = document.createElement('a'); - let originURL; - - /** - * Parse a URL to discover its components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - let href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - const parsed = (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })()); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/null.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/helpers/null.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -// eslint-disable-next-line strict -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (null); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/parseHeaders.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -// RawAxiosHeaders whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toObjectSet([ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]); - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} rawHeaders Headers needing to be parsed - * - * @returns {Object} Headers parsed into an object - */ -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rawHeaders => { - const parsed = {}; - let key; - let val; - let i; - - rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { - i = line.indexOf(':'); - key = line.substring(0, i).trim().toLowerCase(); - val = line.substring(i + 1).trim(); - - if (!key || (parsed[key] && ignoreDuplicateOf[key])) { - return; - } - - if (key === 'set-cookie') { - if (parsed[key]) { - parsed[key].push(val); - } else { - parsed[key] = [val]; - } - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - }); - - return parsed; -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/parseProtocol.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/parseProtocol.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ parseProtocol) -/* harmony export */ }); - - -function parseProtocol(url) { - const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); - return match && match[1] || ''; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/progressEventReducer.js": -/*!****************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/progressEventReducer.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ asyncDecorator: () => (/* binding */ asyncDecorator), -/* harmony export */ progressEventDecorator: () => (/* binding */ progressEventDecorator), -/* harmony export */ progressEventReducer: () => (/* binding */ progressEventReducer) -/* harmony export */ }); -/* harmony import */ var _speedometer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./speedometer.js */ "./node_modules/axios/lib/helpers/speedometer.js"); -/* harmony import */ var _throttle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./throttle.js */ "./node_modules/axios/lib/helpers/throttle.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -const progressEventReducer = (listener, isDownloadStream, freq = 3) => { - let bytesNotified = 0; - const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250); - - return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e => { - const loaded = e.loaded; - const total = e.lengthComputable ? e.total : undefined; - const progressBytes = loaded - bytesNotified; - const rate = _speedometer(progressBytes); - const inRange = loaded <= total; - - bytesNotified = loaded; - - const data = { - loaded, - total, - progress: total ? (loaded / total) : undefined, - bytes: progressBytes, - rate: rate ? rate : undefined, - estimated: rate && total && inRange ? (total - loaded) / rate : undefined, - event: e, - lengthComputable: total != null, - [isDownloadStream ? 'download' : 'upload']: true - }; - - listener(data); - }, freq); -} - -const progressEventDecorator = (total, throttled) => { - const lengthComputable = total != null; - - return [(loaded) => throttled[0]({ - lengthComputable, - total, - loaded - }), throttled[1]]; -} - -const asyncDecorator = (fn) => (...args) => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(() => fn(...args)); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/resolveConfig.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/resolveConfig.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./isURLSameOrigin.js */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js"); -/* harmony import */ var _cookies_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cookies.js */ "./node_modules/axios/lib/helpers/cookies.js"); -/* harmony import */ var _core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js"); -/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _buildURL_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js"); - - - - - - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((config) => { - const newConfig = (0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, config); - - let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig; - - newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(headers); - - newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__["default"])(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer); - - // HTTP basic authentication - if (auth) { - headers.set('Authorization', 'Basic ' + - btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')) - ); - } - - let contentType; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_4__["default"].isFormData(data)) { - if (_platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserWebWorkerEnv) { - headers.setContentType(undefined); // Let the browser set it - } else if ((contentType = headers.getContentType()) !== false) { - // fix semicolon duplication issue for ReactNative FormData implementation - const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; - headers.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); - } - } - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - - if (_platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserEnv) { - withXSRFToken && _utils_js__WEBPACK_IMPORTED_MODULE_4__["default"].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); - - if (withXSRFToken || (withXSRFToken !== false && (0,_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_6__["default"])(newConfig.url))) { - // Add xsrf header - const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__WEBPACK_IMPORTED_MODULE_7__["default"].read(xsrfCookieName); - - if (xsrfValue) { - headers.set(xsrfHeaderName, xsrfValue); - } - } - } - - return newConfig; -}); - - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/speedometer.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/speedometer.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/** - * Calculate data maxRate - * @param {Number} [samplesCount= 10] - * @param {Number} [min= 1000] - * @returns {Function} - */ -function speedometer(samplesCount, min) { - samplesCount = samplesCount || 10; - const bytes = new Array(samplesCount); - const timestamps = new Array(samplesCount); - let head = 0; - let tail = 0; - let firstSampleTS; - - min = min !== undefined ? min : 1000; - - return function push(chunkLength) { - const now = Date.now(); - - const startedAt = timestamps[tail]; - - if (!firstSampleTS) { - firstSampleTS = now; - } - - bytes[head] = chunkLength; - timestamps[head] = now; - - let i = tail; - let bytesCount = 0; - - while (i !== head) { - bytesCount += bytes[i++]; - i = i % samplesCount; - } - - head = (head + 1) % samplesCount; - - if (head === tail) { - tail = (tail + 1) % samplesCount; - } - - if (now - firstSampleTS < min) { - return; - } - - const passed = startedAt && now - startedAt; - - return passed ? Math.round(bytesCount * 1000 / passed) : undefined; - }; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (speedometer); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/spread.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/helpers/spread.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ spread) -/* harmony export */ }); - - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * - * @returns {Function} - */ -function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/throttle.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/throttle.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Throttle decorator - * @param {Function} fn - * @param {Number} freq - * @return {Function} - */ -function throttle(fn, freq) { - let timestamp = 0; - let threshold = 1000 / freq; - let lastArgs; - let timer; - - const invoke = (args, now = Date.now()) => { - timestamp = now; - lastArgs = null; - if (timer) { - clearTimeout(timer); - timer = null; - } - fn.apply(null, args); - } - - const throttled = (...args) => { - const now = Date.now(); - const passed = now - timestamp; - if ( passed >= threshold) { - invoke(args, now); - } else { - lastArgs = args; - if (!timer) { - timer = setTimeout(() => { - timer = null; - invoke(lastArgs) - }, threshold - passed); - } - } - } - - const flush = () => lastArgs && invoke(lastArgs); - - return [throttled, flush]; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (throttle); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/toFormData.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/toFormData.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/node/classes/FormData.js */ "./node_modules/axios/lib/helpers/null.js"); - - - - -// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored - - -/** - * Determines if the given thing is a array or js object. - * - * @param {string} thing - The object or array to be visited. - * - * @returns {boolean} - */ -function isVisitable(thing) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(thing) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(thing); -} - -/** - * It removes the brackets from the end of a string - * - * @param {string} key - The key of the parameter. - * - * @returns {string} the key without the brackets. - */ -function removeBrackets(key) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]') ? key.slice(0, -2) : key; -} - -/** - * It takes a path, a key, and a boolean, and returns a string - * - * @param {string} path - The path to the current key. - * @param {string} key - The key of the current object being iterated over. - * @param {string} dots - If true, the key will be rendered with dots instead of brackets. - * - * @returns {string} The path to the current key. - */ -function renderKey(path, key, dots) { - if (!path) return key; - return path.concat(key).map(function each(token, i) { - // eslint-disable-next-line no-param-reassign - token = removeBrackets(token); - return !dots && i ? '[' + token + ']' : token; - }).join(dots ? '.' : ''); -} - -/** - * If the array is an array and none of its elements are visitable, then it's a flat array. - * - * @param {Array} arr - The array to check - * - * @returns {boolean} - */ -function isFlatArray(arr) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(arr) && !arr.some(isVisitable); -} - -const predicates = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"], {}, null, function filter(prop) { - return /^is[A-Z]/.test(prop); -}); - -/** - * Convert a data object to FormData - * - * @param {Object} obj - * @param {?Object} [formData] - * @param {?Object} [options] - * @param {Function} [options.visitor] - * @param {Boolean} [options.metaTokens = true] - * @param {Boolean} [options.dots = false] - * @param {?Boolean} [options.indexes = false] - * - * @returns {Object} - **/ - -/** - * It converts an object into a FormData object - * - * @param {Object} obj - The object to convert to form data. - * @param {string} formData - The FormData object to append to. - * @param {Object} options - * - * @returns - */ -function toFormData(obj, formData, options) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) { - throw new TypeError('target must be an object'); - } - - // eslint-disable-next-line no-param-reassign - formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"] || FormData)(); - - // eslint-disable-next-line no-param-reassign - options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(options, { - metaTokens: true, - dots: false, - indexes: false - }, false, function defined(option, source) { - // eslint-disable-next-line no-eq-null,eqeqeq - return !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(source[option]); - }); - - const metaTokens = options.metaTokens; - // eslint-disable-next-line no-use-before-define - const visitor = options.visitor || defaultVisitor; - const dots = options.dots; - const indexes = options.indexes; - const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; - const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData); - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) { - throw new TypeError('visitor must be a function'); - } - - function convertValue(value) { - if (value === null) return ''; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isDate(value)) { - return value.toISOString(); - } - - if (!useBlob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(value)) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Blob is not supported. Use a Buffer instead.'); - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isTypedArray(value)) { - return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); - } - - return value; - } - - /** - * Default visitor. - * - * @param {*} value - * @param {String|Number} key - * @param {Array} path - * @this {FormData} - * - * @returns {boolean} return true to visit the each prop of the value recursively - */ - function defaultVisitor(value, key, path) { - let arr = value; - - if (value && !path && typeof value === 'object') { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '{}')) { - // eslint-disable-next-line no-param-reassign - key = metaTokens ? key : key.slice(0, -2); - // eslint-disable-next-line no-param-reassign - value = JSON.stringify(value); - } else if ( - (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) && isFlatArray(value)) || - ((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value)) - )) { - // eslint-disable-next-line no-param-reassign - key = removeBrackets(key); - - arr.forEach(function each(el, index) { - !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && formData.append( - // eslint-disable-next-line no-nested-ternary - indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), - convertValue(el) - ); - }); - return false; - } - } - - if (isVisitable(value)) { - return true; - } - - formData.append(renderKey(path, key, dots), convertValue(value)); - - return false; - } - - const stack = []; - - const exposedHelpers = Object.assign(predicates, { - defaultVisitor, - convertValue, - isVisitable - }); - - function build(value, path) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value)) return; - - if (stack.indexOf(value) !== -1) { - throw Error('Circular reference detected in ' + path.join('.')); - } - - stack.push(value); - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(value, function each(el, key) { - const result = !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && visitor.call( - formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(key) ? key.trim() : key, path, exposedHelpers - ); - - if (result === true) { - build(el, path ? path.concat(key) : [key]); - } - }); - - stack.pop(); - } - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) { - throw new TypeError('data must be an object'); - } - - build(obj); - - return formData; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toFormData); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/toURLEncodedForm.js": -/*!************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/toURLEncodedForm.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ toURLEncodedForm) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); - - - - - - -function toURLEncodedForm(data, options) { - return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].classes.URLSearchParams(), Object.assign({ - visitor: function(value, key, path, helpers) { - if (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isBuffer(value)) { - this.append(key, value.toString('base64')); - return false; - } - - return helpers.defaultVisitor.apply(this, arguments); - } - }, options)); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/trackStream.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/trackStream.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ readBytes: () => (/* binding */ readBytes), -/* harmony export */ streamChunk: () => (/* binding */ streamChunk), -/* harmony export */ trackStream: () => (/* binding */ trackStream) -/* harmony export */ }); - -const streamChunk = function* (chunk, chunkSize) { - let len = chunk.byteLength; - - if (!chunkSize || len < chunkSize) { - yield chunk; - return; - } - - let pos = 0; - let end; - - while (pos < len) { - end = pos + chunkSize; - yield chunk.slice(pos, end); - pos = end; - } -} - -const readBytes = async function* (iterable, chunkSize) { - for await (const chunk of readStream(iterable)) { - yield* streamChunk(chunk, chunkSize); - } -} - -const readStream = async function* (stream) { - if (stream[Symbol.asyncIterator]) { - yield* stream; - return; - } - - const reader = stream.getReader(); - try { - for (;;) { - const {done, value} = await reader.read(); - if (done) { - break; - } - yield value; - } - } finally { - await reader.cancel(); - } -} - -const trackStream = (stream, chunkSize, onProgress, onFinish) => { - const iterator = readBytes(stream, chunkSize); - - let bytes = 0; - let done; - let _onFinish = (e) => { - if (!done) { - done = true; - onFinish && onFinish(e); - } - } - - return new ReadableStream({ - async pull(controller) { - try { - const {done, value} = await iterator.next(); - - if (done) { - _onFinish(); - controller.close(); - return; - } - - let len = value.byteLength; - if (onProgress) { - let loadedBytes = bytes += len; - onProgress(loadedBytes); - } - controller.enqueue(new Uint8Array(value)); - } catch (err) { - _onFinish(err); - throw err; - } - }, - cancel(reason) { - _onFinish(reason); - return iterator.return(); - } - }, { - highWaterMark: 2 - }) -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/validator.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/validator.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../env/data.js */ "./node_modules/axios/lib/env/data.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - - - - - -const validators = {}; - -// eslint-disable-next-line func-names -['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { - validators[type] = function validator(thing) { - return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; - }; -}); - -const deprecatedWarnings = {}; - -/** - * Transitional option validator - * - * @param {function|boolean?} validator - set to false if the transitional option has been removed - * @param {string?} version - deprecated version / removed since version - * @param {string?} message - some message with additional info - * - * @returns {function} - */ -validators.transitional = function transitional(validator, version, message) { - function formatMessage(opt, desc) { - return '[Axios v' + _env_data_js__WEBPACK_IMPORTED_MODULE_0__.VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); - } - - // eslint-disable-next-line func-names - return (value, opt, opts) => { - if (validator === false) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]( - formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), - _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_DEPRECATED - ); - } - - if (version && !deprecatedWarnings[opt]) { - deprecatedWarnings[opt] = true; - // eslint-disable-next-line no-console - console.warn( - formatMessage( - opt, - ' has been deprecated since v' + version + ' and will be removed in the near future' - ) - ); - } - - return validator ? validator(value, opt, opts) : true; - }; -}; - -/** - * Assert object's properties type - * - * @param {object} options - * @param {object} schema - * @param {boolean?} allowUnknown - * - * @returns {object} - */ - -function assertOptions(options, schema, allowUnknown) { - if (typeof options !== 'object') { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('options must be an object', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE); - } - const keys = Object.keys(options); - let i = keys.length; - while (i-- > 0) { - const opt = keys[i]; - const validator = schema[opt]; - if (validator) { - const value = options[opt]; - const result = value === undefined || validator(value, opt, options); - if (result !== true) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('option ' + opt + ' must be ' + result, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE); - } - continue; - } - if (allowUnknown !== true) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('Unknown option ' + opt, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION); - } - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - assertOptions, - validators -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/classes/Blob.js": -/*!*****************************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/classes/Blob.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof Blob !== 'undefined' ? Blob : null); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/classes/FormData.js": -/*!*********************************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/classes/FormData.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof FormData !== 'undefined' ? FormData : null); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js": -/*!****************************************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js ***! - \****************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/index.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"); -/* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/FormData.js */ "./node_modules/axios/lib/platform/browser/classes/FormData.js"); -/* harmony import */ var _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./classes/Blob.js */ "./node_modules/axios/lib/platform/browser/classes/Blob.js"); - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - isBrowser: true, - classes: { - URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"], - FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"], - Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"] - }, - protocols: ['http', 'https', 'file', 'blob', 'url', 'data'] -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/common/utils.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/platform/common/utils.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ hasBrowserEnv: () => (/* binding */ hasBrowserEnv), -/* harmony export */ hasStandardBrowserEnv: () => (/* binding */ hasStandardBrowserEnv), -/* harmony export */ hasStandardBrowserWebWorkerEnv: () => (/* binding */ hasStandardBrowserWebWorkerEnv), -/* harmony export */ navigator: () => (/* binding */ _navigator), -/* harmony export */ origin: () => (/* binding */ origin) -/* harmony export */ }); -const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; - -const _navigator = typeof navigator === 'object' && navigator || undefined; - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - * - * @returns {boolean} - */ -const hasStandardBrowserEnv = hasBrowserEnv && - (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); - -/** - * Determine if we're running in a standard browser webWorker environment - * - * Although the `isStandardBrowserEnv` method indicates that - * `allows axios to run in a web worker`, the WebWorker will still be - * filtered out due to its judgment standard - * `typeof window !== 'undefined' && typeof document !== 'undefined'`. - * This leads to a problem when axios post `FormData` in webWorker - */ -const hasStandardBrowserWebWorkerEnv = (() => { - return ( - typeof WorkerGlobalScope !== 'undefined' && - // eslint-disable-next-line no-undef - self instanceof WorkerGlobalScope && - typeof self.importScripts === 'function' - ); -})(); - -const origin = hasBrowserEnv && window.location.href || 'http://localhost'; - - - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/index.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/platform/index.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _node_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node/index.js */ "./node_modules/axios/lib/platform/browser/index.js"); -/* harmony import */ var _common_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/utils.js */ "./node_modules/axios/lib/platform/common/utils.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - ..._common_utils_js__WEBPACK_IMPORTED_MODULE_0__, - ..._node_index_js__WEBPACK_IMPORTED_MODULE_1__["default"] -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/utils.js": -/*!*****************************************!*\ - !*** ./node_modules/axios/lib/utils.js ***! - \*****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js"); - - - - -// utils is a library of generic helper functions non-specific to axios - -const {toString} = Object.prototype; -const {getPrototypeOf} = Object; - -const kindOf = (cache => thing => { - const str = toString.call(thing); - return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); -})(Object.create(null)); - -const kindOfTest = (type) => { - type = type.toLowerCase(); - return (thing) => kindOf(thing) === type -} - -const typeOfTest = type => thing => typeof thing === type; - -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * - * @returns {boolean} True if value is an Array, otherwise false - */ -const {isArray} = Array; - -/** - * Determine if a value is undefined - * - * @param {*} val The value to test - * - * @returns {boolean} True if the value is undefined, otherwise false - */ -const isUndefined = typeOfTest('undefined'); - -/** - * Determine if a value is a Buffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Buffer, otherwise false - */ -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); -} - -/** - * Determine if a value is an ArrayBuffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -const isArrayBuffer = kindOfTest('ArrayBuffer'); - - -/** - * Determine if a value is a view on an ArrayBuffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - let result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); - } - return result; -} - -/** - * Determine if a value is a String - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a String, otherwise false - */ -const isString = typeOfTest('string'); - -/** - * Determine if a value is a Function - * - * @param {*} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -const isFunction = typeOfTest('function'); - -/** - * Determine if a value is a Number - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Number, otherwise false - */ -const isNumber = typeOfTest('number'); - -/** - * Determine if a value is an Object - * - * @param {*} thing The value to test - * - * @returns {boolean} True if value is an Object, otherwise false - */ -const isObject = (thing) => thing !== null && typeof thing === 'object'; - -/** - * Determine if a value is a Boolean - * - * @param {*} thing The value to test - * @returns {boolean} True if value is a Boolean, otherwise false - */ -const isBoolean = thing => thing === true || thing === false; - -/** - * Determine if a value is a plain Object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a plain Object, otherwise false - */ -const isPlainObject = (val) => { - if (kindOf(val) !== 'object') { - return false; - } - - const prototype = getPrototypeOf(val); - return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); -} - -/** - * Determine if a value is a Date - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Date, otherwise false - */ -const isDate = kindOfTest('Date'); - -/** - * Determine if a value is a File - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a File, otherwise false - */ -const isFile = kindOfTest('File'); - -/** - * Determine if a value is a Blob - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Blob, otherwise false - */ -const isBlob = kindOfTest('Blob'); - -/** - * Determine if a value is a FileList - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a File, otherwise false - */ -const isFileList = kindOfTest('FileList'); - -/** - * Determine if a value is a Stream - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Stream, otherwise false - */ -const isStream = (val) => isObject(val) && isFunction(val.pipe); - -/** - * Determine if a value is a FormData - * - * @param {*} thing The value to test - * - * @returns {boolean} True if value is an FormData, otherwise false - */ -const isFormData = (thing) => { - let kind; - return thing && ( - (typeof FormData === 'function' && thing instanceof FormData) || ( - isFunction(thing.append) && ( - (kind = kindOf(thing)) === 'formdata' || - // detect form-data instance - (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') - ) - ) - ) -} - -/** - * Determine if a value is a URLSearchParams object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -const isURLSearchParams = kindOfTest('URLSearchParams'); - -const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest); - -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * - * @returns {String} The String freed of excess whitespace - */ -const trim = (str) => str.trim ? - str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - * - * @param {Boolean} [allOwnKeys = false] - * @returns {any} - */ -function forEach(obj, fn, {allOwnKeys = false} = {}) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - let i; - let l; - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); - const len = keys.length; - let key; - - for (i = 0; i < len; i++) { - key = keys[i]; - fn.call(null, obj[key], key, obj); - } - } -} - -function findKey(obj, key) { - key = key.toLowerCase(); - const keys = Object.keys(obj); - let i = keys.length; - let _key; - while (i-- > 0) { - _key = keys[i]; - if (key === _key.toLowerCase()) { - return _key; - } - } - return null; -} - -const _global = (() => { - /*eslint no-undef:0*/ - if (typeof globalThis !== "undefined") return globalThis; - return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global) -})(); - -const isContextDefined = (context) => !isUndefined(context) && context !== _global; - -/** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - const {caseless} = isContextDefined(this) && this || {}; - const result = {}; - const assignValue = (val, key) => { - const targetKey = caseless && findKey(result, key) || key; - if (isPlainObject(result[targetKey]) && isPlainObject(val)) { - result[targetKey] = merge(result[targetKey], val); - } else if (isPlainObject(val)) { - result[targetKey] = merge({}, val); - } else if (isArray(val)) { - result[targetKey] = val.slice(); - } else { - result[targetKey] = val; - } - } - - for (let i = 0, l = arguments.length; i < l; i++) { - arguments[i] && forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * - * @param {Boolean} [allOwnKeys] - * @returns {Object} The resulting value of object a - */ -const extend = (a, b, thisArg, {allOwnKeys}= {}) => { - forEach(b, (val, key) => { - if (thisArg && isFunction(val)) { - a[key] = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__["default"])(val, thisArg); - } else { - a[key] = val; - } - }, {allOwnKeys}); - return a; -} - -/** - * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - * - * @param {string} content with BOM - * - * @returns {string} content value without BOM - */ -const stripBOM = (content) => { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -} - -/** - * Inherit the prototype methods from one constructor into another - * @param {function} constructor - * @param {function} superConstructor - * @param {object} [props] - * @param {object} [descriptors] - * - * @returns {void} - */ -const inherits = (constructor, superConstructor, props, descriptors) => { - constructor.prototype = Object.create(superConstructor.prototype, descriptors); - constructor.prototype.constructor = constructor; - Object.defineProperty(constructor, 'super', { - value: superConstructor.prototype - }); - props && Object.assign(constructor.prototype, props); -} - -/** - * Resolve object with deep prototype chain to a flat object - * @param {Object} sourceObj source object - * @param {Object} [destObj] - * @param {Function|Boolean} [filter] - * @param {Function} [propFilter] - * - * @returns {Object} - */ -const toFlatObject = (sourceObj, destObj, filter, propFilter) => { - let props; - let i; - let prop; - const merged = {}; - - destObj = destObj || {}; - // eslint-disable-next-line no-eq-null,eqeqeq - if (sourceObj == null) return destObj; - - do { - props = Object.getOwnPropertyNames(sourceObj); - i = props.length; - while (i-- > 0) { - prop = props[i]; - if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { - destObj[prop] = sourceObj[prop]; - merged[prop] = true; - } - } - sourceObj = filter !== false && getPrototypeOf(sourceObj); - } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); - - return destObj; -} - -/** - * Determines whether a string ends with the characters of a specified string - * - * @param {String} str - * @param {String} searchString - * @param {Number} [position= 0] - * - * @returns {boolean} - */ -const endsWith = (str, searchString, position) => { - str = String(str); - if (position === undefined || position > str.length) { - position = str.length; - } - position -= searchString.length; - const lastIndex = str.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; -} - - -/** - * Returns new array from array like object or null if failed - * - * @param {*} [thing] - * - * @returns {?Array} - */ -const toArray = (thing) => { - if (!thing) return null; - if (isArray(thing)) return thing; - let i = thing.length; - if (!isNumber(i)) return null; - const arr = new Array(i); - while (i-- > 0) { - arr[i] = thing[i]; - } - return arr; -} - -/** - * Checking if the Uint8Array exists and if it does, it returns a function that checks if the - * thing passed in is an instance of Uint8Array - * - * @param {TypedArray} - * - * @returns {Array} - */ -// eslint-disable-next-line func-names -const isTypedArray = (TypedArray => { - // eslint-disable-next-line func-names - return thing => { - return TypedArray && thing instanceof TypedArray; - }; -})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); - -/** - * For each entry in the object, call the function with the key and value. - * - * @param {Object} obj - The object to iterate over. - * @param {Function} fn - The function to call for each entry. - * - * @returns {void} - */ -const forEachEntry = (obj, fn) => { - const generator = obj && obj[Symbol.iterator]; - - const iterator = generator.call(obj); - - let result; - - while ((result = iterator.next()) && !result.done) { - const pair = result.value; - fn.call(obj, pair[0], pair[1]); - } -} - -/** - * It takes a regular expression and a string, and returns an array of all the matches - * - * @param {string} regExp - The regular expression to match against. - * @param {string} str - The string to search. - * - * @returns {Array} - */ -const matchAll = (regExp, str) => { - let matches; - const arr = []; - - while ((matches = regExp.exec(str)) !== null) { - arr.push(matches); - } - - return arr; -} - -/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ -const isHTMLForm = kindOfTest('HTMLFormElement'); - -const toCamelCase = str => { - return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, - function replacer(m, p1, p2) { - return p1.toUpperCase() + p2; - } - ); -}; - -/* Creating a function that will check if an object has a property. */ -const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); - -/** - * Determine if a value is a RegExp object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a RegExp object, otherwise false - */ -const isRegExp = kindOfTest('RegExp'); - -const reduceDescriptors = (obj, reducer) => { - const descriptors = Object.getOwnPropertyDescriptors(obj); - const reducedDescriptors = {}; - - forEach(descriptors, (descriptor, name) => { - let ret; - if ((ret = reducer(descriptor, name, obj)) !== false) { - reducedDescriptors[name] = ret || descriptor; - } - }); - - Object.defineProperties(obj, reducedDescriptors); -} - -/** - * Makes all methods read-only - * @param {Object} obj - */ - -const freezeMethods = (obj) => { - reduceDescriptors(obj, (descriptor, name) => { - // skip restricted props in strict mode - if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { - return false; - } - - const value = obj[name]; - - if (!isFunction(value)) return; - - descriptor.enumerable = false; - - if ('writable' in descriptor) { - descriptor.writable = false; - return; - } - - if (!descriptor.set) { - descriptor.set = () => { - throw Error('Can not rewrite read-only method \'' + name + '\''); - }; - } - }); -} - -const toObjectSet = (arrayOrString, delimiter) => { - const obj = {}; - - const define = (arr) => { - arr.forEach(value => { - obj[value] = true; - }); - } - - isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); - - return obj; -} - -const noop = () => {} - -const toFiniteNumber = (value, defaultValue) => { - return value != null && Number.isFinite(value = +value) ? value : defaultValue; -} - -const ALPHA = 'abcdefghijklmnopqrstuvwxyz' - -const DIGIT = '0123456789'; - -const ALPHABET = { - DIGIT, - ALPHA, - ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT -} - -const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str = ''; - const {length} = alphabet; - while (size--) { - str += alphabet[Math.random() * length|0] - } - - return str; -} - -/** - * If the thing is a FormData object, return true, otherwise return false. - * - * @param {unknown} thing - The thing to check. - * - * @returns {boolean} - */ -function isSpecCompliantForm(thing) { - return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]); -} - -const toJSONObject = (obj) => { - const stack = new Array(10); - - const visit = (source, i) => { - - if (isObject(source)) { - if (stack.indexOf(source) >= 0) { - return; - } - - if(!('toJSON' in source)) { - stack[i] = source; - const target = isArray(source) ? [] : {}; - - forEach(source, (value, key) => { - const reducedValue = visit(value, i + 1); - !isUndefined(reducedValue) && (target[key] = reducedValue); - }); - - stack[i] = undefined; - - return target; - } - } - - return source; - } - - return visit(obj, 0); -} - -const isAsyncFn = kindOfTest('AsyncFunction'); - -const isThenable = (thing) => - thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); - -// original code -// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 - -const _setImmediate = ((setImmediateSupported, postMessageSupported) => { - if (setImmediateSupported) { - return setImmediate; - } - - return postMessageSupported ? ((token, callbacks) => { - _global.addEventListener("message", ({source, data}) => { - if (source === _global && data === token) { - callbacks.length && callbacks.shift()(); - } - }, false); - - return (cb) => { - callbacks.push(cb); - _global.postMessage(token, "*"); - } - })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); -})( - typeof setImmediate === 'function', - isFunction(_global.postMessage) -); - -const asap = typeof queueMicrotask !== 'undefined' ? - queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate); - -// ********************* - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - isArray, - isArrayBuffer, - isBuffer, - isFormData, - isArrayBufferView, - isString, - isNumber, - isBoolean, - isObject, - isPlainObject, - isReadableStream, - isRequest, - isResponse, - isHeaders, - isUndefined, - isDate, - isFile, - isBlob, - isRegExp, - isFunction, - isStream, - isURLSearchParams, - isTypedArray, - isFileList, - forEach, - merge, - extend, - trim, - stripBOM, - inherits, - toFlatObject, - kindOf, - kindOfTest, - endsWith, - toArray, - forEachEntry, - matchAll, - isHTMLForm, - hasOwnProperty, - hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection - reduceDescriptors, - freezeMethods, - toObjectSet, - toCamelCase, - noop, - toFiniteNumber, - findKey, - global: _global, - isContextDefined, - ALPHABET, - generateString, - isSpecCompliantForm, - toJSONObject, - isAsyncFn, - isThenable, - setImmediate: _setImmediate, - asap -}); - - -/***/ }), - -/***/ "./node_modules/react-intersection-observer/dist/index.mjs": -/*!*****************************************************************!*\ - !*** ./node_modules/react-intersection-observer/dist/index.mjs ***! - \*****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ InView: () => (/* binding */ InView), -/* harmony export */ defaultFallbackInView: () => (/* binding */ defaultFallbackInView), -/* harmony export */ observe: () => (/* binding */ observe), -/* harmony export */ useInView: () => (/* binding */ useInView) -/* harmony export */ }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); -"use client"; -var __defProp = Object.defineProperty; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); - -// src/InView.tsx - - -// src/observe.ts -var observerMap = /* @__PURE__ */ new Map(); -var RootIds = /* @__PURE__ */ new WeakMap(); -var rootId = 0; -var unsupportedValue = void 0; -function defaultFallbackInView(inView) { - unsupportedValue = inView; -} -function getRootId(root) { - if (!root) return "0"; - if (RootIds.has(root)) return RootIds.get(root); - rootId += 1; - RootIds.set(root, rootId.toString()); - return RootIds.get(root); -} -function optionsToId(options) { - return Object.keys(options).sort().filter( - (key) => options[key] !== void 0 - ).map((key) => { - return `${key}_${key === "root" ? getRootId(options.root) : options[key]}`; - }).toString(); -} -function createObserver(options) { - const id = optionsToId(options); - let instance = observerMap.get(id); - if (!instance) { - const elements = /* @__PURE__ */ new Map(); - let thresholds; - const observer = new IntersectionObserver((entries) => { - entries.forEach((entry) => { - var _a; - const inView = entry.isIntersecting && thresholds.some((threshold) => entry.intersectionRatio >= threshold); - if (options.trackVisibility && typeof entry.isVisible === "undefined") { - entry.isVisible = inView; - } - (_a = elements.get(entry.target)) == null ? void 0 : _a.forEach((callback) => { - callback(inView, entry); - }); - }); - }, options); - thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]); - instance = { - id, - observer, - elements - }; - observerMap.set(id, instance); - } - return instance; -} -function observe(element, callback, options = {}, fallbackInView = unsupportedValue) { - if (typeof window.IntersectionObserver === "undefined" && fallbackInView !== void 0) { - const bounds = element.getBoundingClientRect(); - callback(fallbackInView, { - isIntersecting: fallbackInView, - target: element, - intersectionRatio: typeof options.threshold === "number" ? options.threshold : 0, - time: 0, - boundingClientRect: bounds, - intersectionRect: bounds, - rootBounds: bounds - }); - return () => { - }; - } - const { id, observer, elements } = createObserver(options); - const callbacks = elements.get(element) || []; - if (!elements.has(element)) { - elements.set(element, callbacks); - } - callbacks.push(callback); - observer.observe(element); - return function unobserve() { - callbacks.splice(callbacks.indexOf(callback), 1); - if (callbacks.length === 0) { - elements.delete(element); - observer.unobserve(element); - } - if (elements.size === 0) { - observer.disconnect(); - observerMap.delete(id); - } - }; -} - -// src/InView.tsx -function isPlainChildren(props) { - return typeof props.children !== "function"; -} -var InView = class extends react__WEBPACK_IMPORTED_MODULE_0__.Component { - constructor(props) { - super(props); - __publicField(this, "node", null); - __publicField(this, "_unobserveCb", null); - __publicField(this, "handleNode", (node) => { - if (this.node) { - this.unobserve(); - if (!node && !this.props.triggerOnce && !this.props.skip) { - this.setState({ inView: !!this.props.initialInView, entry: void 0 }); - } - } - this.node = node ? node : null; - this.observeNode(); - }); - __publicField(this, "handleChange", (inView, entry) => { - if (inView && this.props.triggerOnce) { - this.unobserve(); - } - if (!isPlainChildren(this.props)) { - this.setState({ inView, entry }); - } - if (this.props.onChange) { - this.props.onChange(inView, entry); - } - }); - this.state = { - inView: !!props.initialInView, - entry: void 0 - }; - } - componentDidMount() { - this.unobserve(); - this.observeNode(); - } - componentDidUpdate(prevProps) { - if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) { - this.unobserve(); - this.observeNode(); - } - } - componentWillUnmount() { - this.unobserve(); - } - observeNode() { - if (!this.node || this.props.skip) return; - const { - threshold, - root, - rootMargin, - trackVisibility, - delay, - fallbackInView - } = this.props; - this._unobserveCb = observe( - this.node, - this.handleChange, - { - threshold, - root, - rootMargin, - // @ts-ignore - trackVisibility, - // @ts-ignore - delay - }, - fallbackInView - ); - } - unobserve() { - if (this._unobserveCb) { - this._unobserveCb(); - this._unobserveCb = null; - } - } - render() { - const { children } = this.props; - if (typeof children === "function") { - const { inView, entry } = this.state; - return children({ inView, entry, ref: this.handleNode }); - } - const { - as, - triggerOnce, - threshold, - root, - rootMargin, - onChange, - skip, - trackVisibility, - delay, - initialInView, - fallbackInView, - ...props - } = this.props; - return react__WEBPACK_IMPORTED_MODULE_0__.createElement( - as || "div", - { ref: this.handleNode, ...props }, - children - ); - } -}; - -// src/useInView.tsx - -function useInView({ - threshold, - delay, - trackVisibility, - rootMargin, - root, - triggerOnce, - skip, - initialInView, - fallbackInView, - onChange -} = {}) { - var _a; - const [ref, setRef] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); - const callback = react__WEBPACK_IMPORTED_MODULE_0__.useRef(); - const [state, setState] = react__WEBPACK_IMPORTED_MODULE_0__.useState({ - inView: !!initialInView, - entry: void 0 - }); - callback.current = onChange; - react__WEBPACK_IMPORTED_MODULE_0__.useEffect( - () => { - if (skip || !ref) return; - let unobserve; - unobserve = observe( - ref, - (inView, entry) => { - setState({ - inView, - entry - }); - if (callback.current) callback.current(inView, entry); - if (entry.isIntersecting && triggerOnce && unobserve) { - unobserve(); - unobserve = void 0; - } - }, - { - root, - rootMargin, - threshold, - // @ts-ignore - trackVisibility, - // @ts-ignore - delay - }, - fallbackInView - ); - return () => { - if (unobserve) { - unobserve(); - } - }; - }, - // We break the rule here, because we aren't including the actual `threshold` variable - // eslint-disable-next-line react-hooks/exhaustive-deps - [ - // If the threshold is an array, convert it to a string, so it won't change between renders. - Array.isArray(threshold) ? threshold.toString() : threshold, - ref, - root, - rootMargin, - triggerOnce, - skip, - trackVisibility, - fallbackInView, - delay - ] - ); - const entryTarget = (_a = state.entry) == null ? void 0 : _a.target; - const previousEntryTarget = react__WEBPACK_IMPORTED_MODULE_0__.useRef(); - if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) { - previousEntryTarget.current = entryTarget; - setState({ - inView: !!initialInView, - entry: void 0 - }); - } - const result = [setRef, state.inView, state.entry]; - result.ref = result[0]; - result.inView = result[1]; - result.entry = result[2]; - return result; -} - -//# sourceMappingURL=index.mjs.map - -/***/ }), - -/***/ "./src/js/editor/block/block.json": -/*!****************************************!*\ - !*** ./src/js/editor/block/block.json ***! - \****************************************/ -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"connekthq/instant-images","version":"1.0.0","title":"Instant Images","category":"media","description":"One click photo uploads from Unsplash, Openverse, Pixabay and Pexels.","keywords":["image","instant images","photo","stock photos","Unsplash","Openverse","Pixabay","Pexels"],"attributes":{},"supports":{"customClassName":false,"anchor":false,"html":false},"textdomain":"instant-images","editorScript":"file:./index.js"}'); - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/compat get default export */ -/******/ (() => { -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = (module) => { -/******/ var getter = module && module.__esModule ? -/******/ () => (module['default']) : -/******/ () => (module); -/******/ __webpack_require__.d(getter, { a: getter }); -/******/ return getter; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/global */ -/******/ (() => { -/******/ __webpack_require__.g = (function() { -/******/ if (typeof globalThis === 'object') return globalThis; -/******/ try { -/******/ return this || new Function('return this')(); -/******/ } catch (e) { -/******/ if (typeof window === 'object') return window; -/******/ } -/******/ })(); -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/publicPath */ -/******/ (() => { -/******/ var scriptUrl; -/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; -/******/ var document = __webpack_require__.g.document; -/******/ if (!scriptUrl && document) { -/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') -/******/ scriptUrl = document.currentScript.src; -/******/ if (!scriptUrl) { -/******/ var scripts = document.getElementsByTagName("script"); -/******/ if(scripts.length) { -/******/ var i = scripts.length - 1; -/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; -/******/ } -/******/ } -/******/ } -/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration -/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. -/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); -/******/ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); -/******/ __webpack_require__.p = scriptUrl + "../"; -/******/ })(); -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. -(() => { -"use strict"; -/*!**************************************!*\ - !*** ./src/js/editor/block/index.js ***! - \**************************************/ -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/help.js"); -/* harmony import */ var _components_Icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/Icon */ "./src/js/components/Icon.js"); -/* harmony import */ var _components_InstantImages__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/InstantImages */ "./src/js/components/InstantImages.js"); -/* harmony import */ var _functions_getProvider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../functions/getProvider */ "./src/js/functions/getProvider.js"); -/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./block.json */ "./src/js/editor/block/block.json"); -/* harmony import */ var _components_Help__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./components/Help */ "./src/js/editor/block/components/Help.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - - - - - - - - - - - - -// Register the block -(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)('connekthq/instant-images', _objectSpread(_objectSpread({}, _block_json__WEBPACK_IMPORTED_MODULE_8__), {}, { - icon: _components_Icon__WEBPACK_IMPORTED_MODULE_5__.IconLogo, - edit: function edit(_ref) { - var clientId = _ref.clientId; - return /*#__PURE__*/React.createElement(InstantImagesBlock, { - clientId: clientId - }); - }, - save: function save() { - return /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, null); - } -})); - -/** - * Render the InstantImages component. - * - * @param {Object} props The component props. - * @param {string} props.clientId WP block client ID. - * @return {JSX.Element} The InstantImagesBlock component. - */ -function InstantImagesBlock(_ref2) { - var clientId = _ref2.clientId; - var provider = (0,_functions_getProvider__WEBPACK_IMPORTED_MODULE_7__["default"])(); - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - mounted = _useState2[0], - setMounted = _useState2[1]; - var containerRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)(); - var blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps)({ - className: "instant-images-block" - }); - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () { - if (!mounted) { - setMounted(true); - } - }, []); // eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement("div", blockProps, /*#__PURE__*/React.createElement("div", { - className: "instant-img-container", - "data-editor": "block", - ref: containerRef - }, /*#__PURE__*/React.createElement(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.BlockControls, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToolbarGroup, null, /*#__PURE__*/React.createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToolbarDropdownMenu, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Help', 'instant-images'), - icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"] - }, function () { - return /*#__PURE__*/React.createElement(_components_Help__WEBPACK_IMPORTED_MODULE_9__["default"], null); - }))), !!mounted && /*#__PURE__*/React.createElement(_components_InstantImages__WEBPACK_IMPORTED_MODULE_6__["default"], { - editor: "block", - provider: provider, - clientId: clientId, - data: [], - container: containerRef === null || containerRef === void 0 ? void 0 : containerRef.current - }))); -} -})(); - -/******/ })() -; -//# sourceMappingURL=index.js.map \ No newline at end of file +(()=>{var e={955:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],a=[],s=[],l=[],c=[],u=[],f=[],h=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var m=e[n],v=e[m],g=e[v],y=257*e[p]^16843008*p;a[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,l[n]=y<<8|y>>>24,c[n]=y,y=16843009*g^65537*v^257*m^16843008*n,u[p]=y<<24|y>>>8,f[p]=y<<16|y>>>16,h[p]=y<<8|y>>>24,d[p]=y,n?(n=m^e[e[e[g^m]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a6&&a%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[a/n|0]<<24),o[a]=o[a-n]^c);for(var s=this._invKeySchedule=[],l=0;l>>24]]^f[i[c>>>16&255]]^h[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,l,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,f,h,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,a,s){for(var l=this._nRounds,c=e[t]^n[0],u=e[t+1]^n[1],f=e[t+2]^n[2],h=e[t+3]^n[3],d=4,p=1;p>>24]^i[u>>>16&255]^o[f>>>8&255]^a[255&h]^n[d++],v=r[u>>>24]^i[f>>>16&255]^o[h>>>8&255]^a[255&c]^n[d++],g=r[f>>>24]^i[h>>>16&255]^o[c>>>8&255]^a[255&u]^n[d++],y=r[h>>>24]^i[c>>>16&255]^o[u>>>8&255]^a[255&f]^n[d++];c=m,u=v,f=g,h=y}m=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^n[d++],v=(s[u>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^n[d++],g=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^n[d++],y=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&f])^n[d++],e[t]=m,e[t+1]=v,e[t+2]=g,e[t+3]=y},keySize:8});e.AES=t._createHelper(m)}(),r.AES)},3128:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.BlockCipher,n=e.algo;const i=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function l(e,t){let n=t>>24&255,r=t>>16&255,i=t>>8&255,o=255&t,a=e.sbox[0][n]+e.sbox[1][r];return a^=e.sbox[2][i],a+=e.sbox[3][o],a}function c(e,t,n){let r,o=t,a=n;for(let t=0;t=n&&(r=0);let i=0,s=0,l=0;for(let t=0;t<18;t+=2)l=c(e,i,s),i=l.left,s=l.right,e.pbox[t]=i,e.pbox[t+1]=s;for(let t=0;t<4;t++)for(let n=0;n<256;n+=2)l=c(e,i,s),i=l.left,s=l.right,e.sbox[t][n]=i,e.sbox[t][n+1]=s}(s,t,n)}},encryptBlock:function(e,t){var n=c(s,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},decryptBlock:function(e,t){var n=function(e,t,n){let r,i=t,o=n;for(let t=17;t>1;--t)i^=e.pbox[t],o=l(e,i)^o,r=i,i=o,o=r;return r=i,i=o,o=r,o^=e.pbox[1],i^=e.pbox[0],{left:i,right:o}}(s,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=t._createHelper(u)}(),r.Blowfish)},7165:function(e,t,n){var r,i,o,a,s,l,c,u,f,h,d,p,m,v,g,y,b,_,w;e.exports=(r=n(9021),n(9506),void(r.lib.Cipher||(i=r,o=i.lib,a=o.Base,s=o.WordArray,l=o.BufferedBlockAlgorithm,c=i.enc,c.Utf8,u=c.Base64,f=i.algo.EvpKDF,h=o.Cipher=l.extend({cfg:a.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){l.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?w:b}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),o.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),d=i.mode={},p=o.BlockCipherMode=a.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),m=d.CBC=function(){var e=p.extend();function t(e,t,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},o.BlockCipher=h.extend({cfg:h.cfg.extend({mode:m,padding:v}),reset:function(){var e;h.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),g=o.CipherParams=a.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),y=(i.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?s.create([1398893684,1701076831]).concat(n).concat(t):t).toString(u)},parse:function(e){var t,n=u.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=s.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:t})}},b=o.SerializableCipher=a.extend({cfg:a.extend({format:y}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),a=i.cfg;return g.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=(i.kdf={}).OpenSSL={execute:function(e,t,n,r,i){if(r||(r=s.random(8)),i)o=f.create({keySize:t+n,hasher:i}).compute(e,r);else var o=f.create({keySize:t+n}).compute(e,r);var a=s.create(o.words.slice(t),4*n);return o.sigBytes=4*t,g.create({key:o,iv:a,salt:r})}},w=o.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:_}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=i.iv;var o=b.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=i.iv,b.decrypt.call(this,e,t,i.key,r)}}))))},9021:function(e,t,n){var r;e.exports=(r=r||function(e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),"undefined"!=typeof self&&self.crypto&&(t=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(t=globalThis.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&void 0!==n.g&&n.g.crypto&&(t=n.g.crypto),!t)try{t=n(477)}catch(e){}var r=function(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},a=o.lib={},s=a.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=a.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},f=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new l.init(n,t)}},h=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},d=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,u=e.min(4*c,o);if(c){for(var f=0;f>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i>>6-a%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return o.create(r,i)}(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},r.enc.Base64)},4725:function(e,t,n){var r,i,o;e.exports=(r=n(9021),o=(i=r).lib.WordArray,i.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var n=e.words,r=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,l=0;l<4&&a+.75*l>>6*(3-l)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e,t){void 0===t&&(t=!0);var n=e.length,r=t?this._safe_map:this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var a=0;a>>6-a%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return o.create(r,i)}(e,n,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},r.enc.Base64url)},5503:function(e,t,n){var r;e.exports=(r=n(9021),function(){var e=r,t=e.lib.WordArray,n=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var n=e.length,r=[],i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(r,2*n)}},n.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var n=e.length,r=[],o=0;o>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(r,2*n)}}}(),r.enc.Utf16)},9506:function(e,t,n){var r,i,o,a,s,l,c,u;e.exports=(u=n(9021),n(5471),n(1025),o=(i=(r=u).lib).Base,a=i.WordArray,l=(s=r.algo).MD5,c=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:l,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,i=r.hasher.create(),o=a.create(),s=o.words,l=r.keySize,c=r.iterations;s.lengthr&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),s=i.words,l=a.words,c=0;c>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)};n.prototype=e}}(),r.lib.WordArray)},4636:function(e,t,n){var r;e.exports=(r=n(9021),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],l=e[t+1],d=e[t+2],p=e[t+3],m=e[t+4],v=e[t+5],g=e[t+6],y=e[t+7],b=e[t+8],_=e[t+9],w=e[t+10],E=e[t+11],R=e[t+12],S=e[t+13],x=e[t+14],k=e[t+15],O=o[0],C=o[1],A=o[2],B=o[3];O=c(O,C,A,B,a,7,s[0]),B=c(B,O,C,A,l,12,s[1]),A=c(A,B,O,C,d,17,s[2]),C=c(C,A,B,O,p,22,s[3]),O=c(O,C,A,B,m,7,s[4]),B=c(B,O,C,A,v,12,s[5]),A=c(A,B,O,C,g,17,s[6]),C=c(C,A,B,O,y,22,s[7]),O=c(O,C,A,B,b,7,s[8]),B=c(B,O,C,A,_,12,s[9]),A=c(A,B,O,C,w,17,s[10]),C=c(C,A,B,O,E,22,s[11]),O=c(O,C,A,B,R,7,s[12]),B=c(B,O,C,A,S,12,s[13]),A=c(A,B,O,C,x,17,s[14]),O=u(O,C=c(C,A,B,O,k,22,s[15]),A,B,l,5,s[16]),B=u(B,O,C,A,g,9,s[17]),A=u(A,B,O,C,E,14,s[18]),C=u(C,A,B,O,a,20,s[19]),O=u(O,C,A,B,v,5,s[20]),B=u(B,O,C,A,w,9,s[21]),A=u(A,B,O,C,k,14,s[22]),C=u(C,A,B,O,m,20,s[23]),O=u(O,C,A,B,_,5,s[24]),B=u(B,O,C,A,x,9,s[25]),A=u(A,B,O,C,p,14,s[26]),C=u(C,A,B,O,b,20,s[27]),O=u(O,C,A,B,S,5,s[28]),B=u(B,O,C,A,d,9,s[29]),A=u(A,B,O,C,y,14,s[30]),O=f(O,C=u(C,A,B,O,R,20,s[31]),A,B,v,4,s[32]),B=f(B,O,C,A,b,11,s[33]),A=f(A,B,O,C,E,16,s[34]),C=f(C,A,B,O,x,23,s[35]),O=f(O,C,A,B,l,4,s[36]),B=f(B,O,C,A,m,11,s[37]),A=f(A,B,O,C,y,16,s[38]),C=f(C,A,B,O,w,23,s[39]),O=f(O,C,A,B,S,4,s[40]),B=f(B,O,C,A,a,11,s[41]),A=f(A,B,O,C,p,16,s[42]),C=f(C,A,B,O,g,23,s[43]),O=f(O,C,A,B,_,4,s[44]),B=f(B,O,C,A,R,11,s[45]),A=f(A,B,O,C,k,16,s[46]),O=h(O,C=f(C,A,B,O,d,23,s[47]),A,B,a,6,s[48]),B=h(B,O,C,A,y,10,s[49]),A=h(A,B,O,C,x,15,s[50]),C=h(C,A,B,O,v,21,s[51]),O=h(O,C,A,B,R,6,s[52]),B=h(B,O,C,A,p,10,s[53]),A=h(A,B,O,C,w,15,s[54]),C=h(C,A,B,O,l,21,s[55]),O=h(O,C,A,B,b,6,s[56]),B=h(B,O,C,A,k,10,s[57]),A=h(A,B,O,C,g,15,s[58]),C=h(C,A,B,O,S,21,s[59]),O=h(O,C,A,B,m,6,s[60]),B=h(B,O,C,A,E,10,s[61]),A=h(A,B,O,C,d,15,s[62]),C=h(C,A,B,O,_,21,s[63]),o[0]=o[0]+O|0,o[1]=o[1]+C|0,o[2]=o[2]+A|0,o[3]=o[3]+B|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+i+a;return(s<>>32-o)+t}function u(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+i+a;return(s<>>32-o)+t}function f(e,t,n,r,i,o,a){var s=e+(t^n^r)+i+a;return(s<>>32-o)+t}function h(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+i+a;return(s<>>32-o)+t}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),r.MD5)},2169:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();function t(e,t,n,r){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var a=0;a>24))e+=1<<24;else{var t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}return e}var n=e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(a);var s=a.slice(0);r.encryptBlock(s,0);for(var l=0;l>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Ansix923)},4905:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)},482:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)},8124:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},2155:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},r.pad.ZeroPadding)},19:function(e,t,n){var r,i,o,a,s,l,c,u,f;e.exports=(f=n(9021),n(3009),n(1025),o=(i=(r=f).lib).Base,a=i.WordArray,l=(s=r.algo).SHA256,c=s.HMAC,u=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:l,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=c.create(n.hasher,e),i=a.create(),o=a.create([1]),s=i.words,l=o.words,u=n.keySize,f=n.iterations;s.length>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&u,h=u<<16|65535&c;for(r[0]^=c,r[1]^=f,r[2]^=u,r[3]^=h,r[4]^=c,r[5]^=f,r[6]^=u,r[7]^=h,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)},6298:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&u,h=u<<16|65535&c;for(i[0]^=c,i[1]^=f,i[2]^=u,i[3]^=h,i[4]^=c,i[5]^=f,i[6]^=u,i[7]^=h,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)},7193:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var a=i%n,s=t[a>>>2]>>>24-a%4*8&255;o=(o+r[i]+s)%256;var l=r[i];r[i]=r[o],r[o]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}e.RC4=t._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),r.RC4)},8056:function(e,t,n){var r;e.exports=(r=n(9021),function(){var e=r,t=e.lib,n=t.WordArray,i=t.Hasher,o=e.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),f=n.create([1352829926,1548603684,1836072691,2053994217,0]),h=o.RIPEMD160=i.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,h,b,_,w,E,R,S,x,k,O,C=this._hash.words,A=u.words,B=f.words,L=a.words,j=s.words,P=l.words,N=c.words;for(E=o=C[0],R=h=C[1],S=b=C[2],x=_=C[3],k=w=C[4],n=0;n<80;n+=1)O=o+e[t+L[n]]|0,O+=n<16?d(h,b,_)+A[0]:n<32?p(h,b,_)+A[1]:n<48?m(h,b,_)+A[2]:n<64?v(h,b,_)+A[3]:g(h,b,_)+A[4],O=(O=y(O|=0,P[n]))+w|0,o=w,w=_,_=y(b,10),b=h,h=O,O=E+e[t+j[n]]|0,O+=n<16?g(R,S,x)+B[0]:n<32?v(R,S,x)+B[1]:n<48?m(R,S,x)+B[2]:n<64?p(R,S,x)+B[3]:d(R,S,x)+B[4],O=(O=y(O|=0,N[n]))+k|0,E=k,k=x,x=y(S,10),S=R,R=O;O=C[1]+b+x|0,C[1]=C[2]+_+k|0,C[2]=C[3]+w+E|0,C[3]=C[4]+o+R|0,C[4]=C[0]+h+S|0,C[0]=O},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,n){return e^t^n}function p(e,t,n){return e&t|~e&n}function m(e,t,n){return(e|~t)^n}function v(e,t,n){return e&n|t&~n}function g(e,t,n){return e^(t|~n)}function y(e,t){return e<>>32-t}e.RIPEMD160=i._createHelper(h),e.HmacRIPEMD160=i._createHmacHelper(h)}(Math),r.RIPEMD160)},5471:function(e,t,n){var r,i,o,a,s,l,c,u;e.exports=(i=(r=u=n(9021)).lib,o=i.WordArray,a=i.Hasher,s=r.algo,l=[],c=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=0;c<80;c++){if(c<16)l[c]=0|e[t+c];else{var u=l[c-3]^l[c-8]^l[c-14]^l[c-16];l[c]=u<<1|u>>>31}var f=(r<<5|r>>>27)+s+l[c];f+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=a._createHelper(c),r.HmacSHA1=a._createHmacHelper(c),u.SHA1)},6308:function(e,t,n){var r,i,o,a,s,l;e.exports=(l=n(9021),n(3009),i=(r=l).lib.WordArray,o=r.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),r.SHA224=a._createHelper(s),r.HmacSHA224=a._createHmacHelper(s),l.SHA224)},3009:function(e,t,n){var r;e.exports=(r=n(9021),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[],l=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=n(e.pow(r,.5))),l[i]=n(e.pow(r,1/3)),i++),r++}();var c=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=0;d<64;d++){if(d<16)c[d]=0|e[t+d];else{var p=c[d-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=c[d-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;c[d]=m+c[d-7]+g+c[d-16]}var y=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),_=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&f)+l[d]+c[d];h=f,f=u,u=s,s=a+_|0,a=o,o=i,i=r,r=_+(b+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+f|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),r.SHA256)},5953:function(e,t,n){var r;e.exports=(r=n(9021),n(3240),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.x64.Word,s=t.algo,l=[],c=[],u=[];!function(){for(var e=1,t=0,n=0;n<24;n++){l[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,f=0,h=0;h<7;h++){if(1&i){var d=(1<>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(C=n[i]).high^=a,C.low^=o}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var d=0,p=0,m=0;m<5;m++)d^=(C=n[h+5*m]).high,p^=C.low;var v=f[h];v.high=d,v.low=p}for(h=0;h<5;h++){var g=f[(h+4)%5],y=f[(h+1)%5],b=y.high,_=y.low;for(d=g.high^(b<<1|_>>>31),p=g.low^(_<<1|b>>>31),m=0;m<5;m++)(C=n[h+5*m]).high^=d,C.low^=p}for(var w=1;w<25;w++){var E=(C=n[w]).high,R=C.low,S=l[w];S<32?(d=E<>>32-S,p=R<>>32-S):(d=R<>>64-S,p=E<>>64-S);var x=f[c[w]];x.high=d,x.low=p}var k=f[0],O=n[0];for(k.high=O.high,k.low=O.low,h=0;h<5;h++)for(m=0;m<5;m++){var C=n[w=h+5*m],A=f[w],B=f[(h+1)%5+5*m],L=f[(h+2)%5+5*m];C.high=A.high^~B.high&L.high,C.low=A.low^~B.low&L.low}C=n[0];var j=u[s];C.high^=j.high,C.low^=j.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u>>24)|4278255360&(h<<24|h>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),c.push(d),c.push(h)}return new i.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=o._createHelper(h),t.HmacSHA3=o._createHmacHelper(h)}(Math),r.SHA3)},9557:function(e,t,n){var r,i,o,a,s,l,c,u;e.exports=(u=n(9021),n(3240),n(1380),i=(r=u).x64,o=i.Word,a=i.WordArray,s=r.algo,l=s.SHA512,c=s.SHA384=l.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var e=l._doFinalize.call(this);return e.sigBytes-=16,e}}),r.SHA384=l._createHelper(c),r.HmacSHA384=l._createHmacHelper(c),u.SHA384)},1380:function(e,t,n){var r;e.exports=(r=n(9021),n(3240),function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var u=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=r.high,p=r.low,m=i.high,v=i.low,g=o.high,y=o.low,b=a.high,_=a.low,w=s.high,E=s.low,R=u.high,S=u.low,x=f.high,k=f.low,O=h.high,C=h.low,A=d,B=p,L=m,j=v,P=g,N=y,T=b,z=_,I=w,M=E,D=R,F=S,H=x,W=k,U=O,q=C,V=0;V<80;V++){var G,J,Y=c[V];if(V<16)J=Y.high=0|e[t+2*V],G=Y.low=0|e[t+2*V+1];else{var $=c[V-15],K=$.high,X=$.low,Z=(K>>>1|X<<31)^(K>>>8|X<<24)^K>>>7,Q=(X>>>1|K<<31)^(X>>>8|K<<24)^(X>>>7|K<<25),ee=c[V-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=c[V-7],ae=oe.high,se=oe.low,le=c[V-16],ce=le.high,ue=le.low;J=(J=(J=Z+ae+((G=Q+se)>>>0>>0?1:0))+re+((G+=ie)>>>0>>0?1:0))+ce+((G+=ue)>>>0>>0?1:0),Y.high=J,Y.low=G}var fe,he=I&D^~I&H,de=M&F^~M&W,pe=A&L^A&P^L&P,me=B&j^B&N^j&N,ve=(A>>>28|B<<4)^(A<<30|B>>>2)^(A<<25|B>>>7),ge=(B>>>28|A<<4)^(B<<30|A>>>2)^(B<<25|A>>>7),ye=(I>>>14|M<<18)^(I>>>18|M<<14)^(I<<23|M>>>9),be=(M>>>14|I<<18)^(M>>>18|I<<14)^(M<<23|I>>>9),_e=l[V],we=_e.high,Ee=_e.low,Re=U+ye+((fe=q+be)>>>0>>0?1:0),Se=ge+me;U=H,q=W,H=D,W=F,D=I,F=M,I=T+(Re=(Re=(Re=Re+he+((fe+=de)>>>0>>0?1:0))+we+((fe+=Ee)>>>0>>0?1:0))+J+((fe+=G)>>>0>>0?1:0))+((M=z+fe|0)>>>0>>0?1:0)|0,T=P,z=N,P=L,N=j,L=A,j=B,A=Re+(ve+pe+(Se>>>0>>0?1:0))+((B=fe+Se|0)>>>0>>0?1:0)|0}p=r.low=p+B,r.high=d+A+(p>>>0>>0?1:0),v=i.low=v+j,i.high=m+L+(v>>>0>>0?1:0),y=o.low=y+N,o.high=g+P+(y>>>0>>0?1:0),_=a.low=_+z,a.high=b+T+(_>>>0>>0?1:0),E=s.low=E+M,s.high=w+I+(E>>>0>>0?1:0),S=u.low=S+F,u.high=R+D+(S>>>0>>0?1:0),k=f.low=k+W,f.high=x+H+(k>>>0>>0?1:0),C=h.low=C+q,h.high=O+U+(C>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(u),e.HmacSHA512=t._createHmacHelper(u)}(),r.SHA512)},7628:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=a[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],u=l[o];for(n=0;n<24;n++)c[n/6|0]|=t[(s[n]-1+u)%28]<<31-n%6,c[4+(n/6|0)]|=t[28+(s[n+24]-1+u)%28]<<31-n%6;for(c[0]=c[0]<<1|c[0]>>>31,n=1;n<7;n++)c[n]=c[n]>>>4*(n-1)+3;c[7]=c[7]<<5|c[7]>>>27}var f=this._invSubKeys=[];for(n=0;n<16;n++)f[n]=i[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,a=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((a^i[l])&u[l])>>>0];this._lBlock=a,this._rBlock=o^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,h.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=f.createEncryptor(n.create(t)),this._des2=f.createEncryptor(n.create(r)),this._des3=f.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),r.TripleDES)},3240:function(e,t,n){var r,i,o,a,s,l;e.exports=(r=n(9021),o=(i=r).lib,a=o.Base,s=o.WordArray,(l=i.x64={}).Word=a.extend({init:function(e,t){this.high=e,this.low=t}}),l.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r{var r,i;!function(o,a){"use strict";void 0===(i="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=i)}(window,(function(){"use strict";var e=function(){var e=window.Element.prototype;if(e.matches)return"matches";if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],n=0;n{var r,i;!function(o){r=[n(9786)],i=function(e){return function(e,t){"use strict";var n={extend:function(e,t){for(var n in t)e[n]=t[n];return e},modulo:function(e,t){return(e%t+t)%t}},r=Array.prototype.slice;n.makeArray=function(e){return Array.isArray(e)?e:null==e?[]:"object"==typeof e&&"number"==typeof e.length?r.call(e):[e]},n.removeFrom=function(e,t){var n=e.indexOf(t);-1!=n&&e.splice(n,1)},n.getParent=function(e,n){for(;e.parentNode&&e!=document.body;)if(e=e.parentNode,t(e,n))return e},n.getQueryElement=function(e){return"string"==typeof e?document.querySelector(e):e},n.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},n.filterFindElements=function(e,r){e=n.makeArray(e);var i=[];return e.forEach((function(e){if(e instanceof HTMLElement)if(r){t(e,r)&&i.push(e);for(var n=e.querySelectorAll(r),o=0;o{var r,i;window,void 0===(i="function"==typeof(r=function(){"use strict";function e(e){var t=parseFloat(e);return-1==e.indexOf("%")&&!isNaN(t)&&t}var t="undefined"==typeof console?function(){}:function(e){console.error(e)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],r=n.length;function i(e){var n=getComputedStyle(e);return n||t("Style returned "+n+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),n}var o,a=!1;function s(t){if(function(){if(!a){a=!0;var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(t);var r=i(t);o=200==Math.round(e(r.width)),s.isBoxSizeOuter=o,n.removeChild(t)}}(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var l=i(t);if("none"==l.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t{setTimeout((()=>{this.progress(e,t,n)}))};this.images.forEach((function(t){t.once("progress",e),t.check()}))},i.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&r&&r.log(`progress: ${n}`,e,t)},i.prototype.complete=function(){let e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){let e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},s.prototype=Object.create(t.prototype),s.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},s.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},s.prototype.confirm=function(e,t){this.isLoaded=e;let{parentNode:n}=this.img,r="PICTURE"===n.nodeName?n:this.img;this.emitEvent("progress",[this,r,t])},s.prototype.handleEvent=function(e){let t="on"+e.type;this[t]&&this[t](e)},s.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},s.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},s.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},l.prototype=Object.create(s.prototype),l.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},l.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},l.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},i.makeJQueryPlugin=function(t){(t=t||e.jQuery)&&(n=t,n.fn.imagesLoaded=function(e,t){return new i(this,e,t).jqDeferred.promise(n(this))})},i.makeJQueryPlugin(),i}))},6994:(e,t,n)=>{var r,i,o;window,i=[n(2831),n(1485)],void 0===(o="function"==typeof(r=function(e,t){"use strict";var n=e.create("masonry");n.compatOptions.fitWidth="isFitWidth";var r=n.prototype;return r._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var e=0;e1&&n+e>this.cols?0:n;var r=t.size.outerWidth&&t.size.outerHeight;return this.horizontalColIndex=r?n+e:this.horizontalColIndex,{col:n,y:this._getColGroupY(n,e)}},r._manageStamp=function(e){var n=t(e),r=this._getElementOffset(e),i=this._getOption("originLeft")?r.left:r.right,o=i+n.outerWidth,a=Math.floor(i/this.columnWidth);a=Math.max(0,a);var s=Math.floor(o/this.columnWidth);s-=o%this.columnWidth?0:1,s=Math.min(this.cols-1,s);for(var l=(this._getOption("originTop")?r.top:r.bottom)+n.outerHeight,c=a;c<=s;c++)this.colYs[c]=Math.max(l,this.colYs[c])},r._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var e={height:this.maxY};return this._getOption("fitWidth")&&(e.width=this._getContainerFitWidth()),e},r._getContainerFitWidth=function(){for(var e=0,t=this.cols;--t&&0===this.colYs[t];)e++;return(this.cols-e)*this.columnWidth-this.gutter},r.needsResizeLayout=function(){var e=this.containerWidth;return this.getContainerWidth(),e!=this.containerWidth},n})?r.apply(t,i):r)||(e.exports=o)},3169:(e,t,n)=>{var r,i,o;window,i=[n(7738),n(1485)],void 0===(o="function"==typeof(r=function(e,t){"use strict";var n=document.documentElement.style,r="string"==typeof n.transition?"transition":"WebkitTransition",i="string"==typeof n.transform?"transform":"WebkitTransform",o={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],a={transform:i,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"};function s(e,t){e&&(this.element=e,this.layout=t,this.position={x:0,y:0},this._create())}var l=s.prototype=Object.create(e.prototype);l.constructor=s,l._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},l.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},l.getSize=function(){this.size=t(this.element)},l.css=function(e){var t=this.element.style;for(var n in e)t[a[n]||n]=e[n]},l.getPosition=function(){var e=getComputedStyle(this.element),t=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),r=e[t?"left":"right"],i=e[n?"top":"bottom"],o=parseFloat(r),a=parseFloat(i),s=this.layout.size;-1!=r.indexOf("%")&&(o=o/100*s.width),-1!=i.indexOf("%")&&(a=a/100*s.height),o=isNaN(o)?0:o,a=isNaN(a)?0:a,o-=t?s.paddingLeft:s.paddingRight,a-=n?s.paddingTop:s.paddingBottom,this.position.x=o,this.position.y=a},l.layoutPosition=function(){var e=this.layout.size,t={},n=this.layout._getOption("originLeft"),r=this.layout._getOption("originTop"),i=n?"paddingLeft":"paddingRight",o=n?"left":"right",a=n?"right":"left",s=this.position.x+e[i];t[o]=this.getXValue(s),t[a]="";var l=r?"paddingTop":"paddingBottom",c=r?"top":"bottom",u=r?"bottom":"top",f=this.position.y+e[l];t[c]=this.getYValue(f),t[u]="",this.css(t),this.emitEvent("layout",[this])},l.getXValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!t?e/this.layout.size.width*100+"%":e+"px"},l.getYValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&t?e/this.layout.size.height*100+"%":e+"px"},l._transitionTo=function(e,t){this.getPosition();var n=this.position.x,r=this.position.y,i=e==this.position.x&&t==this.position.y;if(this.setPosition(e,t),!i||this.isTransitioning){var o=e-n,a=t-r,s={};s.transform=this.getTranslate(o,a),this.transition({to:s,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},l.getTranslate=function(e,t){return"translate3d("+(e=this.layout._getOption("originLeft")?e:-e)+"px, "+(t=this.layout._getOption("originTop")?t:-t)+"px, 0)"},l.goTo=function(e,t){this.setPosition(e,t),this.layoutPosition()},l.moveTo=l._transitionTo,l.setPosition=function(e,t){this.position.x=parseFloat(e),this.position.y=parseFloat(t)},l._nonTransition=function(e){for(var t in this.css(e.to),e.isCleaning&&this._removeStyles(e.to),e.onTransitionEnd)e.onTransitionEnd[t].call(this)},l.transition=function(e){if(parseFloat(this.layout.options.transitionDuration)){var t=this._transn;for(var n in e.onTransitionEnd)t.onEnd[n]=e.onTransitionEnd[n];for(n in e.to)t.ingProperties[n]=!0,e.isCleaning&&(t.clean[n]=!0);e.from&&(this.css(e.from),this.element.offsetHeight),this.enableTransition(e.to),this.css(e.to),this.isTransitioning=!0}else this._nonTransition(e)};var c="opacity,"+i.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}));l.enableTransition=function(){if(!this.isTransitioning){var e=this.layout.options.transitionDuration;e="number"==typeof e?e+"ms":e,this.css({transitionProperty:c,transitionDuration:e,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(o,this,!1)}},l.onwebkitTransitionEnd=function(e){this.ontransitionend(e)},l.onotransitionend=function(e){this.ontransitionend(e)};var u={"-webkit-transform":"transform"};l.ontransitionend=function(e){if(e.target===this.element){var t=this._transn,n=u[e.propertyName]||e.propertyName;delete t.ingProperties[n],function(e){for(var t in e)return!1;return!0}(t.ingProperties)&&this.disableTransition(),n in t.clean&&(this.element.style[e.propertyName]="",delete t.clean[n]),n in t.onEnd&&(t.onEnd[n].call(this),delete t.onEnd[n]),this.emitEvent("transitionEnd",[this])}},l.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},l._removeStyles=function(e){var t={};for(var n in e)t[n]="";this.css(t)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return l.removeTransitionStyles=function(){this.css(f)},l.stagger=function(e){e=isNaN(e)?0:e,this.staggerDelay=e+"ms"},l.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},l.remove=function(){r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",(function(){this.removeElem()})),this.hide()):this.removeElem()},l.reveal=function(){delete this.isHidden,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:e.hiddenStyle,to:e.visibleStyle,isCleaning:!0,onTransitionEnd:t})},l.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},l.getHideRevealTransitionEndProperty=function(e){var t=this.layout.options[e];if(t.opacity)return"opacity";for(var n in t)return n},l.hide=function(){this.isHidden=!0,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:e.visibleStyle,to:e.hiddenStyle,isCleaning:!0,onTransitionEnd:t})},l.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},l.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},s})?r.apply(t,i):r)||(e.exports=o)},7738:function(e,t,n){var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},r=n[e]=n[e]||[];return-1==r.indexOf(t)&&r.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var r=n.indexOf(t);return-1!=r&&n.splice(r,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var r=this._onceEvents&&this._onceEvents[e],i=0;i{var r,i;!function(o){"use strict";r=[n(7738),n(1485),n(977),n(3169)],i=function(e,t,n,r){return function(e,t,n,r,i){var o=e.console,a=e.jQuery,s=function(){},l=0,c={};function u(e,t){var n=r.getQueryElement(e);if(n){this.element=n,a&&(this.$element=a(this.element)),this.options=r.extend({},this.constructor.defaults),this.option(t);var i=++l;this.element.outlayerGUID=i,c[i]=this,this._create(),this._getOption("initLayout")&&this.layout()}else o&&o.error("Bad element for "+this.constructor.namespace+": "+(n||e))}u.namespace="outlayer",u.Item=i,u.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=u.prototype;function h(e){function t(){e.apply(this,arguments)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t}r.extend(f,t.prototype),f.option=function(e){r.extend(this.options,e)},f._getOption=function(e){var t=this.constructor.compatOptions[e];return t&&void 0!==this.options[t]?this.options[t]:this.options[e]},u.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),r.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(e){for(var t=this._filterFindItemElements(e),n=this.constructor.Item,r=[],i=0;i{"use strict";var r=n(1609),i=Symbol.for("react.element"),o=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,n){var r,l={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,r)&&!s.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===l[r]&&(l[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:l,_owner:a.current}}},4848:(e,t,n)=>{"use strict";e.exports=n(1020)},1609:e=>{"use strict";e.exports=window.React},477:()=>{},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=r[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e+"../"})(),(()=>{"use strict";var e={};n.r(e),n.d(e,{hasBrowserEnv:()=>_e,hasStandardBrowserEnv:()=>Ee,hasStandardBrowserWebWorkerEnv:()=>Re,navigator:()=>we,origin:()=>Se});const t=window.wp.blockEditor,r=window.wp.blocks,i=window.wp.components,o=window.wp.element,a=window.wp.i18n,s=window.wp.primitives;var l=n(4848);const c=(0,l.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(s.Path,{d:"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"})});function u(){return React.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("title",null,"Instant Images Icon"),React.createElement("path",{d:"M0 8C0 3.58172 3.58172 0 8 0H72C76.4183 0 80 3.58172 80 8V72C80 76.4183 76.4183 80 72 80H8C3.58172 80 0 76.4183 0 72V8Z",fill:"#647FE8"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z",fill:"white"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z",fill:"white"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z",fill:"#C7D2FF"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z",fill:"#C7D2FF"}))}function f(e,t){return function(){return e.apply(t,arguments)}}const{toString:h}=Object.prototype,{getPrototypeOf:d}=Object,p=(m=Object.create(null),e=>{const t=h.call(e);return m[t]||(m[t]=t.slice(8,-1).toLowerCase())});var m;const v=e=>(e=e.toLowerCase(),t=>p(t)===e),g=e=>t=>typeof t===e,{isArray:y}=Array,b=g("undefined"),_=v("ArrayBuffer"),w=g("string"),E=g("function"),R=g("number"),S=e=>null!==e&&"object"==typeof e,x=e=>{if("object"!==p(e))return!1;const t=d(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},k=v("Date"),O=v("File"),C=v("Blob"),A=v("FileList"),B=v("URLSearchParams"),[L,j,P,N]=["ReadableStream","Request","Response","Headers"].map(v);function T(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),y(e))for(r=0,i=e.length;r0;)if(r=n[i],t===r.toLowerCase())return r;return null}const I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,M=e=>!b(e)&&e!==I,D=(F="undefined"!=typeof Uint8Array&&d(Uint8Array),e=>F&&e instanceof F);var F;const H=v("HTMLFormElement"),W=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),U=v("RegExp"),q=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};T(n,((n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)})),Object.defineProperties(e,r)},V="abcdefghijklmnopqrstuvwxyz",G="0123456789",J={DIGIT:G,ALPHA:V,ALPHA_DIGIT:V+V.toUpperCase()+G},Y=v("AsyncFunction"),$=(K="function"==typeof setImmediate,X=E(I.postMessage),K?setImmediate:X?(Z=`axios@${Math.random()}`,Q=[],I.addEventListener("message",(({source:e,data:t})=>{e===I&&t===Z&&Q.length&&Q.shift()()}),!1),e=>{Q.push(e),I.postMessage(Z,"*")}):e=>setTimeout(e));var K,X,Z,Q;const ee="undefined"!=typeof queueMicrotask?queueMicrotask.bind(I):"undefined"!=typeof process&&process.nextTick||$,te={isArray:y,isArrayBuffer:_,isBuffer:function(e){return null!==e&&!b(e)&&null!==e.constructor&&!b(e.constructor)&&E(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||E(e.append)&&("formdata"===(t=p(e))||"object"===t&&E(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&_(e.buffer),t},isString:w,isNumber:R,isBoolean:e=>!0===e||!1===e,isObject:S,isPlainObject:x,isReadableStream:L,isRequest:j,isResponse:P,isHeaders:N,isUndefined:b,isDate:k,isFile:O,isBlob:C,isRegExp:U,isFunction:E,isStream:e=>S(e)&&E(e.pipe),isURLSearchParams:B,isTypedArray:D,isFileList:A,forEach:T,merge:function e(){const{caseless:t}=M(this)&&this||{},n={},r=(r,i)=>{const o=t&&z(n,i)||i;x(n[o])&&x(r)?n[o]=e(n[o],r):x(r)?n[o]=e({},r):y(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e(T(t,((t,r)=>{n&&E(t)?e[r]=f(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&d(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:p,kindOfTest:v,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(y(e))return e;let t=e.length;if(!R(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:H,hasOwnProperty:W,hasOwnProp:W,reduceDescriptors:q,freezeMethods:e=>{q(e,((t,n)=>{if(E(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];E(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return y(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:z,global:I,isContextDefined:M,ALPHABET:J,generateString:(e=16,t=J.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&E(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(S(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=y(e)?[]:{};return T(e,((e,t)=>{const o=n(e,r+1);!b(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:Y,isThenable:e=>e&&(S(e)||E(e))&&E(e.then)&&E(e.catch),setImmediate:$,asap:ee};function ne(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}te.inherits(ne,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:te.toJSONObject(this.config),code:this.code,status:this.status}}});const re=ne.prototype,ie={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{ie[e]={value:e}})),Object.defineProperties(ne,ie),Object.defineProperty(re,"isAxiosError",{value:!0}),ne.from=(e,t,n,r,i,o)=>{const a=Object.create(re);return te.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),ne.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const oe=ne;function ae(e){return te.isPlainObject(e)||te.isArray(e)}function se(e){return te.endsWith(e,"[]")?e.slice(0,-2):e}function le(e,t,n){return e?e.concat(t).map((function(e,t){return e=se(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const ce=te.toFlatObject(te,{},null,(function(e){return/^is[A-Z]/.test(e)})),ue=function(e,t,n){if(!te.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=te.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!te.isUndefined(t[e])}))).metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&te.isSpecCompliantForm(t);if(!te.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(te.isDate(e))return e.toISOString();if(!s&&te.isBlob(e))throw new oe("Blob is not supported. Use a Buffer instead.");return te.isArrayBuffer(e)||te.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,i){let s=e;if(e&&!i&&"object"==typeof e)if(te.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(te.isArray(e)&&function(e){return te.isArray(e)&&!e.some(ae)}(e)||(te.isFileList(e)||te.endsWith(n,"[]"))&&(s=te.toArray(e)))return n=se(n),s.forEach((function(e,r){!te.isUndefined(e)&&null!==e&&t.append(!0===a?le([n],r,o):null===a?n:n+"[]",l(e))})),!1;return!!ae(e)||(t.append(le(i,n,o),l(e)),!1)}const u=[],f=Object.assign(ce,{defaultVisitor:c,convertValue:l,isVisitable:ae});if(!te.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!te.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),te.forEach(n,(function(n,o){!0===(!(te.isUndefined(n)||null===n)&&i.call(t,n,te.isString(o)?o.trim():o,r,f))&&e(n,r?r.concat(o):[o])})),u.pop()}}(e),t};function fe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function he(e,t){this._pairs=[],e&&ue(e,this,t)}const de=he.prototype;de.append=function(e,t){this._pairs.push([e,t])},de.toString=function(e){const t=e?function(t){return e.call(this,t,fe)}:fe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const pe=he;function me(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ve(e,t,n){if(!t)return e;const r=n&&n.encode||me,i=n&&n.serialize;let o;if(o=i?i(t,n):te.isURLSearchParams(t)?t.toString():new pe(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const ge=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){te.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ye={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},be={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:pe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},_e="undefined"!=typeof window&&"undefined"!=typeof document,we="object"==typeof navigator&&navigator||void 0,Ee=_e&&(!we||["ReactNative","NativeScript","NS"].indexOf(we.product)<0),Re="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Se=_e&&window.location.href||"http://localhost",xe={...e,...be},ke=function(e){function t(e,n,r,i){let o=e[i++];if("__proto__"===o)return!0;const a=Number.isFinite(+o),s=i>=e.length;return o=!o&&te.isArray(r)?r.length:o,s?(te.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):(r[o]&&te.isObject(r[o])||(r[o]=[]),t(e,n,r[o],i)&&te.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r{t(function(e){return te.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},Oe={transitional:ye,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=te.isObject(e);if(i&&te.isHTMLForm(e)&&(e=new FormData(e)),te.isFormData(e))return r?JSON.stringify(ke(e)):e;if(te.isArrayBuffer(e)||te.isBuffer(e)||te.isStream(e)||te.isFile(e)||te.isBlob(e)||te.isReadableStream(e))return e;if(te.isArrayBufferView(e))return e.buffer;if(te.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ue(e,new xe.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return xe.isNode&&te.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=te.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ue(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e){if(te.isString(e))try{return(0,JSON.parse)(e),te.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Oe.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(te.isResponse(e)||te.isReadableStream(e))return e;if(e&&te.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw oe.from(e,oe.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xe.classes.FormData,Blob:xe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};te.forEach(["delete","get","head","post","put","patch"],(e=>{Oe.headers[e]={}}));const Ce=Oe,Ae=te.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Be=Symbol("internals");function Le(e){return e&&String(e).trim().toLowerCase()}function je(e){return!1===e||null==e?e:te.isArray(e)?e.map(je):String(e)}function Pe(e,t,n,r,i){return te.isFunction(r)?r.call(this,t,n):(i&&(t=n),te.isString(t)?te.isString(r)?-1!==t.indexOf(r):te.isRegExp(r)?r.test(t):void 0:void 0)}class Ne{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Le(t);if(!i)throw new Error("header name must be a non-empty string");const o=te.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=je(e))}const o=(e,t)=>te.forEach(e,((e,n)=>i(e,n,t)));if(te.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(te.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&Ae[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(te.isHeaders(e))for(const[t,r]of e.entries())i(r,t,n);else null!=e&&i(t,e,n);return this}get(e,t){if(e=Le(e)){const n=te.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(te.isFunction(t))return t.call(this,e,n);if(te.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Le(e)){const n=te.findKey(this,e);return!(!n||void 0===this[n]||t&&!Pe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Le(e)){const i=te.findKey(n,e);!i||t&&!Pe(0,n[i],i,t)||(delete n[i],r=!0)}}return te.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!Pe(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return te.forEach(this,((r,i)=>{const o=te.findKey(n,i);if(o)return t[o]=je(r),void delete t[i];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();a!==i&&delete t[i],t[a]=je(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return te.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&te.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Be]=this[Be]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Le(e);t[r]||(function(e,t){const n=te.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return te.isArray(e)?e.forEach(r):r(e),this}}Ne.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),te.reduceDescriptors(Ne.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),te.freezeMethods(Ne);const Te=Ne;function ze(e,t){const n=this||Ce,r=t||n,i=Te.from(r.headers);let o=r.data;return te.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function Ie(e){return!(!e||!e.__CANCEL__)}function Me(e,t,n){oe.call(this,null==e?"canceled":e,oe.ERR_CANCELED,t,n),this.name="CanceledError"}te.inherits(Me,oe,{__CANCEL__:!0});const De=Me;function Fe(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new oe("Request failed with status code "+n.status,[oe.ERR_BAD_REQUEST,oe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const He=(e,t,n=3)=>{let r=0;const i=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];i||(i=l),n[o]=s,r[o]=l;let u=a,f=0;for(;u!==o;)f+=n[u++],u%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),l-i{i=o,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-i;s>=o?a(e,t):(n=e,r||(r=setTimeout((()=>{r=null,a(n)}),o-s)))},()=>n&&a(n)]}((n=>{const o=n.loaded,a=n.lengthComputable?n.total:void 0,s=o-r,l=i(s);r=o,e({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&o<=a?(a-o)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},We=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ue=e=>(...t)=>te.asap((()=>e(...t))),qe=xe.hasStandardBrowserEnv?function(){const e=xe.navigator&&/(msie|trident)/i.test(xe.navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=te.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},Ve=xe.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];te.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),te.isString(r)&&a.push("path="+r),te.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ge(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Je=e=>e instanceof Te?{...e}:e;function Ye(e,t){t=t||{};const n={};function r(e,t,n){return te.isPlainObject(e)&&te.isPlainObject(t)?te.merge.call({caseless:n},e,t):te.isPlainObject(t)?te.merge({},t):te.isArray(t)?t.slice():t}function i(e,t,n){return te.isUndefined(t)?te.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!te.isUndefined(t))return r(void 0,t)}function a(e,t){return te.isUndefined(t)?te.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>i(Je(e),Je(t),!0)};return te.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=l[r]||i,a=o(e[r],t[r],r);te.isUndefined(a)&&o!==s||(n[r]=a)})),n}const $e=e=>{const t=Ye({},e);let n,{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=Te.from(s),t.url=ve(Ge(t.baseURL,t.url),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),te.isFormData(r))if(xe.hasStandardBrowserEnv||xe.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(xe.hasStandardBrowserEnv&&(i&&te.isFunction(i)&&(i=i(t)),i||!1!==i&&qe(t.url))){const e=o&&a&&Ve.read(a);e&&s.set(o,e)}return t},Ke="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=$e(e);let i=r.data;const o=Te.from(r.headers).normalize();let a,s,l,c,u,{responseType:f,onUploadProgress:h,onDownloadProgress:d}=r;function p(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function v(){if(!m)return;const r=Te.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Fe((function(e){t(e),p()}),(function(e){n(e),p()}),{data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=v:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(v)},m.onabort=function(){m&&(n(new oe("Request aborted",oe.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new oe("Network Error",oe.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||ye;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new oe(t,i.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,m)),m=null},void 0===i&&o.setContentType(null),"setRequestHeader"in m&&te.forEach(o.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),te.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),f&&"json"!==f&&(m.responseType=r.responseType),d&&([l,u]=He(d,!0),m.addEventListener("progress",l)),h&&m.upload&&([s,c]=He(h),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new De(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);g&&-1===xe.protocols.indexOf(g)?n(new oe("Unsupported protocol "+g+":",oe.ERR_BAD_REQUEST,e)):m.send(i||null)}))},Xe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof oe?t:new De(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,i(new oe(`timeout ${t} of ms exceeded`,oe.ETIMEDOUT))}),t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)})),e=null)};e.forEach((e=>e.addEventListener("abort",i)));const{signal:s}=r;return s.unsubscribe=()=>te.asap(a),s}},Ze=function*(e,t){let n=e.byteLength;if(!t||n{const i=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*Ze(n,t)}(e,t);let o,a=0,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return s(),void e.close();let o=r.byteLength;if(n){let e=a+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),i.return())},{highWaterMark:2})},et="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,tt=et&&"function"==typeof ReadableStream,nt=et&&("function"==typeof TextEncoder?(rt=new TextEncoder,e=>rt.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var rt;const it=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ot=tt&&it((()=>{let e=!1;const t=new Request(xe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),at=tt&&it((()=>te.isReadableStream(new Response("").body))),st={stream:at&&(e=>e.body)};var lt;et&&(lt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!st[e]&&(st[e]=te.isFunction(lt[e])?t=>t[e]():(t,n)=>{throw new oe(`Response type '${e}' is not supported`,oe.ERR_NOT_SUPPORT,n)})})));const ct={http:null,xhr:Ke,fetch:et&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:h}=$e(e);c=c?(c+"").toLowerCase():"text";let d,p=Xe([i,o&&o.toAbortSignal()],a);const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let v;try{if(l&&ot&&"get"!==n&&"head"!==n&&0!==(v=await(async(e,t)=>{const n=te.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(te.isBlob(e))return e.size;if(te.isSpecCompliantForm(e)){const t=new Request(xe.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return te.isArrayBufferView(e)||te.isArrayBuffer(e)?e.byteLength:(te.isURLSearchParams(e)&&(e+=""),te.isString(e)?(await nt(e)).byteLength:void 0)})(t):n})(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(te.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=We(v,He(Ue(l)));r=Qe(n.body,65536,e,t)}}te.isString(f)||(f=f?"include":"omit");const i="credentials"in Request.prototype;d=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:i?f:void 0});let o=await fetch(d);const a=at&&("stream"===c||"response"===c);if(at&&(s||a&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=te.toFiniteNumber(o.headers.get("content-length")),[n,r]=s&&We(t,He(Ue(s),!0))||[];o=new Response(Qe(o.body,65536,n,(()=>{r&&r(),m&&m()})),e)}c=c||"text";let g=await st[te.findKey(st,c)||"text"](o,e);return!a&&m&&m(),await new Promise(((t,n)=>{Fe(t,n,{data:g,headers:Te.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:d})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new oe("Network Error",oe.ERR_NETWORK,e,d),{cause:t.cause||t});throw oe.from(t,t&&t.code,e,d)}})};te.forEach(ct,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const ut=e=>`- ${e}`,ft=e=>te.isFunction(e)||null===e||!1===e,ht=e=>{e=te.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(ut).join("\n"):" "+ut(e[0]):"as no adapter specified";throw new oe("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function dt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new De(null,e)}function pt(e){return dt(e),e.headers=Te.from(e.headers),e.data=ze.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ht(e.adapter||Ce.adapter)(e).then((function(t){return dt(e),t.data=ze.call(e,e.transformResponse,t),t.headers=Te.from(t.headers),t}),(function(t){return Ie(t)||(dt(e),t&&t.response&&(t.response.data=ze.call(e,e.transformResponse,t.response),t.response.headers=Te.from(t.response.headers))),Promise.reject(t)}))}const mt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{mt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const vt={};mt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new oe(r(i," has been removed"+(t?" in "+t:"")),oe.ERR_DEPRECATED);return t&&!vt[i]&&(vt[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};const gt={assertOptions:function(e,t,n){if("object"!=typeof e)throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const t=e[o],n=void 0===t||a(t,o,e);if(!0!==n)throw new oe("option "+o+" must be "+n,oe.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new oe("Unknown option "+o,oe.ERR_BAD_OPTION)}},validators:mt},yt=gt.validators;class bt{constructor(e){this.defaults=e,this.interceptors={request:new ge,response:new ge}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ye(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&>.assertOptions(n,{silentJSONParsing:yt.transitional(yt.boolean),forcedJSONParsing:yt.transitional(yt.boolean),clarifyTimeoutError:yt.transitional(yt.boolean)},!1),null!=r&&(te.isFunction(r)?t.paramsSerializer={serialize:r}:gt.assertOptions(r,{encode:yt.function,serialize:yt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&te.merge(i.common,i[t.method]);i&&te.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Te.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,f=0;if(!s){const e=[pt.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);f{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new De(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new wt((function(t){e=t})),cancel:e}}}const Et=wt,Rt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Rt).forEach((([e,t])=>{Rt[t]=e}));const St=Rt,xt=function e(t){const n=new _t(t),r=f(_t.prototype.request,n);return te.extend(r,_t.prototype,n,{allOwnKeys:!0}),te.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ye(t,n))},r}(Ce);xt.Axios=_t,xt.CanceledError=De,xt.CancelToken=Et,xt.isCancel=Ie,xt.VERSION="1.7.7",xt.toFormData=ue,xt.AxiosError=oe,xt.Cancel=xt.CanceledError,xt.all=function(e){return Promise.all(e)},xt.spread=function(e){return function(t){return e.apply(null,t)}},xt.isAxiosError=function(e){return te.isObject(e)&&!0===e.isAxiosError},xt.mergeConfig=Ye,xt.AxiosHeaders=Te,xt.formToJSON=e=>ke(te.isHTMLForm(e)?new FormData(e):e),xt.getAdapter=ht,xt.HttpStatusCode=St,xt.default=xt;const kt=xt;var Ot=n(6942),Ct=n.n(Ot),At=n(6994),Bt=n.n(At),Lt=n(1609),jt=(Object.defineProperty,new Map),Pt=new WeakMap,Nt=0;function Tt(e,t,n={},r=undefined){if(void 0===window.IntersectionObserver&&void 0!==r){const i=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}const{id:i,observer:o,elements:a}=function(e){const t=function(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(n=e.root,n?(Pt.has(n)||(Nt+=1,Pt.set(n,Nt.toString())),Pt.get(n)):"0"):e[t]}`;var n})).toString()}(e);let n=jt.get(t);if(!n){const r=new Map;let i;const o=new IntersectionObserver((t=>{t.forEach((t=>{var n;const o=t.isIntersecting&&i.some((e=>t.intersectionRatio>=e));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=r.get(t.target))||n.forEach((e=>{e(o,t)}))}))}),e);i=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},jt.set(t,n)}return n}(n),s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),o.observe(e),function(){s.splice(s.indexOf(t),1),0===s.length&&(a.delete(e),o.unobserve(e)),0===a.size&&(o.disconnect(),jt.delete(i))}}function zt({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:i,triggerOnce:o,skip:a,initialInView:s,fallbackInView:l,onChange:c}={}){var u;const[f,h]=Lt.useState(null),d=Lt.useRef(),[p,m]=Lt.useState({inView:!!s,entry:void 0});d.current=c,Lt.useEffect((()=>{if(a||!f)return;let s;return s=Tt(f,((e,t)=>{m({inView:e,entry:t}),d.current&&d.current(e,t),t.isIntersecting&&o&&s&&(s(),s=void 0)}),{root:i,rootMargin:r,threshold:e,trackVisibility:n,delay:t},l),()=>{s&&s()}}),[Array.isArray(e)?e.toString():e,f,i,r,o,a,n,l,t]);const v=null==(u=p.entry)?void 0:u.target,g=Lt.useRef();f||!v||o||a||g.current===v||(g.current=v,m({inView:!!s,entry:void 0}));const y=[h,p.inView,p.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}Lt.Component;var It=(0,o.createContext)();function Mt(e){var t=e.value,n=e.children;return React.createElement(It.Provider,{value:t},n)}function Dt(){return(0,o.useContext)(It)}function Ft(e){return e&&Ht[e.toLowerCase()].icon?Ht[e.toLowerCase()].icon():null}var Ht={proxy:"https://proxy.getinstantimages.com/api/",testmode:!1,defaults:{provider:"unsplash",order:"latest",arr_key:"results"},providers:["Unsplash","Openverse","Pixabay","Pexels","Giphy"],unsplash:{name:"Unsplash",requires_key:!0,new:!1,api_var:"client_id",collections_api:"https://api.unsplash.com/collections/",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M10 9V0H22V9H10ZM22 14H32V32H0V14H10V23H22V14Z",fill:"black"}))}},pixabay:{name:"Pixabay",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("g",{clipPath:"url(#clip0_307_143)"},React.createElement("path",{d:"M0 0V32H32V0H0Z",fill:"#48A947"}),React.createElement("path",{d:"M6.83734 22.3147V28C5.93067 28.0427 5.02401 28.032 4.11734 27.9787C4.09601 27.7014 4.06401 27.4667 4.06401 27.2427C4.06401 23.2427 4.05334 19.2534 4.06401 15.2534C4.07467 12.032 5.97334 9.32269 8.85334 8.37335C13.1307 6.95469 17.4507 10.048 17.8453 14.3894C18.144 17.6534 16.4267 20.5547 13.568 21.7814C12.6507 22.176 11.6907 22.304 10.7093 22.304C9.45067 22.3147 8.21334 22.3147 6.83734 22.3147ZM6.84801 19.4454C8.24534 19.4454 9.54667 19.424 10.848 19.4454C13.1627 19.488 14.816 17.76 15.104 15.712C15.424 13.3654 13.7813 11.2107 11.4453 10.88H11.4347C9.25867 10.592 7.06134 12.2774 6.88001 14.528C6.74134 16.128 6.84801 17.728 6.84801 19.4454Z",fill:"#F9FBF9"}),React.createElement("path",{d:"M25.4827 14.9334L30.656 22.2081H27.3067L23.4667 16.9494C22.0694 18.6881 20.9067 20.4907 19.584 22.2081H16.2454L21.408 14.9334L16.8107 8.04272H20.16L23.4454 12.9494L26.7307 8.04272H30.0694L25.4827 14.9334Z",fill:"#FAFCFA"}),React.createElement("path",{d:"M6.848 19.4453C6.848 17.7279 6.74134 16.1173 6.86934 14.5386C7.05067 12.2879 9.248 10.6026 11.424 10.8906C13.7707 11.2106 15.4133 13.3653 15.0933 15.7119C14.816 17.7599 13.152 19.4879 10.8373 19.4453C9.54667 19.4239 8.24534 19.4453 6.848 19.4453Z",fill:"#4AA949"})),React.createElement("defs",null,React.createElement("clipPath",{id:"clip0_307_143"},React.createElement("rect",{width:"32",height:"32",fill:"white"}))))}},pexels:{name:"Pexels",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32px",height:"32px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M2 0h28a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2z",fill:"#05A081"}),React.createElement("path",{d:"M13 21h3.863v-3.752h1.167a3.124 3.124 0 1 0 0-6.248H13v10zm5.863 2H11V9h7.03a5.124 5.124 0 0 1 .833 10.18V23z",fill:"#fff"}))}},openverse:{name:"Openverse",requires_key:!1,new:!1,api_var:"key",key:"",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M25.8578 14.32C29.6708 14.32 32.7618 11.1144 32.7618 7.16C32.7618 3.20564 29.6708 0 25.8578 0C22.0448 0 18.9539 3.20564 18.9539 7.16C18.9539 11.1144 22.0448 14.32 25.8578 14.32Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 7.16C0.761841 11.1 3.84742 14.32 7.66584 14.32V0C3.84742 0 0.761841 3.2 0.761841 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 7.16C9.85791 11.1 12.9435 14.32 16.7619 14.32V0C12.9628 0 9.85791 3.2 9.85791 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M25.8578 31.9399C29.6708 31.9399 32.7618 28.7343 32.7618 24.78C32.7618 20.8256 29.6708 17.62 25.8578 17.62C22.0448 17.62 18.9539 20.8256 18.9539 24.78C18.9539 28.7343 22.0448 31.9399 25.8578 31.9399Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 24.7801C9.85791 28.72 12.9435 31.9401 16.7619 31.9401V17.64C12.9628 17.64 9.85791 20.84 9.85791 24.7801Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 24.84C0.761841 28.8 3.84742 32 7.66584 32V17.7C3.84742 17.7 0.761841 20.9 0.761841 24.84Z",fill:"#000000"}))}},giphy:{name:"Giphy",requires_key:!0,new:!0,api_var:"key",icon:function(){return React.createElement("svg",{height:"35",width:"32",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 35"},React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("path",{d:"M4 4h20v27H4z",fill:"#000"}),React.createElement("g",null,React.createElement("path",{d:"M0 3h4v29H0z",fill:"#04ff8e"}),React.createElement("path",{d:"M24 11h4v21h-4z",fill:"#8e2eff"}),React.createElement("path",{d:"M0 31h28v4H0z",fill:"#00c5ff"}),React.createElement("path",{d:"M0 0h16v4H0z",fill:"#fff152"}),React.createElement("path",{d:"M24 8V4h-4V0h-4v12h12V8",fill:"#ff5b5b"}),React.createElement("path",{d:"M24 16v-4h4",fill:"#551c99"})),React.createElement("path",{d:"M16 0v4h-4",fill:"#999131"})))}}},Wt=[{label:(0,a.__)("WordPress","instant-images"),value:"wordpress"},{label:(0,a.__)("Flickr","instant-images"),value:"flickr"},{label:(0,a.__)("Nasa","instant-images"),value:"nasa"},{label:(0,a.__)("SpaceX","instant-images"),value:"spacex"},{label:(0,a.__)("Wikimedia","instant-images"),value:"wikimedia"}],Ut=[{label:(0,a.__)("Square","instant-images"),value:"square"},{label:(0,a.__)("Tall","instant-images"),value:"tall"},{label:(0,a.__)("Wide","instant-images"),value:"wide"}],qt=[{label:(0,a.__)("Red","instant-images"),value:"red"},{label:(0,a.__)("Orange","instant-images"),value:"orange"},{label:(0,a.__)("Yellow","instant-images"),value:"yellow"},{label:(0,a.__)("Green","instant-images"),value:"green"},{label:(0,a.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,a.__)("Blue","instant-images"),value:"blue"},{label:(0,a.__)("Violet","instant-images"),value:"violet"},{label:(0,a.__)("Pink","instant-images"),value:"pink"},{label:(0,a.__)("Brown","instant-images"),value:"brown"},{label:(0,a.__)("Black","instant-images"),value:"black"},{label:(0,a.__)("Gray","instant-images"),value:"gray"},{label:(0,a.__)("White","instant-images"),value:"white"}],Vt=[{label:(0,a.__)("Landscape","instant-images"),value:"landscape"},{label:(0,a.__)("Portrait","instant-images"),value:"portrait"},{label:(0,a.__)("Square","instant-images"),value:"squarish"}],Gt=[{label:(0,a.__)("Grayscale","instant-images"),value:"grayscale"},{label:(0,a.__)("Red","instant-images"),value:"red"},{label:(0,a.__)("Orange","instant-images"),value:"orange"},{label:(0,a.__)("Yellow","instant-images"),value:"yellow"},{label:(0,a.__)("Green","instant-images"),value:"green"},{label:(0,a.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,a.__)("Blue","instant-images"),value:"blue"},{label:(0,a.__)("Lilac","instant-images"),value:"lilac"},{label:(0,a.__)("Pink","instant-images"),value:"pink"},{label:(0,a.__)("White","instant-images"),value:"white"},{label:(0,a.__)("Gray","instant-images"),value:"gray"},{label:(0,a.__)("Black","instant-images"),value:"black"},{label:(0,a.__)("Brown","instant-images"),value:"brown"},{label:(0,a.__)("Transparent","instant-images"),value:"transparent"}],Jt=[{label:(0,a.__)("Backgrounds","instant-images"),value:"backgrounds"},{label:(0,a.__)("Fashion","instant-images"),value:"fashion"},{label:(0,a.__)("Nature","instant-images"),value:"nature"},{label:(0,a.__)("Science","instant-images"),value:"science"},{label:(0,a.__)("Education","instant-images"),value:"education"},{label:(0,a.__)("Feelings","instant-images"),value:"feelings"},{label:(0,a.__)("Health","instant-images"),value:"health"},{label:(0,a.__)("People","instant-images"),value:"people"},{label:(0,a.__)("Religion","instant-images"),value:"religion"},{label:(0,a.__)("Places","instant-images"),value:"places"},{label:(0,a.__)("Animals","instant-images"),value:"animals"},{label:(0,a.__)("Industry","instant-images"),value:"industry"},{label:(0,a.__)("Computer","instant-images"),value:"computer"},{label:(0,a.__)("Food","instant-images"),value:"food"},{label:(0,a.__)("Sports","instant-images"),value:"sports"},{label:(0,a.__)("Food","instant-images"),value:"food"},{label:(0,a.__)("Transportation","instant-images"),value:"transportation"},{label:(0,a.__)("Travel","instant-images"),value:"travel"},{label:(0,a.__)("Buildings","instant-images"),value:"buildings"},{label:(0,a.__)("Business","instant-images"),value:"business"},{label:(0,a.__)("Music","instant-images"),value:"music"}],Yt=[{label:(0,a.__)("Horizontal","instant-images"),value:"horizontal"},{label:(0,a.__)("Vertical","instant-images"),value:"vertical"}],$t=[{label:(0,a.__)("Photo","instant-images"),value:"photo"},{label:(0,a.__)("Illustration","instant-images"),value:"illustration"},{label:(0,a.__)("Vector","instant-images"),value:"vector"}],Kt=[{label:(0,a.__)("Black & White","instant-images"),value:"black_and_white"},{label:(0,a.__)("Black","instant-images"),value:"black"},{label:(0,a.__)("White","instant-images"),value:"white"},{label:(0,a.__)("Yellow","instant-images"),value:"yellow"},{label:(0,a.__)("Green","instant-images"),value:"green"},{label:(0,a.__)("Orange","instant-images"),value:"orange"},{label:(0,a.__)("Red","instant-images"),value:"red"},{label:(0,a.__)("Purple","instant-images"),value:"purple"},{label:(0,a.__)("Magenta","instant-images"),value:"magenta"},{label:(0,a.__)("Teal","instant-images"),value:"teal"},{label:(0,a.__)("Blue","instant-images"),value:"blue"}],Xt=[{label:(0,a.__)("Landscape","instant-images"),value:"landscape"},{label:(0,a.__)("Portrait","instant-images"),value:"portrait"},{label:(0,a.__)("Square","instant-images"),value:"squarish"}];function Zt(e){return function(e){if(Array.isArray(e))return Qt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Qt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n-1&&parseInt(n)<2&&alert(instant_img_localize.api_ratelimit_msg)}}function En(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Rn="";function Sn(e){var t=e.currentTarget,n=t.getBoundingClientRect(),r=Math.round(n.left),i=Math.round(n.top),o=t.closest("#photo-listing").querySelector("#tooltip");o.classList.remove("over"),t.classList.contains("tooltip--above")?o.classList.add("above"):o.classList.remove("above"),Rn=setInterval((function(){clearInterval(Rn),o.innerHTML=t.dataset.title,r=r-o.offsetWidth+t.offsetWidth+5,o.style.left="".concat(r,"px"),o.style.top="".concat(i,"px"),setTimeout((function(){o.classList.add("over")}),25)}),750)}function xn(e){clearInterval(Rn),e.currentTarget.closest("#photo-listing").querySelector("#tooltip").classList.remove("over")}function kn(e){e&&window&&window.open(e,"_blank")}function On(){var e=instant_img_localize;switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:200){case 400:case 401:return e.api_invalid_msg;case 403:return e.api_invalid_403_msg;case 404:return e.api_invalid_404_msg;case 429:return e.api_ratelimit_msg;case 500:case 503:return e.api_invalid_500_msg;case 501:return e.api_invalid_501_msg}}function Cn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=instant_img_localize,r=On(t);switch(t){case 400:case 401:case 500:case 429:console.warn("[".concat(n.instant_images," - ").concat(t," Error] ").concat(En(e),": ").concat(r))}}function An(e){return e&&e[Ht.defaults.arr_key]||[]}function Bn(e){return void 0===e.total||null===e.total?0:e.total}function Ln(e){if(!e||Ht.testmode)return!1;var t=sessionStorage.getItem(bn(e));if(!t)return!1;var n=JSON.parse(t),r=n.expires,i=void 0===r?0:r,o=n.error;if(void 0!==o&&o)return!1;var a=Date.now()>i;return a&&Pn(e),!(!n||a)&&n}function jn(e,t){if(!e||!t||null!=t&&t.error)return!1;t.expires=Date.now()+72e5,sessionStorage.setItem(bn(e),JSON.stringify(t))}function Pn(e){if(!e)return!1;sessionStorage.removeItem(bn(e))}function Nn(e){return Nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nn(e)}function Tn(){Tn=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new B(r||[]);return i(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",d="suspendedYield",p="executing",m="completed",v={};function g(){}function y(){}function b(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(L([])));E&&E!==n&&r.call(E,a)&&(_=E);var R=b.prototype=g.prototype=Object.create(_);function S(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(i,o,a,s){var l=f(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==Nn(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function k(t,n,r){var i=h;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?m:d,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function zn(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function In(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Mn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=1?null:React.createElement("div",{className:"instant-images-no-results"},React.createElement("div",null,React.createElement("h3",null,instant_img_localize.no_results," "),React.createElement("p",null,instant_img_localize.no_results_desc," ")))}const Yn=n.p+"images/giphy-powered.9748c37d.png";var $n=Ht.providers;function Kn(e){var t=e.switchProvider,n=Dt().provider;return React.createElement(o.Fragment,null,!(null==$n||!$n.length)&&React.createElement("nav",{className:"provider-nav"},$n.map((function(e,r){return React.createElement("div",{key:"provider-".concat(r)},React.createElement("button",{onClick:function(){return t(e.toLowerCase())},className:n===e.toLowerCase()?"provider-nav--btn active":"provider-nav--btn"},Ft(e),React.createElement("span",null,e),Ht[e.toLowerCase()].new&&React.createElement("span",{className:"provider-nav--new"},instant_img_localize.new)))})),"giphy"===n?React.createElement("div",{className:"giphy-powered"},React.createElement("a",{href:"https://giphy.com",target:"_blank",rel:"noreferrer"},React.createElement("img",{src:Yn,alt:"Powered by Giphy"}))):null))}function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=200&&t.status<400&&JSON.parse(t.response).success||i(!1)},t.onerror=function(e){console.warn(e),i(!1)}}),[]),React.createElement(o.Fragment,null,r?null:React.createElement("div",{className:"error-messaging"},React.createElement("strong",null,instant_img_localize.error_restapi),instant_img_localize.error_restapi_desc))}const Qn=window.wp.data;function er(e,t){var n=e.id,i=void 0===n?null:n,o=e.url,a=void 0===o?null:o,s=e.caption,l=void 0===s?"":s,c=e.alt,u=void 0===c?"":c;if(a&&i){var f=(0,r.createBlock)("core/image",{id:i,url:a,caption:l,alt:u});t?(0,Qn.dispatch)("core/block-editor").replaceBlock(t,f):(0,Qn.dispatch)("core/block-editor").insertBlocks(f)}}function tr(e){return tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tr(e)}function nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rr(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&React.createElement("img",{className:"user-wrap--photo",src:L,alt:""}),B)),React.createElement("div",{className:"photo-options"},h&&!Z?React.createElement(o.Fragment,null,React.createElement("button",{type:"button",className:"set-featured fade","data-title":instant_img_localize.set_as_featured,onMouseEnter:function(e){return Sn(e)},onMouseLeave:function(e){return xn(e)},onClick:function(e){return function(e){xn(e),ne.current&&(oe=!0,ne.current.click())}(e)}},React.createElement("i",{className:"fa fa-picture-o","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.set_as_featured)),React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(e){return Sn(e)},onMouseLeave:function(e){return xn(e)},onClick:function(e){return se(e)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post))):null,!!l&&React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(e){return Sn(e)},onMouseLeave:function(e){return xn(e)},onClick:function(e){return se(e)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post)),Z?React.createElement("button",{onClick:function(){Z&&(window.location=Z)},className:"edit-photo-admin fade","data-title":instant_img_localize.edit_upload,onMouseEnter:function(e){return Sn(e)},onMouseLeave:function(e){return xn(e)}},React.createElement("i",{className:"fa fa-pencil","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_upload)):React.createElement("button",{onClick:function(e){return function(e){e.preventDefault(),xn(e);var t=document.querySelectorAll(".edit-screen.editing");t&&t.forEach((function(e){e.classList.remove("editing")})),re.current.classList.add("editing"),setTimeout((function(){re.current.focus({preventScroll:!0})}),150)}(e)},className:"edit-photo fade","data-title":instant_img_localize.edit_details,onMouseEnter:function(e){return Sn(e)},onMouseLeave:function(e){return xn(e)}},React.createElement("i",{className:"fa fa-cog","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_details)))),React.createElement("div",{className:"photo-meta"},R?React.createElement("span",{className:"likes tooltip--above","data-title":R+" "+N,onMouseEnter:function(e){return Sn(e)},onMouseLeave:function(e){return xn(e)}},React.createElement("i",{className:"fa fa-heart heart-like","aria-hidden":"true"})," ",R):null,React.createElement("a",{className:"tooltip--above",href:v,"data-title":"".concat(instant_img_localize.open_external," ").concat(En(i)),onMouseEnter:function(e){return Sn(e)},onMouseLeave:function(e){return xn(e)},rel:"noopener noreferrer",target:"_blank"},React.createElement("i",{className:"fa fa-external-link","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},"".concat(instant_img_localize.open_external," ").concat(En(i)))))),React.createElement("div",{className:"edit-screen",tabIndex:"0",ref:re},React.createElement("div",{className:"edit-screen--title"},React.createElement("div",null,React.createElement("p",{className:"heading"},instant_img_localize.edit_details),S&&S.length>0&&React.createElement("p",{className:"dimensions"},S)),React.createElement("div",{className:"preview",style:{backgroundImage:"url(".concat(O,")")}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_filename,":"),React.createElement("input",{type:"text",name:"filename","data-original":m,placeholder:U.filename,value:U.filename,onChange:function(e){return ue(e)}}),React.createElement("em",null,".",E)),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_title,":"),React.createElement("input",{type:"text",name:"title","data-original":g,placeholder:g,value:U.title||"",onChange:function(e){return ue(e)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_alt,":"),React.createElement("input",{type:"text",name:"alt","data-original":y,value:U.alt||"",onChange:function(e){return ue(e)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_caption,":"),React.createElement("textarea",{rows:"4",name:"caption","data-original":H,onChange:function(e){return ue(e)},value:U.caption||"",ref:ie})),F?React.createElement("div",{className:"add-attribution-row"},React.createElement("button",{onClick:function(e){return function(e){e.preventDefault(),ie.current.value=F,q(rr(rr({},U),{},{caption:F}))}(e)},type:"button"},instant_img_localize.attribution)):null,React.createElement("div",{className:"edit-screen--controls"},React.createElement("button",{type:"button",className:"button button-secondary",onClick:function(e){return q({filename:m,title:g,alt:y,caption:H}),re.current.classList.remove("editing"),void ne.current.focus({preventScrol:!0})}},instant_img_localize.cancel)," "," ",React.createElement("button",{type:"button",className:"button button-primary",onClick:function(){return re.current.classList.remove("editing"),void ne.current.click()}},l?instant_img_localize.insert_into_post:instant_img_localize.upload_now))),React.createElement("div",{className:"photo-status"})))}function lr(e){var t=e.result.data,n=void 0===t?null:t,r=(null==n?void 0:n.url)||"",i=(null==n?void 0:n.title)||"",a=(null==n?void 0:n.description)||"",s=(null==n?void 0:n.avatar)||"",l=n.image,c=void 0===l?null:l,u=c.src,f=void 0===u?null:u,h=c.alt,d=void 0===h?null:h,p=(0,o.useRef)(),m=(0,o.useRef)();return React.createElement(o.Fragment,null,c&&r?React.createElement("article",{className:"photo feature",title:a,ref:p,onClick:function(){return m.current.click()}},React.createElement("div",{className:"photo--wrap"},React.createElement("span",{className:"flag",title:instant_img_localize.advertisement},instant_img_localize.ad),React.createElement("div",{className:"img-wrap"},React.createElement("a",{className:"loaded",href:r,target:"_blank",ref:m,rel:"noreferrer"},React.createElement("img",{src:f,alt:d}))),React.createElement("div",{className:"feature-title"},s&&React.createElement("img",{src:s,alt:i}),React.createElement("span",null,i)))):null)}function cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n-1&&t.splice(n,1),t.length>=10&&(t.length=10),t.unshift(e),localStorage.setItem(yr,JSON.stringify(t))}else localStorage.setItem(yr,JSON.stringify([e]))}}(r),v(_r())))}(e)},autoComplete:"off"},React.createElement("label",{htmlFor:"search-input",className:"offscreen"},instant_img_localize.search_label),React.createElement("div",{ref:_},React.createElement("input",{ref:t,type:"text",id:"search-input",placeholder:instant_img_localize.search,disabled:f,onChange:function(e){return l&&d(e.target.value)},onFocus:function(){return b(!0)}}),l&&((null==m?void 0:m.length)||(null==h?void 0:h.length))?React.createElement(Or,{show:y,history:m,setHistory:v,setSearchValue:function(e){var n=null==t?void 0:t.current;n.value=e,null==w||w.current.click(),n.focus()},container:_}):null,!a&&React.createElement(kr,{show:y})),React.createElement("button",{type:"submit",disabled:f,ref:w},React.createElement("i",{className:"fa fa-search"}),React.createElement("span",{className:"offscreen"},instant_img_localize.search)),React.createElement(Cr,{show:y})))}));function jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function zr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ir(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==h[0]&&h[0],!z){e.next=3;break}return e.abrupt("return",!1);case 3:if(n||""===(null==he||null===(t=he.current)||void 0===t?void 0:t.value)){e.next=7;break}if(!m||!g){e.next=7;break}return xe(he.current.value),e.abrupt("return");case 7:if(N(!0),d=void 0,(null==he||null===(d=he.current)||void 0===d?void 0:d.value)&&(he.current.value=""),$(b),Z([]),je(),Gr=1,r=cn(S,re),i=mn("photos",r),!(o=Ln(i))){e.next=18;break}Oe(An(o),!1,null),e.next=37;break;case 18:return e.next=20,fetch(i);case 20:return s=e.sent,l=s.status,wn(s.headers),e.prev=23,e.next=26,s.json();case 26:c=e.sent,u=c.error,f=void 0===u?null:u,Oe(An(c),!1,f),jn(i,c),e.next=37;break;case 32:e.prev=32,e.t0=e.catch(23),Cn(a,l),N(!1),Pn(i);case 37:setTimeout((function(){N(!1)}),250);case 38:case"end":return e.stop()}var d}),e,null,[[23,32]])}))),Ee.apply(this,arguments)}function Re(){return Se.apply(this,arguments)}function Se(){return(Se=Hr(Tr().mark((function e(){var t,n,r,i,o,s,l,c,u,f,h,d;return Tr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(B&&!P&&!z&&!D){e.next=2;break}return e.abrupt("return");case 2:if(I(!0),Gr=parseInt(Gr)+1,t=null!=Y&&Y.active&&null!=Y&&Y.term?{term:Y.term}:{},n=null!=Y&&Y.active?"search":"photos",r=null!=Y&&Y.active?ae:re,i=Ir(Ir(Ir({},{page:Gr}),t),r),o=cn(S,i),s=mn(n,o),!(l=Ln(s))){e.next=15;break}Oe(An(l),!0,null),e.next=34;break;case 15:return e.next=17,fetch(s);case 17:return c=e.sent,u=c.status,wn(c.headers),e.prev=20,e.next=23,c.json();case 23:f=e.sent,h=f.error,d=void 0===h?null:h,Oe(An(f),!0,d),jn(s,f),e.next=34;break;case 29:e.prev=29,e.t0=e.catch(20),Cn(a,u),I(!1),Pn(s);case 34:case"end":return e.stop()}}),e,null,[[20,29]])})))).apply(this,arguments)}function xe(_x){return ke.apply(this,arguments)}function ke(){return(ke=Hr(Tr().mark((function e(t){var n,r,i,o,s,l,c,u,f,h,d;return Tr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N(!0),je(),Gr=1,n="id:"===t.substring(0,3)?"id":"term",r="id"===n?{id:t.replace("id:","").replace(/\s+/,"")}:{term:t},i=Ir(Ir(Ir({},{page:Gr}),r),ae),o=cn(S,i),s=mn("search",o),!(l=Ln(s))){e.next=14;break}Oe(An(l),!1,null),$({active:!0,term:t,type:n,results:Bn(l)}),e.next=35;break;case 14:return e.next=16,fetch(s);case 16:return c=e.sent,u=c.status,wn(c.headers),e.prev=19,e.next=22,c.json();case 22:f=e.sent,h=f.error,d=void 0===h?null:h,Oe(An(f),!1,d),$({active:!0,term:t,type:n,results:Bn(f)}),jn(s,f),e.next=35;break;case 29:e.prev=29,e.t0=e.catch(19),F(!0),N(!1),Cn(a,u),Pn(s);case 35:he.current.classList.remove(y);case 36:case"end":return e.stop()}}),e,null,[[19,29]])})))).apply(this,arguments)}function Oe(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;e=null==t?void 0:t.length,F(0===parseInt(e)||void 0===e),E(n?function(e){return[].concat(Dr(e),Dr(t))}:t),U(r)}function Ce(e,t){var n=Ir({},re);n[e]&&"#"===t||""===t||"all"===t?delete n[e]:n[e]=t,ie(Ir({},n))}function Ae(e){return Be.apply(this,arguments)}function Be(){return(Be=Hr(Tr().mark((function e(t){var n,r;return Tr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S!==t){e.next=2;break}return e.abrupt("return");case 2:if(N(!0),U(!1),G(!1),ye.classList.remove("overflow-hidden"),!Ht[t].requires_key||O.includes(t)){e.next=27;break}return e.prev=7,e.next=10,fetch(vn(t));case 10:if(n=e.sent,r=n.status,wn(n.headers),200===r){e.next=18;break}return G(t),U(!0),ye.classList.add("overflow-hidden"),e.abrupt("return");case 18:200===r&&C((function(e){return[].concat(Dr(e),[t])})),e.next=27;break;case 21:return e.prev=21,e.t0=e.catch(7),G(t),ye.classList.add("overflow-hidden"),U(!0),e.abrupt("return");case 27:setTimeout((function(){te(tn[t].filters),x(t)}),250);case 28:case"end":return e.stop()}}),e,null,[[7,21]])})))).apply(this,arguments)}function Le(){return Le=Hr(Tr().mark((function e(t){var n;return Tr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&!((null==t?void 0:t.length)<3)){e.next=2;break}return e.abrupt("return");case 2:return n=instant_img_localize.root+"instant-images-extended/suggestions/?term=".concat(t),e.next=5,kt.get(n).then((function(e){Z(e.data)})).catch((function(e){console.warn(e)}));case 5:case"end":return e.stop()}}),e)}))),Le.apply(this,arguments)}function je(){pe&&null!=fe&&fe.current&&(null==fe||fe.current.scroll({top:0,left:0,behavior:"smooth"}))}function Pe(e){if("Escape"===e.key){var t=fe.current.querySelectorAll(".edit-screen.editing");t&&Dr(t).forEach((function(e){null==e||e.classList.remove("editing")}))}}return(0,o.useEffect)((function(){null!=Y&&Y.active||se({})}),[Y]),(0,o.useEffect)((function(){B&&null!=Y&&Y.active&&xe(null==Y?void 0:Y.term)}),[ae]),(0,o.useEffect)((function(){B&&we()}),[re]),(0,o.useEffect)((function(){te(tn[S].filters),ie({})}),[S]),(0,o.useEffect)((function(){Re()}),[ue]),(0,o.useEffect)((function(){Vr(fe.current,(function(){ve||(de.current=new(Bt())(fe.current,{itemSelector:".photo"}),fe.current.querySelectorAll(".photo").forEach((function(e){e.classList.add("in-view")}))),setTimeout((function(){N(!1),I(!1),B||L(!0)}),250)}))}),[w]),(0,o.useEffect)((function(){return N(!1),_e.classList.add("loaded"),ve&&we(),document.addEventListener("keydown",Pe,!1),function(){document.removeEventListener("keydown",Pe,!1)}}),[]),React.createElement(o.Fragment,null,React.createElement(Mt,{value:{provider:S,wpBlock:pe,mediaModal:ge,blockSidebar:me,clientId:h,search:Y,apiError:W,getPhotos:we,searchHandler:function(e){e.preventDefault();var t=he.current.value;t.length>2?(he.current.classList.add(y),xe(t)):he.current.focus()},filterSearch:function(e,t){var n=Ir({},ae);n[e]&&"#"===t||""===t||"all"===t?delete n[e]:n[e]=t,se(Ir({},n))},suggestions:X,getSuggestions:function(e){return Le.apply(this,arguments)}}},pe?React.createElement(rn,{switchProvider:Ae}):React.createElement(React.Fragment,null,React.createElement(Kn,{switchProvider:Ae}),React.createElement(xr,null)),React.createElement(Zn,null),React.createElement("div",{className:"control-nav"},React.createElement("div",{className:Ct()("control-nav--filters-wrap",W||null!=Y&&Y.active?"inactive":null)},ee&&null!==(n=Object.entries(ee))&&void 0!==n&&n.length?React.createElement("div",{className:"control-nav--filters"},Object.entries(ee).map((function(e,t){var n=Wr(e,2),r=n[0],i=n[1];return React.createElement(Vn,{key:"".concat(S,"-").concat(t,"-").concat(r),data:i,filterKey:r,handler:Ce})}))):null),React.createElement(Lr,{ref:he})),React.createElement("div",{id:"photo-listing",className:P?"loading":null},React.createElement(Pr,null),pe?React.createElement(mr,{ref:fe,data:w,done:D,loadMorePhotos:Re}):React.createElement(ur,{ref:fe,data:w}),React.createElement(Jn,{total:null==Y?void 0:Y.results,is_search:null==Y?void 0:Y.active}),React.createElement(Gn,{ref:ce,loadMorePhotos:Re,loading:z,done:D}),React.createElement(Dn,{provider:V,callback:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&x(e),G(!1),N(!1),U(!1),ye.classList.remove("overflow-hidden")}}),React.createElement(Fn,null),React.createElement(vr,null))))}const Yr=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"connekthq/instant-images","version":"1.0.0","title":"Instant Images","category":"media","description":"One click photo uploads from Unsplash, Openverse, Pixabay and Pexels.","keywords":["image","instant images","photo","stock photos","Unsplash","Openverse","Pixabay","Pexels"],"attributes":{},"supports":{"customClassName":false,"anchor":false,"html":false},"textdomain":"instant-images","editorScript":"file:./index.js"}');function $r(){return React.createElement("div",{style:{width:"300px",padding:"0 10px"}},React.createElement("p",null,React.createElement("strong",null,(0,a.__)("Instant Images Help","instant-images"))),React.createElement("ol",null,React.createElement("li",null,(0,a.__)("Browse photos from the various stock image providers.","instant-images")),React.createElement("li",null,(0,a.__)("Select/click an image to immediately start the upload process.","instant-images")),React.createElement("li",null,(0,a.__)("Uploaded image will be inserted directly into the post using the WordPress core Image block.","instant-images"))))}function Kr(e){return Kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kr(e)}function Xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n|3Fd+dvF;ItB&-1_1^E1_1#D1_gl!59SjN_A~kkg@p$T4+aJl7!(8)1QZwq z7z7v?7qZl$%?aguAtn#o*juh&{V=}9Z+X0NZW!6a`-W@7;|o6TZ;ZPc92 zWZDq{fpIfte62o(y622>q588@pM)9rQ;ni8RZ#s~Fhu0FW|P@U6rEzMYU z{2=IEsp|)IJyqXR=K2}WZyal(^XTibbxrG3s_TW|fZRRi*+=zxkLxYg*y28_^LKT= zrZ>Oy1W+6By_z(_aYn$<3#iDrOpVijOPmYU@d8Rk7^7uD=1<6?E|CQca*1diQyAX& z*=vBJK?n^1u!jMou)zp0*eU9!JtkWdgC**?Ax72Scp}Emu%Hz@u)%QxV^a`xM4SMY z(WkW3IOu3|sQKH|Ej{OiM*mogL$r|!M1F$kkF{=w6&N{y2|}z}+ayMGo&dm7eLrKq z-wYx}Ug&}R35EUnNKe3EkIRI)Lc`jvutQaS3 z;UozRJag* z!aXUO=LEh@9CT&QQQ#|P9kCT9KeVS?j$zY8)gvD`qfXN`))HbZrqC&|_8Qc+bWxQL zAasJ7R9Ge#=#bT+Uy>ZMVis&b3<(9Et!S%-lDX{2AvFxMf=9PP~jg3IJUD267rTBwZ9WRWcc!bRmS<}@HI-~dCV z0pA}z@2g;!X{SE5P9}L9fFN-v7SB#maZ5mu>@p3 zaCHfuF9n^Sgo9vmLw`-tUmbRP5c+NGeSJ2DIyY>EN$uWGhN>fH799(7 zM0WpZK*SalSjQf!OA^OD1)PQ3cRg@z8912KAl-RaS(xzSfQ4-Y@4S|1{hpxjRRmGL zcdVD|{B9jRv)l_16Az&fzh6 zz;|a~?vN9sKz{czmh7Y`MW@-&{6-k};@W724ysx^COim9e~WM&8;k?9*^-j%8cuSp zDA65NL0z`p_I>9JgMUL(kKB;oShpSWMsNvL z_1YNTI$4e&$G$J2MvRie;RLy_KB0sAQ-(HTQ$y?i4#Vr8?g>VpDh8A$?Ij*N=*RW! zjc`5~1CUaP2wh)4zpax4U<&LkACUgyi}W`;meyB);+vncEl!x2C7N z0fP6_5-16JMz_?n`X7z&o7DFsl#pdG$vA+ZRC~U_sHIQ+JxPy!2tfIQP1z>s*NShD zWG66&bRaxl;YMVGmIx6c{%i(`pX(Ksqa>YEp~{k8`6isxb>%OI-rm18 ln0|HguSUouw~=203;^Y_wOS?=%K`uZ002ovPDHLkV1iU7qP_qC diff --git a/build/instant-images.asset.php b/build/instant-images.asset.php index 8dcc78f..81bb239 100644 --- a/build/instant-images.asset.php +++ b/build/instant-images.asset.php @@ -1 +1 @@ - array('react', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '1fe5ec8a16d2c0df3b38'); + array('react', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'f395821b4e20334943fa'); diff --git a/build/instant-images.js b/build/instant-images.js index 0053078..f91b7f7 100644 --- a/build/instant-images.js +++ b/build/instant-images.js @@ -1,21107 +1 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ "./src/js/common/pluginProvider.js": -/*!*****************************************!*\ - !*** ./src/js/common/pluginProvider.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ PluginProvider: () => (/* binding */ PluginProvider), -/* harmony export */ usePluginContext: () => (/* binding */ usePluginContext) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); - - -// Create Context object. -var PluginContext = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createContext)(); - -// Export Provider. -function PluginProvider(props) { - var value = props.value, - children = props.children; - return /*#__PURE__*/React.createElement(PluginContext.Provider, { - value: value - }, children); -} - -// Export useContext Hook. -function usePluginContext() { - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useContext)(PluginContext); -} - -/***/ }), - -/***/ "./src/js/components/APILightbox.js": -/*!******************************************!*\ - !*** ./src/js/components/APILightbox.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ APILightbox) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _functions_buildURL__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../functions/buildURL */ "./src/js/functions/buildURL.js"); -/* harmony import */ var _functions_consoleStatus__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../functions/consoleStatus */ "./src/js/functions/consoleStatus.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _functions_updatePluginSetting__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../functions/updatePluginSetting */ "./src/js/functions/updatePluginSetting.js"); -/* harmony import */ var _ProviderIcons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ProviderIcons */ "./src/js/components/ProviderIcons.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } -function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - -/** - * Render the APILightbox component. - * Note: Component is display when switching providers and the API is invalid. - * - * @param {Object} props The component props. - * @return {JSX.Element} The APILightbox component. - */ -function APILightbox(props) { - var provider = props.provider, - callback = props.callback; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('invalid'), - _useState2 = _slicedToArray(_useState, 2), - apiStatus = _useState2[0], - setAPIStatus = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(''), - _useState4 = _slicedToArray(_useState3, 2), - response = _useState4[0], - setResponse = _useState4[1]; - var lightbox = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var inputRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var submitRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var api_key = instant_img_localize["".concat(provider, "_app_id")]; - var title = apiStatus === 'invalid' ? instant_img_localize.api_key_invalid : ''; - - /** - * Handler for the form submission. - * - * @param {Event} e The form event. - */ - function handleSubmit(_x) { - return _handleSubmit.apply(this, arguments); - } - /** - * Close the lightbox - */ - function _handleSubmit() { - _handleSubmit = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) { - var _inputRef$current; - var key, data, ok, status, headers; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - e.preventDefault(); - setAPIStatus('loading'); - - // Get API key value. - key = inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value; // Set API key to localized variable. - instant_img_localize["".concat(provider, "_app_id")] = key; - - // Update plugin settings via REST API. - (0,_functions_updatePluginSetting__WEBPACK_IMPORTED_MODULE_5__["default"])("".concat(provider, "_api"), key); - _context.prev = 5; - _context.next = 8; - return fetch((0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_2__.buildTestURL)(provider)); - case 8: - data = _context.sent; - // Handle response. - ok = data.ok, status = data.status, headers = data.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_4__.checkRateLimit)(headers); - - // Handle response actions. - if (ok) { - // Success. - setAPIStatus('valid'); - setResponse(instant_img_localize.api_success_msg); - setTimeout(function () { - setResponse(''); - setAPIStatus('invalid'); - callback(provider); - }, 1000); - } else { - setAPIStatus('invalid'); // Error/Invalid. - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_3__["default"])(provider, status); // Render console warning. - - if (status === 400 || status === 401) { - setResponse(instant_img_localize.api_invalid_msg); // Unsplash/Pixabay incorrect API key. - } - if (status === 429) { - setResponse(instant_img_localize.api_ratelimit_msg); // Pixabay - too many requests. - } - } - _context.next = 19; - break; - case 14: - _context.prev = 14; - _context.t0 = _context["catch"](5); - setAPIStatus('invalid'); // Error/Invalid. - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_3__["default"])(provider, 500); // Render console warning. - setResponse(instant_img_localize.api_invalid_500_msg); - case 19: - case "end": - return _context.stop(); - } - }, _callee, null, [[5, 14]]); - })); - return _handleSubmit.apply(this, arguments); - } - function closeLightbox() { - if (lightbox !== null && lightbox !== void 0 && lightbox.current) { - lightbox.current.classList.remove('active'); - setTimeout(function () { - callback(); - }, 150); - } - } - - /** - * Close the lightbox with a background click. - * - * @param {Event} e The form event. - */ - function bkgClick(e) { - var target = e.target; - // If clicked element is the background. - if (target === (lightbox === null || lightbox === void 0 ? void 0 : lightbox.current)) { - closeLightbox(); - } - } - - /** - * Escape handler. - * - * @param {Event} e The key press event. - */ - function escFunction(e) { - var key = e.key; - if (key === 'Escape') { - closeLightbox(); - } - } - - /** - * Reset the key to use Instant Images default. - */ - function getDefaultKey() { - inputRef.current.value = ''; - setTimeout(function () { - submitRef.current.click(); - }, 25); - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - var _lightbox$current; - document.addEventListener('keydown', escFunction, false); - lightbox === null || lightbox === void 0 || (_lightbox$current = lightbox.current) === null || _lightbox$current === void 0 || _lightbox$current.classList.add('active'); - return function () { - document.removeEventListener('keydown', escFunction, false); - }; - }, [provider]); //eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, provider ? - /*#__PURE__*/ - // eslint-disable-next-line - React.createElement("div", { - className: "api-lightbox", - ref: lightbox, - onClick: function onClick(e) { - return bkgClick(e); - }, - tabIndex: "-1" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", { - className: "api-lightbox--close", - onClick: function onClick() { - return closeLightbox(); - } - }, "\xD7", /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.btnClose)), /*#__PURE__*/React.createElement("div", { - className: "api-lightbox--details" - }, /*#__PURE__*/React.createElement("h3", null, (0,_ProviderIcons__WEBPACK_IMPORTED_MODULE_6__.getProviderIcon)(provider), provider), /*#__PURE__*/React.createElement("p", null, instant_img_localize["".concat(provider, "_api_desc")]), /*#__PURE__*/React.createElement("p", { - className: "action-controls" - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_4__.gotoURL)(instant_img_localize["".concat(provider, "_api_url")]); - } - }, instant_img_localize.get_api_key), provider !== 'giphy' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, "|"), /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return getDefaultKey(); - } - }, instant_img_localize.use_instant_images_key)) : null)), /*#__PURE__*/React.createElement("form", { - onSubmit: function onSubmit(e) { - return handleSubmit(e); - } - }, /*#__PURE__*/React.createElement("label", { - htmlFor: "key", - className: "offscreen" - }, instant_img_localize.enter_api_key), /*#__PURE__*/React.createElement("div", { - className: "api-lightbox--input-wrap" - }, /*#__PURE__*/React.createElement("span", { - className: apiStatus, - title: title && title - }, apiStatus === 'invalid' && /*#__PURE__*/React.createElement("i", { - className: "fa fa-exclamation-triangle", - "aria-hidden": "true" - }), apiStatus === 'valid' && /*#__PURE__*/React.createElement("i", { - className: "fa fa-check-circle", - "aria-hidden": "true" - }), apiStatus === 'loading' && /*#__PURE__*/React.createElement("i", { - className: "fa fa-spinner fa-spin", - "aria-hidden": "true" - })), /*#__PURE__*/React.createElement("input", { - type: "text", - id: "key", - ref: inputRef, - placeholder: "Enter API Key", - defaultValue: api_key - })), response && /*#__PURE__*/React.createElement("p", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('api-lightbox--response', apiStatus) - }, response), /*#__PURE__*/React.createElement("button", { - type: "submit", - ref: submitRef - }, instant_img_localize.btnVerify))))) : null); -} - -/***/ }), - -/***/ "./src/js/components/ErrorLightbox.js": -/*!********************************************!*\ - !*** ./src/js/components/ErrorLightbox.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ ErrorLightbox) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _functions_getErrorMessage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../functions/getErrorMessage */ "./src/js/functions/getErrorMessage.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _ProviderIcons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ProviderIcons */ "./src/js/components/ProviderIcons.js"); - - - - - - - -/** - * Render the ErrorLightbox component. - * Note: Component is display on initial plugin load if the default provider has an invalid API key. - * - * @return {JSX.Element} The ErrorLightbox component. - */ -function ErrorLightbox() { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider, - apiError = _usePluginContext.apiError; - var lightbox = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var status = apiError !== null && apiError !== void 0 && apiError.status ? apiError.status : null; - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, apiError && status && /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('api-lightbox', 'error-lightbox', 'active'), - ref: lightbox, - tabIndex: "-1" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('api-lightbox--details', 'error-lightbox') - }, /*#__PURE__*/React.createElement("h3", null, (0,_ProviderIcons__WEBPACK_IMPORTED_MODULE_5__.getProviderIcon)(provider), provider), /*#__PURE__*/React.createElement("p", { - className: "callout-warning" - }, status, " ", instant_img_localize.error), /*#__PURE__*/React.createElement("p", null, (0,_functions_getErrorMessage__WEBPACK_IMPORTED_MODULE_3__["default"])(status)), /*#__PURE__*/React.createElement("p", { - className: "more-info" - }, instant_img_localize.api_default_provider), /*#__PURE__*/React.createElement("p", { - className: "action-controls" - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_4__.gotoURL)(instant_img_localize["".concat(provider, "_api_url")]); - } - }, instant_img_localize.get_api_key)))))); -} - -/***/ }), - -/***/ "./src/js/components/Filter.js": -/*!*************************************!*\ - !*** ./src/js/components/Filter.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Filter) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hooks/useArrowControls */ "./src/js/hooks/useArrowControls.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - -/** - * Render the Filter component. - * - * @param {Object} props The component props. - * @param {Object} props.data The filter data. - * @param {string} props.filterKey The filter key. - * @param {Function} props.handler The change/click handler function. - * @return {JSX.Element} The Filter component. - */ -function Filter(props) { - var _data$filters; - var data = props.data, - filterKey = props.filterKey, - handler = props.handler; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider; - var defaultValue = data === null || data === void 0 ? void 0 : data["default"]; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - expanded = _useState2[0], - setExpanded = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultValue), - _useState4 = _slicedToArray(_useState3, 2), - selected = _useState4[0], - setSelected = _useState4[1]; - var dropdown = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var button = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var menu = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var id = "".concat(provider, "-").concat(filterKey); - var isColor = filterKey === 'colors' || filterKey === 'color'; - - // Use up/down arrow keys to navigate dropdown. - (0,_hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_3__.useArrowControls)(expanded, dropdown); - - /** - * Toggle menu open/closed. - * - * @param {Event} event The click event. - */ - function toggleMenu(event) { - event.preventDefault(); - - // If disabled, don't open menu. - var target = event.currentTarget; - if (target.disabled) { - return false; - } - if (expanded) { - setExpanded(false); - document.removeEventListener('click', closeMenuOutside); - } else { - setExpanded(true); - document.addEventListener('click', closeMenuOutside); - } - } - - /** - * Close menu when clicking outside. - * - * @param {Event} event The click event. - */ - function closeMenuOutside(event) { - var _menu$current, _button$current; - if (!(menu !== null && menu !== void 0 && (_menu$current = menu.current) !== null && _menu$current !== void 0 && _menu$current.contains(event.target)) && !(button !== null && button !== void 0 && (_button$current = button.current) !== null && _button$current !== void 0 && _button$current.contains(event.target))) { - setExpanded(false); - document.removeEventListener('click', closeMenuOutside); - } - } - - /** - * Checks for focus outside of component. - * - * @param {Event} event The click event. - */ - function focusOutside(event) { - if (!(dropdown !== null && dropdown !== void 0 && dropdown.current.contains(event.target))) { - closeMenuOutside(event); - } - } - - /** - * Detect esc key press. - * - * @param {Event} event The click event. - */ - function escClick(event) { - if (event.key === 'Escape') { - setExpanded(false); - } - } - - /** - * Click handler for the filter buttons. - * - * @param {string} filter The current filter key. - * @param {string} value The value to filter. - */ - function click(filter, value) { - var newValue = selected !== value ? value : defaultValue; - setSelected(newValue); - handler(filter, newValue); - setTimeout(function () { - var _button$current2; - button === null || button === void 0 || (_button$current2 = button.current) === null || _button$current2 === void 0 || _button$current2.click(); - }, 100); - } - - /** - * Convert a color to a CSS value. - * - * @see https://www.w3schools.com/colors/colors_names.asp - * - * @param {string} color The current color. - * @return {string} The color. - */ - function convertColor(color) { - if (color === 'lilac') { - color = 'DarkViolet'; - } - if (color === 'grayscale' || color === 'black_and_white') { - color = 'LightGray'; - } - return color; - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - // Initiate arrow menus. - // a11yarrows.init(dropdown?.current, { - // selector: "button", - // }); - - // Check for focus outside. - document.addEventListener('keyup', focusOutside); - document.addEventListener('keydown', escClick); - return function () { - document.removeEventListener('keyup', focusOutside); - document.removeEventListener('keydown', escClick); - }; - }, []); // eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement("div", { - className: "filter-dropdown", - id: id, - ref: dropdown - }, /*#__PURE__*/React.createElement("button", { - onClick: toggleMenu, - className: "filter-dropdown--button", - "aria-expanded": expanded ? 'true' : 'false', - ref: button - }, /*#__PURE__*/React.createElement("span", { - className: "filter-dropdown--button-label" - }, data === null || data === void 0 ? void 0 : data.label), /*#__PURE__*/React.createElement("span", { - className: "filter-dropdown--button-selected" - }, selected.replace(/_/g, ' '), /*#__PURE__*/React.createElement("i", { - className: "fa fa-caret-down", - "aria-hidden": "true" - }))), /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('filter-dropdown--menu', expanded ? 'expanded' : null), - "data-key": filterKey, - "aria-hidden": expanded ? 'false' : 'true', - ref: menu - }, (data === null || data === void 0 || (_data$filters = data.filters) === null || _data$filters === void 0 ? void 0 : _data$filters.length) && data.filters.map(function (filter, key) { - var label = filter.label, - value = filter.value; - return /*#__PURE__*/React.createElement("button", { - key: key, - disabled: selected === value, - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('filter-dropdown--item', selected === value ? 'selected' : null), - onClick: function onClick() { - return click(filterKey, value); - } - }, label, value !== 'all' && value !== 'transparent' && isColor ? /*#__PURE__*/React.createElement("span", { - className: "_color", - style: { - color: convertColor(value) - } - }) : null); - }))); -} - -/***/ }), - -/***/ "./src/js/components/Icon.js": -/*!***********************************!*\ - !*** ./src/js/components/Icon.js ***! - \***********************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ IconLogo: () => (/* binding */ IconLogo), -/* harmony export */ IconSVG: () => (/* binding */ IconSVG), -/* harmony export */ "default": () => (/* binding */ Icon) -/* harmony export */ }); -/** - * The Icon component. - * - * @return {JSX.Element} The Icon component. - */ -function Icon() { - return /*#__PURE__*/React.createElement("span", { - className: "instant-images-sidebar-icon" - }, /*#__PURE__*/React.createElement(IconSVG, null)); -} - -/** - * The SVG icon. - * - * @return {JSX.Element} The IconSVG component. - */ -function IconSVG() { - return /*#__PURE__*/React.createElement("svg", { - viewBox: "0 0 31 58", - width: "13px", - height: "24px" - }, /*#__PURE__*/React.createElement("polygon", { - points: "20 0 20 23 31 23 11 58 11 34 0 34 20 0", - fill: "#4a7bc5" - })); -} - -/** - * The SVG Logo. - * - * @return {JSX.Element} The IconLogo component. - */ -function IconLogo() { - return /*#__PURE__*/React.createElement("svg", { - width: "80", - height: "80", - viewBox: "0 0 80 80", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("title", null, "Instant Images Icon"), /*#__PURE__*/React.createElement("path", { - d: "M0 8C0 3.58172 3.58172 0 8 0H72C76.4183 0 80 3.58172 80 8V72C80 76.4183 76.4183 80 72 80H8C3.58172 80 0 76.4183 0 72V8Z", - fill: "#647FE8" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z", - fill: "white" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z", - fill: "white" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z", - fill: "#C7D2FF" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z", - fill: "#C7D2FF" - })); -} - -/***/ }), - -/***/ "./src/js/components/InstantImages.js": -/*!********************************************!*\ - !*** ./src/js/components/InstantImages.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ InstantImages) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! masonry-layout */ "./node_modules/masonry-layout/masonry.js"); -/* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(masonry_layout__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var react_intersection_observer__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! react-intersection-observer */ "./node_modules/react-intersection-observer/dist/index.mjs"); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _constants_filters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../constants/filters */ "./src/js/constants/filters.js"); -/* harmony import */ var _editor_block_components_Header__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../editor/block/components/Header */ "./src/js/editor/block/components/Header.js"); -/* harmony import */ var _functions_buildURL__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../functions/buildURL */ "./src/js/functions/buildURL.js"); -/* harmony import */ var _functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../functions/consoleStatus */ "./src/js/functions/consoleStatus.js"); -/* harmony import */ var _functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../functions/getQueryParams */ "./src/js/functions/getQueryParams.js"); -/* harmony import */ var _functions_getResults__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../functions/getResults */ "./src/js/functions/getResults.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _functions_session__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../functions/session */ "./src/js/functions/session.js"); -/* harmony import */ var _APILightbox__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./APILightbox */ "./src/js/components/APILightbox.js"); -/* harmony import */ var _ErrorLightbox__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ErrorLightbox */ "./src/js/components/ErrorLightbox.js"); -/* harmony import */ var _Filter__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Filter */ "./src/js/components/Filter.js"); -/* harmony import */ var _LoadMore__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./LoadMore */ "./src/js/components/LoadMore.js"); -/* harmony import */ var _NoResults__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./NoResults */ "./src/js/components/NoResults.js"); -/* harmony import */ var _ProviderNav__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./ProviderNav */ "./src/js/components/ProviderNav.js"); -/* harmony import */ var _RestAPIError__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./RestAPIError */ "./src/js/components/RestAPIError.js"); -/* harmony import */ var _Results__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Results */ "./src/js/components/Results.js"); -/* harmony import */ var _ResultsWPBlock__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./ResultsWPBlock */ "./src/js/components/ResultsWPBlock.js"); -/* harmony import */ var _Tooltip__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Tooltip */ "./src/js/components/Tooltip.js"); -/* harmony import */ var _cta_Extended__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./cta/Extended */ "./src/js/components/cta/Extended.js"); -/* harmony import */ var _search_SearchForm__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./search/SearchForm */ "./src/js/components/search/SearchForm.js"); -/* harmony import */ var _search_SearchHeader__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./search/SearchHeader */ "./src/js/components/search/SearchHeader.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } -function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } -function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } -function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - -var imagesLoaded = __webpack_require__(/*! imagesloaded */ "./node_modules/imagesloaded/imagesloaded.js"); -var page = 1; - -/** - * Render the main InstantImages application component. - * - * @param {Object} props The component props. - * @param {string} props.editor Editor type. - * @param {string} props.provider Image provider. - * @param {Array} props.data API results. - * @param {Element} props.container Instant Images container element. - * @param {Object} props.api_error API error object. - * @param {string} props.clientId WP block client ID. - * @return {JSX.Element} InstantImages component. - */ -function InstantImages(props) { - var _instant_img_localize4, _Object$entries; - var _props$editor = props.editor, - editor = _props$editor === void 0 ? 'classic' : _props$editor, - provider = props.provider, - data = props.data, - container = props.container, - _props$api_error = props.api_error, - api_error = _props$api_error === void 0 ? null : _props$api_error, - _props$clientId = props.clientId, - clientId = _props$clientId === void 0 ? null : _props$clientId; - var _instant_img_localize = (_instant_img_localize4 = instant_img_localize) === null || _instant_img_localize4 === void 0 || (_instant_img_localize4 = _instant_img_localize4.addons) === null || _instant_img_localize4 === void 0 ? void 0 : _instant_img_localize4.extended, - _instant_img_localize2 = _instant_img_localize.activated, - extended_activated = _instant_img_localize2 === void 0 ? false : _instant_img_localize2, - _instant_img_localize3 = _instant_img_localize.license, - extended_license = _instant_img_localize3 === void 0 ? false : _instant_img_localize3; - var delay = 250; - var searchClass = 'searching'; - var searchDefaults = { - active: false, - term: '', - type: '', - results: 0 - }; - - // App state. - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(data)), - _useState2 = _slicedToArray(_useState, 2), - results = _useState2[0], - setResults = _useState2[1]; // Image results. - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(provider), - _useState4 = _slicedToArray(_useState3, 2), - activeProvider = _useState4[0], - setActiveProvider = _useState4[1]; // Current provider. - var _useState5 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]), - _useState6 = _slicedToArray(_useState5, 2), - apiTested = _useState6[0], - setAPITested = _useState6[1]; // API key test results. - var _useState7 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState8 = _slicedToArray(_useState7, 2), - mounted = _useState8[0], - setMounted = _useState8[1]; // App mounted state. - var _useState9 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(true), - _useState10 = _slicedToArray(_useState9, 2), - loading = _useState10[0], - setLoading = _useState10[1]; // Loading state - var _useState11 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState12 = _slicedToArray(_useState11, 2), - loadingMore = _useState12[0], - setLoadingMore = _useState12[1]; // Load more state. - var _useState13 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState14 = _slicedToArray(_useState13, 2), - done = _useState14[0], - setDone = _useState14[1]; // Done state. - var _useState15 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(api_error), - _useState16 = _slicedToArray(_useState15, 2), - apiError = _useState16[0], - setAPIError = _useState16[1]; // API Error. - var _useState17 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState18 = _slicedToArray(_useState17, 2), - showAPILightbox = _useState18[0], - setShowAPILightbox = _useState18[1]; // Render API key lightbox. - var _useState19 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(searchDefaults), - _useState20 = _slicedToArray(_useState19, 2), - search = _useState20[0], - setSearch = _useState20[1]; - var _useState21 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]), - _useState22 = _slicedToArray(_useState21, 2), - suggestions = _useState22[0], - setSuggestions = _useState22[1]; - var _useState23 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(_constants_filters__WEBPACK_IMPORTED_MODULE_5__.FILTERS[activeProvider].filters), - _useState24 = _slicedToArray(_useState23, 2), - filterOptions = _useState24[0], - setFilterOptions = _useState24[1]; - var _useState25 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}), - _useState26 = _slicedToArray(_useState25, 2), - filters = _useState26[0], - setFilters = _useState26[1]; - var _useState27 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}), - _useState28 = _slicedToArray(_useState27, 2), - searchFilters = _useState28[0], - setSearchFilters = _useState28[1]; - - // Refs. - var _useInView = (0,react_intersection_observer__WEBPACK_IMPORTED_MODULE_26__.useInView)({ - rootMargin: '0px 0px' - }), - _useInView2 = _slicedToArray(_useInView, 2), - loadMoreRef = _useInView2[0], - inView = _useInView2[1]; - var photosRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var searchInputRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var msnryRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - - // WP Editor props. - var wpBlock = editor === 'block' ? true : false; - var blockSidebar = editor === 'sidebar' ? true : false; - var isBlockEditor = wpBlock || blockSidebar ? true : false; - var mediaModal = editor === 'media-modal' ? true : false; - var body = document.body; - var plugin = isBlockEditor ? container : container.parentNode.parentNode; - var wrapper = isBlockEditor ? container : plugin.querySelector('.instant-images-wrapper'); - - /** - * Get the initial set of photos for the current view (New/Popular/Filters/etc...). - * - * @param {boolean} reset Reset the current view. - * @since 3.0 - */ - function getPhotos() { - return _getPhotos.apply(this, arguments); - } - /** - * Load more photos in infinite scroll style. - * - * @since 3.0 - */ - function _getPhotos() { - _getPhotos = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() { - var _searchInputRef$curre2; - var reset, - params, - url, - sessionData, - response, - status, - headers, - apiResults, - _apiResults$error, - error, - _args = arguments; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - reset = _args.length > 0 && _args[0] !== undefined ? _args[0] : false; - if (!loadingMore) { - _context.next = 3; - break; - } - return _context.abrupt("return", false); - case 3: - if (!(!reset && (searchInputRef === null || searchInputRef === void 0 || (_searchInputRef$curre2 = searchInputRef.current) === null || _searchInputRef$curre2 === void 0 ? void 0 : _searchInputRef$curre2.value) !== '')) { - _context.next = 7; - break; - } - if (!(extended_activated && extended_license)) { - _context.next = 7; - break; - } - doSearch(searchInputRef.current.value); - return _context.abrupt("return"); - case 7: - setLoading(true); // Set loading state. - clearSearch(); // Reset search results. - - resetScrollPosition(); - page = 1; - - // Build URL. - params = (0,_functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__["default"])(activeProvider, filters); - url = (0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__["default"])('photos', params); // Get session storage. - sessionData = (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.getSession)(url); - if (!sessionData) { - _context.next = 18; - break; - } - // Display results from session. - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(sessionData), false, null); - _context.next = 37; - break; - case 18: - _context.next = 20; - return fetch(url); - case 20: - response = _context.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - _context.prev = 23; - _context.next = 26; - return response.json(); - case 26: - apiResults = _context.sent; - _apiResults$error = apiResults.error, error = _apiResults$error === void 0 ? null : _apiResults$error; - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(apiResults), false, error); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.saveSession)(url, apiResults); - _context.next = 37; - break; - case 32: - _context.prev = 32; - _context.t0 = _context["catch"](23); - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__["default"])(provider, status); - setLoading(false); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.deleteSession)(url); - case 37: - // Delay loading animatons for effect. - setTimeout(function () { - setLoading(false); - }, delay); - case 38: - case "end": - return _context.stop(); - } - }, _callee, null, [[23, 32]]); - })); - return _getPhotos.apply(this, arguments); - } - function loadMorePhotos() { - return _loadMorePhotos.apply(this, arguments); - } - /** - * Perform a photo search. - * - * @param {string} term Search term. - * @since 3.0 - */ - function _loadMorePhotos() { - _loadMorePhotos = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { - var searchQuery, type, activeFilters, loadmoreParams, params, url, sessionData, response, status, headers, apiResults, _apiResults$error2, error; - return _regeneratorRuntime().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - if (!(!mounted || loading || loadingMore || done)) { - _context2.next = 2; - break; - } - return _context2.abrupt("return"); - case 2: - setLoadingMore(true); - page = parseInt(page) + 1; - - // Get search query. - searchQuery = search !== null && search !== void 0 && search.active && search !== null && search !== void 0 && search.term ? { - term: search.term - } : {}; // Build URL. - type = search !== null && search !== void 0 && search.active ? 'search' : 'photos'; - activeFilters = search !== null && search !== void 0 && search.active ? searchFilters : filters; - loadmoreParams = _objectSpread(_objectSpread(_objectSpread({}, { - page: page - }), searchQuery), activeFilters); - params = (0,_functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__["default"])(activeProvider, loadmoreParams); - url = (0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__["default"])(type, params); // Get session storage. - sessionData = (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.getSession)(url); - if (!sessionData) { - _context2.next = 15; - break; - } - // Display results from session. - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(sessionData), true, null); - _context2.next = 34; - break; - case 15: - _context2.next = 17; - return fetch(url); - case 17: - response = _context2.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - _context2.prev = 20; - _context2.next = 23; - return response.json(); - case 23: - apiResults = _context2.sent; - _apiResults$error2 = apiResults.error, error = _apiResults$error2 === void 0 ? null : _apiResults$error2; - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(apiResults), true, error); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.saveSession)(url, apiResults); - _context2.next = 34; - break; - case 29: - _context2.prev = 29; - _context2.t0 = _context2["catch"](20); - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__["default"])(provider, status); - setLoadingMore(false); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.deleteSession)(url); - case 34: - case "end": - return _context2.stop(); - } - }, _callee2, null, [[20, 29]]); - })); - return _loadMorePhotos.apply(this, arguments); - } - function doSearch(_x) { - return _doSearch.apply(this, arguments); - } - /** - * Handle the display results. - * - * @param {Array} images Image array. - * @param {boolean} append Append images to existing results display. - * @param {string|null} error Error message. - */ - function _doSearch() { - _doSearch = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(term) { - var searchType, searchQuery, searchParams, params, url, sessionData, response, status, headers, apiResults, _apiResults$error3, error; - return _regeneratorRuntime().wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - setLoading(true); - resetScrollPosition(); - page = 1; // Reset current page num. - searchType = term.substring(0, 3) === 'id:' ? 'id' : 'term'; // Get search query. - searchQuery = searchType === 'id' ? { - id: term.replace('id:', '').replace(/\s+/, '') - } : { - term: term - }; // Build URL. - searchParams = _objectSpread(_objectSpread(_objectSpread({}, { - page: page - }), searchQuery), searchFilters); - params = (0,_functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__["default"])(activeProvider, searchParams); - url = (0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__["default"])('search', params); // Get session storage. - sessionData = (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.getSession)(url); - if (!sessionData) { - _context3.next = 14; - break; - } - // Display results from session. - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(sessionData), false, null); - setSearch({ - active: true, - term: term, - type: searchType, - results: (0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__.getSearchTotal)(sessionData) - }); - _context3.next = 35; - break; - case 14: - _context3.next = 16; - return fetch(url); - case 16: - response = _context3.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - _context3.prev = 19; - _context3.next = 22; - return response.json(); - case 22: - apiResults = _context3.sent; - _apiResults$error3 = apiResults.error, error = _apiResults$error3 === void 0 ? null : _apiResults$error3; - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(apiResults), false, error); - setSearch({ - active: true, - term: term, - type: searchType, - results: (0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__.getSearchTotal)(apiResults) - }); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.saveSession)(url, apiResults); - _context3.next = 35; - break; - case 29: - _context3.prev = 29; - _context3.t0 = _context3["catch"](19); - // Reset all search parameters. - setDone(true); - setLoading(false); - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__["default"])(provider, status); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.deleteSession)(url); - case 35: - searchInputRef.current.classList.remove(searchClass); - case 36: - case "end": - return _context3.stop(); - } - }, _callee3, null, [[19, 29]]); - })); - return _doSearch.apply(this, arguments); - } - function displayResults() { - var images = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - var append = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - var error = arguments.length > 2 ? arguments[2] : undefined; - checkResults(images === null || images === void 0 ? void 0 : images.length); - if (append) { - setResults(function (prevState) { - return [].concat(_toConsumableArray(prevState), _toConsumableArray(images)); - }); // Load more. - } else { - setResults(images); // Standard switch. - } - setAPIError(error); - } - - /** - * Handle the Photo Search. - * - * @param {Event} event The dispatched submit event. - * @since 3.0 - */ - function searchHandler(event) { - event.preventDefault(); - var term = searchInputRef.current.value; - if (term.length > 2) { - searchInputRef.current.classList.add(searchClass); - doSearch(term); - } else { - searchInputRef.current.focus(); - } - } - - /** - * Reset search results, settings and results view. - * - * @since 3.0 - */ - function clearSearch() { - var _searchInputRef$curre; - var term = (searchInputRef === null || searchInputRef === void 0 || (_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 ? void 0 : _searchInputRef$curre.value) || ''; - if (term) { - searchInputRef.current.value = ''; - } - setSearch(searchDefaults); - setSuggestions([]); - } - - /** - * Filter the photo listing. - * - * @param {string} filter The current filter key. - * @param {string} value The value to filter. - */ - function filterPhotos(filter, value) { - var newFilters = _objectSpread({}, filters); - if (newFilters[filter] && value === '#' || value === '' || value === 'all') { - delete newFilters[filter]; - } else { - newFilters[filter] = value; - } - setFilters(_objectSpread({}, newFilters)); - } - - /** - * Filter the search results. - * - * @param {string} filter The current filter key. - * @param {string} value The value to filter. - */ - function filterSearch(filter, value) { - var newSearchFilters = _objectSpread({}, searchFilters); - if (newSearchFilters[filter] && value === '#' || value === '' || value === 'all') { - delete newSearchFilters[filter]; - } else { - newSearchFilters[filter] = value; - } - setSearchFilters(_objectSpread({}, newSearchFilters)); - } - - /** - * Close the API Lightbox. - * - * @param {string} target The target provider to close the lightbox for. - * @since 4.5 - */ - function closeAPILightbox() { - var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - if (target) { - setActiveProvider(target); - } - setShowAPILightbox(false); - setLoading(false); - setAPIError(false); - body.classList.remove('overflow-hidden'); - } - - /** - * Switch API providers. - * - * @param {string} newProvider The provider to switch to. - * @since 4.5 - */ - function switchProvider(_x2) { - return _switchProvider.apply(this, arguments); - } - /** - * Get autocomplete search suggestions. - * - * @param {string} term The search term. - * @return {Array} The autocomplete suggestions. - */ - function _switchProvider() { - _switchProvider = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(newProvider) { - var response, status, headers; - return _regeneratorRuntime().wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - if (!(activeProvider === newProvider)) { - _context4.next = 2; - break; - } - return _context4.abrupt("return"); - case 2: - setLoading(true); - setAPIError(false); - setShowAPILightbox(false); - body.classList.remove('overflow-hidden'); - - // API verification - check API key for provider. - if (!(_constants_API__WEBPACK_IMPORTED_MODULE_4__.API[newProvider].requires_key && !apiTested.includes(newProvider))) { - _context4.next = 27; - break; - } - _context4.prev = 7; - _context4.next = 10; - return fetch((0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__.buildTestURL)(newProvider)); - case 10: - response = _context4.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - if (!(status !== 200)) { - _context4.next = 18; - break; - } - // Catch API errors and 401s. - setShowAPILightbox(newProvider); // Show API Lightbox. - setAPIError(true); - body.classList.add('overflow-hidden'); - return _context4.abrupt("return"); - case 18: - if (status === 200) { - // Valid API key - Add to array of tested providers. - setAPITested(function (prevState) { - return [].concat(_toConsumableArray(prevState), [newProvider]); - }); - } - _context4.next = 27; - break; - case 21: - _context4.prev = 21; - _context4.t0 = _context4["catch"](7); - // Catch all other errors. - setShowAPILightbox(newProvider); // Show API Lightbox. - body.classList.add('overflow-hidden'); - setAPIError(true); - return _context4.abrupt("return"); - case 27: - // Add slight delay for loading effect. - setTimeout(function () { - setFilterOptions(_constants_filters__WEBPACK_IMPORTED_MODULE_5__.FILTERS[newProvider].filters); // Update filter options. - setActiveProvider(newProvider); // Switch the provider. - }, delay); - case 28: - case "end": - return _context4.stop(); - } - }, _callee4, null, [[7, 21]]); - })); - return _switchProvider.apply(this, arguments); - } - function getSuggestions(_x3) { - return _getSuggestions.apply(this, arguments); - } - /** - * Renders the Masonry layout. - * - * @since 3.0 - */ - function _getSuggestions() { - _getSuggestions = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(term) { - var api_url; - return _regeneratorRuntime().wrap(function _callee5$(_context5) { - while (1) switch (_context5.prev = _context5.next) { - case 0: - if (!(!term || (term === null || term === void 0 ? void 0 : term.length) < 3)) { - _context5.next = 2; - break; - } - return _context5.abrupt("return"); - case 2: - // API endpoint URL. - api_url = instant_img_localize.root + "instant-images-extended/suggestions/?term=".concat(term); // Get suggestions. - _context5.next = 5; - return axios__WEBPACK_IMPORTED_MODULE_27__["default"].get(api_url).then(function (res) { - setSuggestions(res.data); - })["catch"](function (error) { - console.warn(error); - }); - case 5: - case "end": - return _context5.stop(); - } - }, _callee5); - })); - return _getSuggestions.apply(this, arguments); - } - function renderLayout() { - imagesLoaded(photosRef.current, function () { - if (!isBlockEditor) { - msnryRef.current = new (masonry_layout__WEBPACK_IMPORTED_MODULE_2___default())(photosRef.current, { - itemSelector: '.photo' - }); - photosRef.current.querySelectorAll('.photo').forEach(function (el) { - el.classList.add('in-view'); - }); - } - setTimeout(function () { - // Delay to allow for rendering and set up. - setLoading(false); - setLoadingMore(false); - if (!mounted) { - setMounted(true); - } - }, delay); - }); - } - - /** - * Reset the scroll position for the WP block only. - */ - function resetScrollPosition() { - if (wpBlock && photosRef !== null && photosRef !== void 0 && photosRef.current) { - photosRef === null || photosRef === void 0 || photosRef.current.scroll({ - top: 0, - left: 0, - behavior: 'smooth' - }); - } - } - - /** - * A checker to determine if there are remaining search results. - * - * @param {number} num Total search results. - * @since 3.0 - */ - function checkResults(num) { - setDone(parseInt(num) === 0 || num === undefined); - } - - /** - * Escape handler to close edit windows on photos. - * - * @param {Event} e The key event. - */ - function escFunction(e) { - var key = e.key; - if (key === 'Escape') { - var editing = photosRef.current.querySelectorAll('.edit-screen.editing'); - if (editing) { - _toConsumableArray(editing).forEach(function (element) { - element === null || element === void 0 || element.classList.remove('editing'); - }); - } - } - } - - /* Search callback. */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (!(search !== null && search !== void 0 && search.active)) { - // Reset search filters when search is false. - setSearchFilters({}); - } - }, [search]); // eslint-disable-line react-hooks/exhaustive-deps - - /* Search filters change callback. */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (mounted && search !== null && search !== void 0 && search.active) { - doSearch(search === null || search === void 0 ? void 0 : search.term); - } - }, [searchFilters]); // eslint-disable-line react-hooks/exhaustive-deps - - // Filters change callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (mounted) { - getPhotos(); - } - }, [filters]); // eslint-disable-line react-hooks/exhaustive-deps - - // Provider change callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - setFilterOptions(_constants_filters__WEBPACK_IMPORTED_MODULE_5__.FILTERS[activeProvider].filters); - setFilters({}); // Trigger filter change. - }, [activeProvider]); // eslint-disable-line react-hooks/exhaustive-deps - - // Scroll in-view callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - // Infinite scrolling. - loadMorePhotos(); - }, [inView]); // eslint-disable-line react-hooks/exhaustive-deps - - // Results callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - renderLayout(); - }, [results]); // eslint-disable-line react-hooks/exhaustive-deps - - // Initial page load. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - setLoading(false); - wrapper.classList.add('loaded'); - - // Block editor, get initial set of photos. - if (isBlockEditor) { - getPhotos(); - } - // Add global escape listener. - document.addEventListener('keydown', escFunction, false); - return function () { - document.removeEventListener('keydown', escFunction, false); - }; - }, []); // eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement(_common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__.PluginProvider, { - value: { - provider: activeProvider, - wpBlock: wpBlock, - mediaModal: mediaModal, - blockSidebar: blockSidebar, - clientId: clientId, - search: search, - apiError: apiError, - getPhotos: getPhotos, - searchHandler: searchHandler, - filterSearch: filterSearch, - suggestions: suggestions, - getSuggestions: getSuggestions - } - }, wpBlock ? /*#__PURE__*/React.createElement(_editor_block_components_Header__WEBPACK_IMPORTED_MODULE_6__["default"], { - switchProvider: switchProvider - }) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_ProviderNav__WEBPACK_IMPORTED_MODULE_18__["default"], { - switchProvider: switchProvider - }), /*#__PURE__*/React.createElement(_cta_Extended__WEBPACK_IMPORTED_MODULE_23__.ExtendedCTA, null)), /*#__PURE__*/React.createElement(_RestAPIError__WEBPACK_IMPORTED_MODULE_19__["default"], null), /*#__PURE__*/React.createElement("div", { - className: "control-nav" - }, /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('control-nav--filters-wrap', apiError || search !== null && search !== void 0 && search.active ? 'inactive' : null) - }, filterOptions && (_Object$entries = Object.entries(filterOptions)) !== null && _Object$entries !== void 0 && _Object$entries.length ? /*#__PURE__*/React.createElement("div", { - className: "control-nav--filters" - }, Object.entries(filterOptions).map(function (_ref, index) { - var _ref2 = _slicedToArray(_ref, 2), - key = _ref2[0], - filter = _ref2[1]; - return /*#__PURE__*/React.createElement(_Filter__WEBPACK_IMPORTED_MODULE_15__["default"], { - key: "".concat(activeProvider, "-").concat(index, "-").concat(key), - data: filter, - filterKey: key, - handler: filterPhotos - }); - })) : null), /*#__PURE__*/React.createElement(_search_SearchForm__WEBPACK_IMPORTED_MODULE_24__["default"], { - ref: searchInputRef - })), /*#__PURE__*/React.createElement("div", { - id: "photo-listing", - className: loading ? 'loading' : null - }, /*#__PURE__*/React.createElement(_search_SearchHeader__WEBPACK_IMPORTED_MODULE_25__["default"], null), wpBlock ? /*#__PURE__*/React.createElement(_ResultsWPBlock__WEBPACK_IMPORTED_MODULE_21__["default"], { - ref: photosRef, - data: results, - done: done, - loadMorePhotos: loadMorePhotos - }) : /*#__PURE__*/React.createElement(_Results__WEBPACK_IMPORTED_MODULE_20__["default"], { - ref: photosRef, - data: results - }), /*#__PURE__*/React.createElement(_NoResults__WEBPACK_IMPORTED_MODULE_17__["default"], { - total: search === null || search === void 0 ? void 0 : search.results, - is_search: search === null || search === void 0 ? void 0 : search.active - }), /*#__PURE__*/React.createElement(_LoadMore__WEBPACK_IMPORTED_MODULE_16__["default"], { - ref: loadMoreRef, - loadMorePhotos: loadMorePhotos, - loading: loadingMore, - done: done - }), /*#__PURE__*/React.createElement(_APILightbox__WEBPACK_IMPORTED_MODULE_13__["default"], { - provider: showAPILightbox, - callback: closeAPILightbox - }), /*#__PURE__*/React.createElement(_ErrorLightbox__WEBPACK_IMPORTED_MODULE_14__["default"], null), /*#__PURE__*/React.createElement(_Tooltip__WEBPACK_IMPORTED_MODULE_22__["default"], null)))); -} - -/***/ }), - -/***/ "./src/js/components/LoadMore.js": -/*!***************************************!*\ - !*** ./src/js/components/LoadMore.js ***! - \***************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); - - - - -/** - * Render the LoadMore component. - * - * @return {JSX.Element} The LoadMore component. - */ -var LoadMore = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var loadMorePhotos = props.loadMorePhotos, - loading = props.loading, - done = props.done; - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('load-more-wrap', loading ? 'loading' : null, done ? 'done' : null), - ref: ref - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button", - onClick: function onClick() { - return loadMorePhotos(); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Load More Images', 'instant-images'))); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LoadMore); - -/***/ }), - -/***/ "./src/js/components/NoResults.js": -/*!****************************************!*\ - !*** ./src/js/components/NoResults.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ NoResults) -/* harmony export */ }); -/** - * Render the NoResults component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The NoResults component. - */ -function NoResults(props) { - var _props$total = props.total, - total = _props$total === void 0 ? 0 : _props$total, - _props$is_search = props.is_search, - is_search = _props$is_search === void 0 ? false : _props$is_search; - if (!is_search || is_search && total >= 1) { - // Bail if not search or search total is greater than 1. - return null; - } - return /*#__PURE__*/React.createElement("div", { - className: "instant-images-no-results" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", null, instant_img_localize.no_results, " "), /*#__PURE__*/React.createElement("p", null, instant_img_localize.no_results_desc, " "))); -} - -/***/ }), - -/***/ "./src/js/components/Photo.js": -/*!************************************!*\ - !*** ./src/js/components/Photo.js ***! - \************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Photo) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _editor_utils_insertImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../editor/utils/insertImage */ "./src/js/editor/utils/insertImage.js"); -/* harmony import */ var _editor_utils_setFeaturedImage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../editor/utils/setFeaturedImage */ "./src/js/editor/utils/setFeaturedImage.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _functions_providers_unsplash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../functions/providers/unsplash */ "./src/js/functions/providers/unsplash.js"); -/* harmony import */ var _functions_generateAttribution__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../functions/generateAttribution */ "./src/js/functions/generateAttribution.js"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - - - - -/** - * Render the Photo component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The Photo component. - */ -function Photo(props) { - var result = props.result, - setInactive = props.setInactive; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider, - _usePluginContext$wpB = _usePluginContext.wpBlock, - wpBlock = _usePluginContext$wpB === void 0 ? false : _usePluginContext$wpB, - _usePluginContext$med = _usePluginContext.mediaModal, - mediaModal = _usePluginContext$med === void 0 ? false : _usePluginContext$med, - _usePluginContext$blo = _usePluginContext.blockSidebar, - blockSidebar = _usePluginContext$blo === void 0 ? false : _usePluginContext$blo, - clientId = _usePluginContext.clientId; - var id = result.id, - filename = result.id, - permalink = result.permalink, - title = result.title, - alt = result.alt, - caption = result.caption, - attribution = result.attribution, - _result$extension = result.extension, - extension = _result$extension === void 0 ? 'jpg' : _result$extension, - likes = result.likes, - dimensions = result.dimensions, - urls = result.urls, - user = result.user; - - // Deconstruct image URLs. - var thumb = urls.thumb, - full = urls.full, - download_url = urls.download_url; - - // Deconstruct user data. - var user_name = user.name, - user_photo = user.photo, - user_url = user.url; - var container = document.querySelector('.instant-img-container'); - var likeDisplay = parseInt(likes) === 1 ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Like', 'instant-images') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Likes', 'instant-images'); - var _instant_img_localize = instant_img_localize, - _instant_img_localize2 = _instant_img_localize.attribution_hook, - attribution_hook = _instant_img_localize2 === void 0 ? false : _instant_img_localize2, - _instant_img_localize3 = _instant_img_localize.auto_attribution, - auto_attribution = _instant_img_localize3 === void 0 ? false : _instant_img_localize3; - - // Get the attribution text. - var imageAttribution = attribution_hook ? (0,_functions_generateAttribution__WEBPACK_IMPORTED_MODULE_7__["default"])(attribution_hook, provider, permalink, user) : attribution; - var imageCaption = auto_attribution === '1' ? imageAttribution : caption; - - // Photo state. - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ - filename: filename, - title: title, - alt: alt, - caption: imageCaption - }), - _useState2 = _slicedToArray(_useState, 2), - imageDetails = _useState2[0], - setImageDetails = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState4 = _slicedToArray(_useState3, 2), - inProgress = _useState4[0], - setInProgress = _useState4[1]; // inProgress state. - var _useState5 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('loaded'), - _useState6 = _slicedToArray(_useState5, 2), - status = _useState6[0], - setStatus = _useState6[1]; // Status state. - var _useState7 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(''), - _useState8 = _slicedToArray(_useState7, 2), - editURL = _useState8[0], - setEditURL = _useState8[1]; // Edit URL state. - - // Refs. - var photo = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var image = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var upload = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var editScreen = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var captionRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - - // Gutenberg. - var setAsFeaturedImage = false; - var insertIntoPost = false; - - /** - * Function to trigger the image download. - * - * @since 4.3 - */ - function download() { - if (inProgress || status === 'success' || status === 'uploaded') { - return false; // Exit if uploading, uploaded or success. - } - var target = upload === null || upload === void 0 ? void 0 : upload.current; - setInProgress(true); - setStatus('uploading'); - if (wpBlock) { - setInactive(true); // Make Instant Images inactive after selecting an image. - } - - // API URL - var api = instant_img_localize.root + 'instant-images/download/'; - - // Data Params - var data = { - provider: provider, - id: target.getAttribute('data-id'), - image_url: target.getAttribute('data-url'), - filename: target.getAttribute('data-id'), - extension: extension, - custom_filename: target.getAttribute('data-filename'), - title: target.getAttribute('data-title'), - alt: target.getAttribute('data-alt'), - caption: target.getAttribute('data-caption'), - parent_id: instant_img_localize.parent_id, - lang: instant_img_localize.lang - }; - - // Config Params - var config = { - credentials: 'same-origin', - headers: { - 'X-WP-Nonce': instant_img_localize.nonce, - 'Content-Type': 'application/json' - } - }; - axios__WEBPACK_IMPORTED_MODULE_9__["default"].post(api, JSON.stringify(data), config).then(function (res) { - var response = res.data; - if (response) { - // Successful response from server - var success = response.success; - var attachment = response.attachment; - var admin_url = response.admin_url; - var msg = response.msg; - if (success) { - var edit_url = "".concat(admin_url, "post.php?post=").concat(attachment.id, "&action=edit"); // Edit URL. - setEditURL(edit_url); - uploadComplete(target, msg, attachment.id); // Success/Upload Complete - - // Trigger a download at Unsplash. - if (provider === 'unsplash' && download_url) { - (0,_functions_providers_unsplash__WEBPACK_IMPORTED_MODULE_6__.unsplashDownload)(download_url); - } - - /** - * Gutenberg options. - */ - - // Set Featured Image via Sidebar. - if (blockSidebar && setAsFeaturedImage) { - (0,_editor_utils_setFeaturedImage__WEBPACK_IMPORTED_MODULE_4__["default"])(attachment); - setAsFeaturedImage = false; - closeMediaModal(); - } - - // Insert Image via Sidebar. - if (blockSidebar && insertIntoPost) { - setTimeout(function () { - // Delay for effect. - (0,_editor_utils_insertImage__WEBPACK_IMPORTED_MODULE_3__["default"])(attachment); - }, 250); - closeMediaModal(); - insertIntoPost = false; - } - - // Insert Image via WP Block. - if (wpBlock && clientId) { - setStatus('uploaded'); - setTimeout(function () { - // Delay for effect. - (0,_editor_utils_insertImage__WEBPACK_IMPORTED_MODULE_3__["default"])(attachment, clientId); - }, 350); - closeMediaModal(); - insertIntoPost = false; - } - - /** - * Media Modal. - * If is media popup, redirect user to media-upload settings. - */ - if (container.dataset.mediaPopup === 'true' && !blockSidebar) { - window.location = 'media-upload.php?type=image&tab=library&attachment_id=' + attachment.id; - } - } else { - // Error - uploadError(target, msg); - } - } else { - // Error - uploadError(target, instant_img_localize.error_upload); - } - })["catch"](function (error) { - console.warn(error); - }); - } - - /** - * Upload complete function. - * - * @param {Element} target Clicked item. - * @param {string} msg Success Msg. - * @param {string} imageID Attachment id. - * @since 3.0 - */ - function uploadComplete(target, msg, imageID) { - if (!(photo !== null && photo !== void 0 && photo.current)) { - return; - } - setImageTitle(target, msg); - setStatus('uploaded'); - setInProgress(false); - - // Remove uploaded status after 3.5 seconds. - setTimeout(function () { - setStatus('success'); - }, 3500); - - // Refresh Media Router/Modal. - refreshMediaModal(imageID); - } - - /** - * Handler to send user to edit photo link after upload. - * - * @since 5.2.0 - */ - function editAfterUpload() { - if (editURL) { - window.location = editURL; - } - } - - /** - * Function used to trigger a download and then set as featured image - * - * @param {Element} e The clicked element. - * @since 4.0 - */ - function setFeaturedImageClick(e) { - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - if (upload.current) { - setAsFeaturedImage = true; - upload.current.click(); - } - } - - /** - * Function used to insert an image directly into the block (Gutenberg) editor. - * - * @param {Element} e The clicked element. - * @since 4.0 - */ - function insertImageIntoPost(e) { - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - if (upload.current) { - insertIntoPost = true; - upload.current.click(); - } - } - - /** - * Refresh Media Modal and select item after it's been uploaded. - * - * @param {string} modalID The media modal ID. - * @since 4.3 - */ - function refreshMediaModal(modalID) { - if (mediaModal && wp.media && wp.media.frame && wp.media.frame.el) { - var mediaModalEl = wp.media.frame.el; - var mediaTab = mediaModalEl.querySelector('#menu-item-browse'); - if (mediaTab) { - // Open the 'Media Library' tab. - mediaTab.click(); - } - - // Delay to allow for tab switching - setTimeout(function () { - if (wp.media.frame.content.get() !== null) { - // Force a refresh of the mdeia modal content. - wp.media.frame.content.get().collection._requery(true); - } - - // Select the attached that was just uploaded. - var selection = wp.media.frame.state().get('selection'); - var selected = parseInt(modalID); - selection.reset(selected ? [wp.media.attachment(selected)] : []); - }, 100); - } - } - - /** - * Function runs when error occurs on upload or resize. - * - * @param {Element} target Current clicked item. - * @param {string} msg Error Msg. - * @since 3.0 - */ - function uploadError(target, msg) { - setImageTitle(target, msg); - setInProgress(false); - setStatus('error'); - setInactive(false); - console.warn(msg); - } - - /** - * Set the title attribute of target. - * - * @param {Element} target Clicked element. - * @param {string} msg Title message from JSON. - * @since 3.0 - */ - function setImageTitle(target, msg) { - target.setAttribute('title', msg); // Remove 'Click to upload...', set new value - } - - /** - * Displays the edit screen. - * - * @param {Element} e The target element. - * @since 3.2 - */ - function showEditScreen(e) { - e.preventDefault(); - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - - // Get all open edit screens and close them. - var openEdits = document.querySelectorAll('.edit-screen.editing'); - if (openEdits) { - openEdits.forEach(function (edit) { - edit.classList.remove('editing'); - }); - } - - // Show edit screen - editScreen.current.classList.add('editing'); - - // Set focus on edit screen - setTimeout(function () { - editScreen.current.focus({ - preventScroll: true - }); - }, 150); - } - - /** - * Handles the change event for the edit screen. - * - * @param {Element} e The target element. - * @since 3.2 - */ - function handleEditChange(e) { - var target = e.target.name; - switch (target) { - case 'filename': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - filename: e.target.value - })); - break; - case 'title': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - title: e.target.value - })); - break; - case 'alt': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - alt: e.target.value - })); - break; - case 'caption': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - caption: e.target.value - })); - break; - } - } - - /** - * Handles the Upload event from the edit screen. - * - * @since 3.2 - */ - function uploadNow() { - editScreen.current.classList.remove('editing'); // Hide edit screen. - upload.current.click(); // Trigger click. - } - - /** - * Cancel event for the edit screen. - * - * @since 3.2 - */ - function cancelEdit() { - // Reset image state. - setImageDetails({ - filename: filename, - title: title, - alt: alt, - caption: imageCaption - }); - - // Hide edit screen - editScreen.current.classList.remove('editing'); - - // Set focus back on photo. - upload.current.focus({ - preventScrol: true - }); - } - - /** - * Close the media modal after an action. - * - * @since 4.3 - */ - function closeMediaModal() { - var mediaModalEl = document.querySelector('.media-modal'); - if (mediaModalEl) { - var closeBtn = mediaModalEl.querySelector('button.media-modal-close'); - if (!closeBtn) { - return false; - } - closeBtn.click(); - } - } - - /** - * Handles adding attribution for images. - * - * @param {Element} e The target element. - * @since 4.5 - */ - function addAttribution(e) { - e.preventDefault(); - captionRef.current.value = imageAttribution; // Set form value. - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - caption: imageAttribution - })); // Set caption state. - } - - /** - * Show a GIF preview image. - * Giphy only. - * - * @param {boolean} show Show a preview. - */ - function showPreview(show) { - if (!provider === 'giphy') { - return; - } - if (show) { - image.current.src = full; - } else { - image.current.src = thumb; - } - } - return /*#__PURE__*/React.createElement("article", { - className: "photo", - ref: photo - }, /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('photo-wrap', "photo-".concat(status)) - }, /*#__PURE__*/React.createElement("div", { - className: "img-wrap" - }, /*#__PURE__*/React.createElement("button", { - className: "photo-upload", - ref: upload, - "data-id": id, - "data-url": full, - "data-filename": imageDetails.filename, - "data-title": imageDetails.title, - "data-alt": imageDetails.alt, - "data-caption": imageDetails.caption, - "aria-label": wpBlock ? instant_img_localize.insert_into_post : instant_img_localize.upload, - onClick: function onClick() { - return download(); - }, - onMouseEnter: function onMouseEnter() { - return showPreview(true); - }, - onMouseLeave: function onMouseLeave() { - return showPreview(false); - } - }, /*#__PURE__*/React.createElement("img", { - src: thumb, - alt: alt, - className: status, - ref: image - })), /*#__PURE__*/React.createElement("div", { - className: "photo-controls" - }, /*#__PURE__*/React.createElement("a", { - target: "_blank", - className: "user fade", - href: user_url, - rel: "noopener noreferrer", - title: "".concat(instant_img_localize.view_all, " @ ").concat(user_name) - }, /*#__PURE__*/React.createElement("div", { - className: "user-wrap" - }, (user_photo === null || user_photo === void 0 ? void 0 : user_photo.length) > 0 && /*#__PURE__*/React.createElement("img", { - className: "user-wrap--photo", - src: user_photo, - alt: "" - }), user_name)), /*#__PURE__*/React.createElement("div", { - className: "photo-options" - }, blockSidebar && !editURL ? /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "set-featured fade", - "data-title": instant_img_localize.set_as_featured, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - onClick: function onClick(e) { - return setFeaturedImageClick(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-picture-o", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.set_as_featured)), /*#__PURE__*/React.createElement("button", { - type: "button", - className: "insert fade", - "data-title": instant_img_localize.insert_into_post, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - onClick: function onClick(e) { - return insertImageIntoPost(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-plus", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.insert_into_post))) : null, !!wpBlock && /*#__PURE__*/React.createElement("button", { - type: "button", - className: "insert fade", - "data-title": instant_img_localize.insert_into_post, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - onClick: function onClick(e) { - return insertImageIntoPost(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-plus", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.insert_into_post)), editURL ? /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return editAfterUpload(); - }, - className: "edit-photo-admin fade", - "data-title": instant_img_localize.edit_upload, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-pencil", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.edit_upload)) : /*#__PURE__*/React.createElement("button", { - onClick: function onClick(e) { - return showEditScreen(e); - }, - className: "edit-photo fade", - "data-title": instant_img_localize.edit_details, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-cog", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.edit_details)))), /*#__PURE__*/React.createElement("div", { - className: "photo-meta" - }, likes ? /*#__PURE__*/React.createElement("span", { - className: "likes tooltip--above", - "data-title": likes + ' ' + likeDisplay, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-heart heart-like", - "aria-hidden": "true" - }), " ", likes) : null, /*#__PURE__*/React.createElement("a", { - className: "tooltip--above", - href: permalink, - "data-title": "".concat(instant_img_localize.open_external, " ").concat((0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.capitalizeFirstLetter)(provider)), - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - rel: "noopener noreferrer", - target: "_blank" - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-external-link", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, "".concat(instant_img_localize.open_external, " ").concat((0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.capitalizeFirstLetter)(provider)))))), /*#__PURE__*/React.createElement("div", { - className: "edit-screen", - tabIndex: "0", - ref: editScreen - }, /*#__PURE__*/React.createElement("div", { - className: "edit-screen--title" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", { - className: "heading" - }, instant_img_localize.edit_details), dimensions && dimensions.length > 0 && /*#__PURE__*/React.createElement("p", { - className: "dimensions" - }, dimensions)), /*#__PURE__*/React.createElement("div", { - className: "preview", - style: { - backgroundImage: "url(".concat(thumb, ")") - } - })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_filename, ":"), /*#__PURE__*/React.createElement("input", { - type: "text", - name: "filename", - "data-original": filename, - placeholder: imageDetails.filename, - value: imageDetails.filename, - onChange: function onChange(e) { - return handleEditChange(e); - } - }), /*#__PURE__*/React.createElement("em", null, ".", extension)), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_title, ":"), /*#__PURE__*/React.createElement("input", { - type: "text", - name: "title", - "data-original": title, - placeholder: title, - value: imageDetails.title || '', - onChange: function onChange(e) { - return handleEditChange(e); - } - })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_alt, ":"), /*#__PURE__*/React.createElement("input", { - type: "text", - name: "alt", - "data-original": alt, - value: imageDetails.alt || '', - onChange: function onChange(e) { - return handleEditChange(e); - } - })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_caption, ":"), /*#__PURE__*/React.createElement("textarea", { - rows: "4", - name: "caption", - "data-original": imageCaption, - onChange: function onChange(e) { - return handleEditChange(e); - }, - value: imageDetails.caption || '', - ref: captionRef - })), imageAttribution ? /*#__PURE__*/React.createElement("div", { - className: "add-attribution-row" - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick(e) { - return addAttribution(e); - }, - type: "button" - }, instant_img_localize.attribution)) : null, /*#__PURE__*/React.createElement("div", { - className: "edit-screen--controls" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button button-secondary", - onClick: function onClick(e) { - return cancelEdit(e); - } - }, instant_img_localize.cancel), ' ', "\xA0", /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button button-primary", - onClick: function onClick() { - return uploadNow(); - } - }, wpBlock ? instant_img_localize.insert_into_post : instant_img_localize.upload_now))), /*#__PURE__*/React.createElement("div", { - className: "photo-status" - }))); -} - -/***/ }), - -/***/ "./src/js/components/ProviderIcons.js": -/*!********************************************!*\ - !*** ./src/js/components/ProviderIcons.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ GiphyIcon: () => (/* binding */ GiphyIcon), -/* harmony export */ OpenverseIcon: () => (/* binding */ OpenverseIcon), -/* harmony export */ PexelsIcon: () => (/* binding */ PexelsIcon), -/* harmony export */ PixabayIcon: () => (/* binding */ PixabayIcon), -/* harmony export */ UnsplashIcon: () => (/* binding */ UnsplashIcon), -/* harmony export */ getProviderIcon: () => (/* binding */ getProviderIcon) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); - - -/** - * Return the provider icon. - * - * @param {string} provider The provider. - * @return {JSX.Element} The provider icon. - */ -function getProviderIcon(provider) { - if (!provider) { - return null; - } - return _constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider.toLowerCase()].icon ? _constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider.toLowerCase()].icon() : null; -} - -/** - * Giphy Icon. - */ -function GiphyIcon() { - return /*#__PURE__*/React.createElement("svg", { - height: "35", - width: "32", - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 32 35" - }, /*#__PURE__*/React.createElement("g", { - fill: "none", - fillRule: "evenodd" - }, /*#__PURE__*/React.createElement("path", { - d: "M4 4h20v27H4z", - fill: "#000" - }), /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", { - d: "M0 3h4v29H0z", - fill: "#04ff8e" - }), /*#__PURE__*/React.createElement("path", { - d: "M24 11h4v21h-4z", - fill: "#8e2eff" - }), /*#__PURE__*/React.createElement("path", { - d: "M0 31h28v4H0z", - fill: "#00c5ff" - }), /*#__PURE__*/React.createElement("path", { - d: "M0 0h16v4H0z", - fill: "#fff152" - }), /*#__PURE__*/React.createElement("path", { - d: "M24 8V4h-4V0h-4v12h12V8", - fill: "#ff5b5b" - }), /*#__PURE__*/React.createElement("path", { - d: "M24 16v-4h4", - fill: "#551c99" - })), /*#__PURE__*/React.createElement("path", { - d: "M16 0v4h-4", - fill: "#999131" - }))); -} - -/** - * Unsplash Icon. - */ -function UnsplashIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32", - height: "32", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("path", { - d: "M10 9V0H22V9H10ZM22 14H32V32H0V14H10V23H22V14Z", - fill: "black" - })); -} - -/** - * Pixabay Icon. - */ -function PixabayIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32", - height: "32", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("g", { - clipPath: "url(#clip0_307_143)" - }, /*#__PURE__*/React.createElement("path", { - d: "M0 0V32H32V0H0Z", - fill: "#48A947" - }), /*#__PURE__*/React.createElement("path", { - d: "M6.83734 22.3147V28C5.93067 28.0427 5.02401 28.032 4.11734 27.9787C4.09601 27.7014 4.06401 27.4667 4.06401 27.2427C4.06401 23.2427 4.05334 19.2534 4.06401 15.2534C4.07467 12.032 5.97334 9.32269 8.85334 8.37335C13.1307 6.95469 17.4507 10.048 17.8453 14.3894C18.144 17.6534 16.4267 20.5547 13.568 21.7814C12.6507 22.176 11.6907 22.304 10.7093 22.304C9.45067 22.3147 8.21334 22.3147 6.83734 22.3147ZM6.84801 19.4454C8.24534 19.4454 9.54667 19.424 10.848 19.4454C13.1627 19.488 14.816 17.76 15.104 15.712C15.424 13.3654 13.7813 11.2107 11.4453 10.88H11.4347C9.25867 10.592 7.06134 12.2774 6.88001 14.528C6.74134 16.128 6.84801 17.728 6.84801 19.4454Z", - fill: "#F9FBF9" - }), /*#__PURE__*/React.createElement("path", { - d: "M25.4827 14.9334L30.656 22.2081H27.3067L23.4667 16.9494C22.0694 18.6881 20.9067 20.4907 19.584 22.2081H16.2454L21.408 14.9334L16.8107 8.04272H20.16L23.4454 12.9494L26.7307 8.04272H30.0694L25.4827 14.9334Z", - fill: "#FAFCFA" - }), /*#__PURE__*/React.createElement("path", { - d: "M6.848 19.4453C6.848 17.7279 6.74134 16.1173 6.86934 14.5386C7.05067 12.2879 9.248 10.6026 11.424 10.8906C13.7707 11.2106 15.4133 13.3653 15.0933 15.7119C14.816 17.7599 13.152 19.4879 10.8373 19.4453C9.54667 19.4239 8.24534 19.4453 6.848 19.4453Z", - fill: "#4AA949" - })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", { - id: "clip0_307_143" - }, /*#__PURE__*/React.createElement("rect", { - width: "32", - height: "32", - fill: "white" - })))); -} - -/** - * Openverse Icon. - */ -function OpenverseIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32", - height: "32", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("path", { - d: "M25.8578 14.32C29.6708 14.32 32.7618 11.1144 32.7618 7.16C32.7618 3.20564 29.6708 0 25.8578 0C22.0448 0 18.9539 3.20564 18.9539 7.16C18.9539 11.1144 22.0448 14.32 25.8578 14.32Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M0.761841 7.16C0.761841 11.1 3.84742 14.32 7.66584 14.32V0C3.84742 0 0.761841 3.2 0.761841 7.16Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M9.85791 7.16C9.85791 11.1 12.9435 14.32 16.7619 14.32V0C12.9628 0 9.85791 3.2 9.85791 7.16Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M25.8578 31.9399C29.6708 31.9399 32.7618 28.7343 32.7618 24.78C32.7618 20.8256 29.6708 17.62 25.8578 17.62C22.0448 17.62 18.9539 20.8256 18.9539 24.78C18.9539 28.7343 22.0448 31.9399 25.8578 31.9399Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M9.85791 24.7801C9.85791 28.72 12.9435 31.9401 16.7619 31.9401V17.64C12.9628 17.64 9.85791 20.84 9.85791 24.7801Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M0.761841 24.84C0.761841 28.8 3.84742 32 7.66584 32V17.7C3.84742 17.7 0.761841 20.9 0.761841 24.84Z", - fill: "#000000" - })); -} - -/** - * Pexels Icon. - */ -function PexelsIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32px", - height: "32px", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("path", { - d: "M2 0h28a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2z", - fill: "#05A081" - }), /*#__PURE__*/React.createElement("path", { - d: "M13 21h3.863v-3.752h1.167a3.124 3.124 0 1 0 0-6.248H13v10zm5.863 2H11V9h7.03a5.124 5.124 0 0 1 .833 10.18V23z", - fill: "#fff" - })); -} - -/***/ }), - -/***/ "./src/js/components/ProviderNav.js": -/*!******************************************!*\ - !*** ./src/js/components/ProviderNav.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ ProviderNav) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _ProviderIcons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ProviderIcons */ "./src/js/components/ProviderIcons.js"); -/* harmony import */ var _img_logos_giphy_powered_png__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../img/logos/giphy-powered.png */ "./src/img/logos/giphy-powered.png"); - - - - - -var providers = _constants_API__WEBPACK_IMPORTED_MODULE_2__.API.providers; - -/** - * Render the ProviderNav component. - * - * @param {Object} props The component props. - * @param {Object} props.switchProvider The function to switch the provider. - * @return {JSX.Element} The ProviderNav component. - */ -function ProviderNav(_ref) { - var switchProvider = _ref.switchProvider; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - provider = _usePluginContext.provider; - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, !!(providers !== null && providers !== void 0 && providers.length) && /*#__PURE__*/React.createElement("nav", { - className: "provider-nav" - }, providers.map(function (item, index) { - return /*#__PURE__*/React.createElement("div", { - key: "provider-".concat(index) - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return switchProvider(item.toLowerCase()); - }, - className: provider === item.toLowerCase() ? 'provider-nav--btn active' : 'provider-nav--btn' - }, (0,_ProviderIcons__WEBPACK_IMPORTED_MODULE_3__.getProviderIcon)(item), /*#__PURE__*/React.createElement("span", null, item), _constants_API__WEBPACK_IMPORTED_MODULE_2__.API[item.toLowerCase()]["new"] && /*#__PURE__*/React.createElement("span", { - className: "provider-nav--new" - }, instant_img_localize["new"]))); - }), provider === 'giphy' ? /*#__PURE__*/React.createElement("div", { - className: "giphy-powered" - }, /*#__PURE__*/React.createElement("a", { - href: "https://giphy.com", - target: "_blank", - rel: "noreferrer" - }, /*#__PURE__*/React.createElement("img", { - src: _img_logos_giphy_powered_png__WEBPACK_IMPORTED_MODULE_4__, - alt: "Powered by Giphy" - }))) : null)); -} - -/***/ }), - -/***/ "./src/js/components/RestAPIError.js": -/*!*******************************************!*\ - !*** ./src/js/components/RestAPIError.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ RestAPIError) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - -/** - * Render the RestAPIError component. - * - * @return {JSX.Element} The RestAPIError component. - */ -function RestAPIError() { - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(true), - _useState2 = _slicedToArray(_useState, 2), - access = _useState2[0], - setAccess = _useState2[1]; - - /** - * Test users access to the REST API endpoint. - * - * @since 3.2 - */ - function test() { - var testURL = instant_img_localize.root + 'instant-images/test/'; - var restAPITest = new XMLHttpRequest(); - restAPITest.open('POST', testURL, true); - restAPITest.setRequestHeader('X-WP-Nonce', instant_img_localize.nonce); - restAPITest.setRequestHeader('Content-Type', 'application/json'); - restAPITest.send(); - restAPITest.onload = function () { - if (restAPITest.status >= 200 && restAPITest.status < 400) { - var response = JSON.parse(restAPITest.response); - var success = response.success; - if (!success) { - setAccess(false); - } - } else { - setAccess(false); - } - }; - restAPITest.onerror = function (errorMsg) { - console.warn(errorMsg); - setAccess(false); - }; - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - test(); - }, []); - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, !access ? /*#__PURE__*/React.createElement("div", { - className: "error-messaging" - }, /*#__PURE__*/React.createElement("strong", null, instant_img_localize.error_restapi), instant_img_localize.error_restapi_desc) : null); -} - -/***/ }), - -/***/ "./src/js/components/Results.js": -/*!**************************************!*\ - !*** ./src/js/components/Results.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _Photo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Photo */ "./src/js/components/Photo.js"); -/* harmony import */ var _Sponsor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Sponsor */ "./src/js/components/Sponsor.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - -/** - * Render the Results component. - * - * @return {JSX.Element} The Results component. - */ -var Results = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var data = props.data; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - inactive = _useState2[0], - setInactive = _useState2[1]; - return /*#__PURE__*/React.createElement("div", { - id: "photos", - className: inactive ? 'inactive' : null, - ref: ref - }, !!(data !== null && data !== void 0 && data.length) && data.map(function (result, index) { - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, { - key: "".concat(result.id, "-").concat(index) - }, (result === null || result === void 0 ? void 0 : result.type) === 'instant-images-ad' ? /*#__PURE__*/React.createElement(_Sponsor__WEBPACK_IMPORTED_MODULE_2__["default"], { - result: result - }) : /*#__PURE__*/React.createElement(_Photo__WEBPACK_IMPORTED_MODULE_1__["default"], { - result: result, - type: result === null || result === void 0 ? void 0 : result.type, - setInactive: setInactive - })); - })); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Results); - -/***/ }), - -/***/ "./src/js/components/ResultsWPBlock.js": -/*!*********************************************!*\ - !*** ./src/js/components/ResultsWPBlock.js ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var react_intersection_observer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-intersection-observer */ "./node_modules/react-intersection-observer/dist/index.mjs"); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _editor_block_components_Instructions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../editor/block/components/Instructions */ "./src/js/editor/block/components/Instructions.js"); -/* harmony import */ var _editor_block_components_LoadMore__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../editor/block/components/LoadMore */ "./src/js/editor/block/components/LoadMore.js"); -/* harmony import */ var _Photo__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Photo */ "./src/js/components/Photo.js"); -/* harmony import */ var _Sponsor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Sponsor */ "./src/js/components/Sponsor.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - -/** - * Render the Results component. - * - * @return {JSX.Element} The Results component. - */ -var ResultsWPBlock = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var data = props.data, - _props$done = props.done, - done = _props$done === void 0 ? false : _props$done, - loadMorePhotos = props.loadMorePhotos; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - _usePluginContext$wpB = _usePluginContext.wpBlock, - wpBlock = _usePluginContext$wpB === void 0 ? false : _usePluginContext$wpB; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - inactive = _useState2[0], - setInactive = _useState2[1]; - var _useInView = (0,react_intersection_observer__WEBPACK_IMPORTED_MODULE_6__.useInView)({ - rootMargin: '0px 0px' - }), - _useInView2 = _slicedToArray(_useInView, 2), - loadMoreRef = _useInView2[0], - inView = _useInView2[1]; - - // Scroll in-view callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (wpBlock) { - loadMorePhotos(); - } - }, [inView]); // eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("div", { - id: "photos", - className: inactive ? 'inactive' : null, - ref: ref - }, !!(data !== null && data !== void 0 && data.length) && data.map(function (result, index) { - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, { - key: "".concat(result.id, "-").concat(index) - }, (result === null || result === void 0 ? void 0 : result.type) === 'instant-images-ad' ? /*#__PURE__*/React.createElement(_Sponsor__WEBPACK_IMPORTED_MODULE_5__["default"], { - result: result - }) : /*#__PURE__*/React.createElement(_Photo__WEBPACK_IMPORTED_MODULE_4__["default"], { - result: result, - type: result === null || result === void 0 ? void 0 : result.type, - setInactive: setInactive - })); - }), /*#__PURE__*/React.createElement(_editor_block_components_LoadMore__WEBPACK_IMPORTED_MODULE_3__["default"], { - done: done, - ref: loadMoreRef - })), /*#__PURE__*/React.createElement(_editor_block_components_Instructions__WEBPACK_IMPORTED_MODULE_2__["default"], { - show: data === null || data === void 0 ? void 0 : data.length - })); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ResultsWPBlock); - -/***/ }), - -/***/ "./src/js/components/Sponsor.js": -/*!**************************************!*\ - !*** ./src/js/components/Sponsor.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Sponsor) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Render the Sponsor component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The Sponsor component. - */ -function Sponsor(props) { - var result = props.result; - var _result$data = result.data, - data = _result$data === void 0 ? null : _result$data; - var url = (data === null || data === void 0 ? void 0 : data.url) || ''; - var title = (data === null || data === void 0 ? void 0 : data.title) || ''; - var desc = (data === null || data === void 0 ? void 0 : data.description) || ''; - var avatar = (data === null || data === void 0 ? void 0 : data.avatar) || ''; - var _data$image = data.image, - image = _data$image === void 0 ? null : _data$image; - var _image$src = image.src, - src = _image$src === void 0 ? null : _image$src, - _image$alt = image.alt, - alt = _image$alt === void 0 ? null : _image$alt; - var photo = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var link = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, image && url ? - /*#__PURE__*/ - // eslint-disable-next-line - React.createElement("article", { - className: "photo feature", - title: desc, - ref: photo, - onClick: function onClick() { - return link.current.click(); - } - }, /*#__PURE__*/React.createElement("div", { - className: "photo--wrap" - }, /*#__PURE__*/React.createElement("span", { - className: "flag", - title: instant_img_localize.advertisement - }, instant_img_localize.ad), /*#__PURE__*/React.createElement("div", { - className: "img-wrap" - }, /*#__PURE__*/React.createElement("a", { - className: "loaded", - href: url, - target: "_blank", - ref: link, - rel: "noreferrer" - }, /*#__PURE__*/React.createElement("img", { - src: src, - alt: alt - }))), /*#__PURE__*/React.createElement("div", { - className: "feature-title" - }, avatar && /*#__PURE__*/React.createElement("img", { - src: avatar, - alt: title - }), /*#__PURE__*/React.createElement("span", null, title)))) : null); -} - -/***/ }), - -/***/ "./src/js/components/Tooltip.js": -/*!**************************************!*\ - !*** ./src/js/components/Tooltip.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Tooltip) -/* harmony export */ }); -/** - * Render the Tooltip component. - * - * @return {JSX.Element} The Tooltip component. - */ -function Tooltip() { - return /*#__PURE__*/React.createElement("div", { - id: "tooltip" - }); -} - -/***/ }), - -/***/ "./src/js/components/cta/Extended.js": -/*!*******************************************!*\ - !*** ./src/js/components/cta/Extended.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ ExtendedCTA: () => (/* binding */ ExtendedCTA), -/* harmony export */ ExtendedSearchCTA: () => (/* binding */ ExtendedSearchCTA) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _functions_localStorage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../functions/localStorage */ "./src/js/functions/localStorage.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - -/* eslint-disable */ - -/** - * Generic CTA for the Extended add-on. - * - * @return {JSX.Element} The ExtendedCTA component. - */ -function ExtendedCTA() { - var _instant_img_localize3; - var _instant_img_localize = (_instant_img_localize3 = instant_img_localize) === null || _instant_img_localize3 === void 0 || (_instant_img_localize3 = _instant_img_localize3.addons) === null || _instant_img_localize3 === void 0 ? void 0 : _instant_img_localize3.extended, - _instant_img_localize2 = _instant_img_localize.activated, - activated = _instant_img_localize2 === void 0 ? false : _instant_img_localize2; - var name = 'extended-cta-2024'; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSetting)(name) === 'hide'), - _useState2 = _slicedToArray(_useState, 2), - dissmissed = _useState2[0], - setDismissed = _useState2[1]; // Get setting from localstorage. - - // Hide the CTA. - function remove() { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.saveSettings)(name, 'hide'); - setDismissed(true); - } - return /*#__PURE__*/React.createElement(React.Fragment, null, !activated && !dissmissed ? /*#__PURE__*/React.createElement("div", { - className: "cta-extended cta-extended--standard" - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-bullhorn", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("span", null, "Introducing the", ' ', /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer" - }, "Extended add-on")), ' ', "\u2192 An extension pack of premium features and functionality to enhance the Instant Images plugin."), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer", - className: "button button-primary" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Learn More', 'instant-images')), /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button button-secondary", - onClick: function onClick() { - return remove(); - }, - "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images') - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images')))) : null); -} - -/** - * CTA for the Extended add-on in the search dropdown. - * - * @param {Object} props The component props. - * @param {boolean} props.show Display the component. - * @return {JSX.Element} The ExtendedSearchCTA component. - */ -function ExtendedSearchCTA(_ref) { - var _ref$show = _ref.show, - show = _ref$show === void 0 ? false : _ref$show; - var name = 'extended-cta-search-2024'; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSetting)(name) !== 'hide'), - _useState4 = _slicedToArray(_useState3, 2), - active = _useState4[0], - setActive = _useState4[1]; // Get setting from localstorage. - - // Hide the CTA. - function remove() { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.saveSettings)(name, 'hide'); - setActive(false); - } - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('control-nav--search-history extended-cta', show && active ? 'active' : null) - }, /*#__PURE__*/React.createElement("div", { - className: "cta-extended cta-extended--search" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "closeBtn", - onClick: function onClick() { - return remove(); - }, - "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images') - }, "\xD7", /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images'))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("i", { - className: "fa fa-magic", - "aria-hidden": "true" - }), "Enable search suggestions, history, and maintain current search term while switching providers with the", ' ', /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer" - }, "Extended add-on")), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer", - className: "button button-primary" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Learn More', 'instant-images')))))); -} - -/***/ }), - -/***/ "./src/js/components/search/SearchForm.js": -/*!************************************************!*\ - !*** ./src/js/components/search/SearchForm.js ***! - \************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _functions_localStorage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../functions/localStorage */ "./src/js/functions/localStorage.js"); -/* harmony import */ var _hooks_useClickOutside__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../hooks/useClickOutside */ "./src/js/hooks/useClickOutside.js"); -/* harmony import */ var _cta_Extended__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cta/Extended */ "./src/js/components/cta/Extended.js"); -/* harmony import */ var _SearchHistory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SearchHistory */ "./src/js/components/search/SearchHistory.js"); -/* harmony import */ var _SearchToolTip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./SearchToolTip */ "./src/js/components/search/SearchToolTip.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } -function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); } - - - - - - - - - -/** - * Render the search form as a component. - * - * @return {JSX.Element} The SearchForm component. - */ -var SearchForm = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (_ref, ref) { - var _instant_img_localize4; - _objectDestructuringEmpty(_ref); - var _instant_img_localize = (_instant_img_localize4 = instant_img_localize) === null || _instant_img_localize4 === void 0 || (_instant_img_localize4 = _instant_img_localize4.addons) === null || _instant_img_localize4 === void 0 ? void 0 : _instant_img_localize4.extended, - _instant_img_localize2 = _instant_img_localize.activated, - extended_activated = _instant_img_localize2 === void 0 ? false : _instant_img_localize2, - _instant_img_localize3 = _instant_img_localize.license, - extended_license = _instant_img_localize3 === void 0 ? false : _instant_img_localize3; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - searchHandler = _usePluginContext.searchHandler, - apiError = _usePluginContext.apiError, - suggestions = _usePluginContext.suggestions, - getSuggestions = _usePluginContext.getSuggestions; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]), - _useState2 = _slicedToArray(_useState, 2), - history = _useState2[0], - setHistory = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState4 = _slicedToArray(_useState3, 2), - show = _useState4[0], - setShow = _useState4[1]; - var historyRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); - var submitBtnRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); - - // Handle clickoutside hook. - (0,_hooks_useClickOutside__WEBPACK_IMPORTED_MODULE_4__.useClickOutside)(historyRef, function () { - setShow(false); - }); - - /** - * Set the search value in the form. - * - * @param {string} value The value to set. - */ - function setSearchValue(value) { - var input = ref === null || ref === void 0 ? void 0 : ref.current; - input.value = value; - submitBtnRef === null || submitBtnRef === void 0 || submitBtnRef.current.click(); - - // Set focus on input. - input.focus(); - } - - /** - * Search submit handler. - * - * @param {Event} e The event object. - */ - function formSubmit(e) { - var _ref$current; - e.preventDefault(); - var term = ref === null || ref === void 0 || (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.value; - if (term) { - searchHandler(e); - if (extended_license) { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.saveSearchHistory)(term); - setHistory((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSearchHistory)()); - } - } - } - - /** - * Should the history div be shown? - * - * @return {boolean} Show history. - */ - function showHistory() { - return (history === null || history === void 0 ? void 0 : history.length) || (suggestions === null || suggestions === void 0 ? void 0 : suggestions.length); - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - setHistory((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSearchHistory)()); - }, []); - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('control-nav--search', apiError ? 'inactive' : null) - }, /*#__PURE__*/React.createElement("form", { - onSubmit: function onSubmit(e) { - return formSubmit(e); - }, - autoComplete: "off" - }, /*#__PURE__*/React.createElement("label", { - htmlFor: "search-input", - className: "offscreen" - }, instant_img_localize.search_label), /*#__PURE__*/React.createElement("div", { - ref: historyRef - }, /*#__PURE__*/React.createElement("input", { - ref: ref, - type: "text", - id: "search-input", - placeholder: instant_img_localize.search, - disabled: apiError, - onChange: function onChange(e) { - return extended_license && getSuggestions(e.target.value); - }, - onFocus: function onFocus() { - return setShow(true); - } - }), extended_license && showHistory() ? - /*#__PURE__*/ - /* Extended: Show only with valid add-on license */ - React.createElement(_SearchHistory__WEBPACK_IMPORTED_MODULE_6__["default"], { - show: show, - history: history, - setHistory: setHistory, - setSearchValue: setSearchValue, - container: historyRef - }) : null, !extended_activated && - /*#__PURE__*/ - /* Extended: Show only when add-on not installed. */ - React.createElement(_cta_Extended__WEBPACK_IMPORTED_MODULE_5__.ExtendedSearchCTA, { - show: show - })), /*#__PURE__*/React.createElement("button", { - type: "submit", - disabled: apiError, - ref: submitBtnRef - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-search" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.search)), /*#__PURE__*/React.createElement(_SearchToolTip__WEBPACK_IMPORTED_MODULE_7__["default"], { - show: show - }))); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchForm); - -/***/ }), - -/***/ "./src/js/components/search/SearchHeader.js": -/*!**************************************************!*\ - !*** ./src/js/components/search/SearchHeader.js ***! - \**************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ SearchHeader) -/* harmony export */ }); -/* harmony import */ var _constants_filters__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../constants/filters */ "./src/js/constants/filters.js"); -/* harmony import */ var _Filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Filter */ "./src/js/components/Filter.js"); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - -/** - * Render the SearchHeader component. - * - * @return {JSX.Element} The SearchHeader component. - */ -function SearchHeader() { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider, - search = _usePluginContext.search, - getPhotos = _usePluginContext.getPhotos, - filterSearch = _usePluginContext.filterSearch; - var _search$active = search.active, - active = _search$active === void 0 ? false : _search$active, - _search$term = search.term, - term = _search$term === void 0 ? '' : _search$term, - _search$results = search.results, - total = _search$results === void 0 ? 0 : _search$results; - var filters = _constants_filters__WEBPACK_IMPORTED_MODULE_0__.FILTERS[provider].search; - if (!active) { - // Exit if search is not active. - return null; - } - return /*#__PURE__*/React.createElement("header", { - className: "search-header" - }, /*#__PURE__*/React.createElement("h2", null, term.replace('id:', 'ID: ')), /*#__PURE__*/React.createElement("div", { - className: "search-header--text" - }, "".concat(total, " ").concat(instant_img_localize.search_results), " ", /*#__PURE__*/React.createElement("strong", null, "".concat(term)), /*#__PURE__*/React.createElement("span", null, "-"), /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return getPhotos(true); - } - }, instant_img_localize.clear_search)), filters && Object.entries(filters).length ? /*#__PURE__*/React.createElement("div", { - className: "control-nav--filters-wrap" - }, /*#__PURE__*/React.createElement("div", { - className: "control-nav--filters" - }, Object.entries(filters).map(function (_ref, index) { - var _ref2 = _slicedToArray(_ref, 2), - key = _ref2[0], - filter = _ref2[1]; - return /*#__PURE__*/React.createElement(_Filter__WEBPACK_IMPORTED_MODULE_1__["default"], { - key: "".concat(provider, "-search-").concat(key, "-").concat(index), - filterKey: key, - provider: provider, - data: filter, - handler: filterSearch - }); - }))) : null); -} - -/***/ }), - -/***/ "./src/js/components/search/SearchHistory.js": -/*!***************************************************!*\ - !*** ./src/js/components/search/SearchHistory.js ***! - \***************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ SearchHistory) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _functions_localStorage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../functions/localStorage */ "./src/js/functions/localStorage.js"); -/* harmony import */ var _hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../hooks/useArrowControls */ "./src/js/hooks/useArrowControls.js"); - - - - - - - -/** - * The History list component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The SearchHistory component. - */ -function SearchHistory(props) { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__.usePluginContext)(), - suggestions = _usePluginContext.suggestions; - var show = props.show, - history = props.history, - setHistory = props.setHistory, - setSearchValue = props.setSearchValue, - container = props.container; - var dropRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); - - // Use up/down arrow keys to navigate dropdown. - (0,_hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_5__.useArrowControls)(show, container); - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('control-nav--search-history', show ? 'active' : null), - role: "listbox", - ref: dropRef - }, !!suggestions.length && /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("div", { - className: "control-nav--search-history-title" - }, /*#__PURE__*/React.createElement("div", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Suggestions', 'instant-images'))), /*#__PURE__*/React.createElement("ul", { - role: "listbox", - className: "search-suggestions" - }, suggestions.map(function (item, key) { - return /*#__PURE__*/React.createElement("li", { - key: key, - role: "option" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - onClick: function onClick() { - return setSearchValue(item); - } - }, item)); - }))), !!history.length && /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("div", { - className: "control-nav--search-history-title" - }, /*#__PURE__*/React.createElement("div", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Recent Searches', 'instant-images')), /*#__PURE__*/React.createElement("button", { - type: "button", - onClick: function onClick() { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_4__.clearSearchHistory)(); - setHistory([]); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Clear', 'instant-images'))), /*#__PURE__*/React.createElement("ul", { - role: "listbox", - className: "search-history" - }, history.map(function (item, key) { - return /*#__PURE__*/React.createElement("li", { - key: key, - role: "option" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "history", - onClick: function onClick() { - return setSearchValue(item); - } - }, item)); - })))); -} - -/***/ }), - -/***/ "./src/js/components/search/SearchToolTip.js": -/*!***************************************************!*\ - !*** ./src/js/components/search/SearchToolTip.js ***! - \***************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ SearchToolTip) -/* harmony export */ }); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); - - - -/** - * Render the search results tooltip component. - * - * @return {JSX.Element} The SearchToolTip component. - */ -function SearchToolTip() { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - getPhotos = _usePluginContext.getPhotos, - search = _usePluginContext.search; - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_0___default()('control-nav--search-tooltip', search !== null && search !== void 0 && search.active ? null : 'hide') - }, /*#__PURE__*/React.createElement("span", { - title: "".concat(search === null || search === void 0 ? void 0 : search.results, " ").concat(instant_img_localize.search_results, " ").concat(search === null || search === void 0 ? void 0 : search.term) - }, search === null || search === void 0 ? void 0 : search.results), /*#__PURE__*/React.createElement("button", { - type: "button", - title: instant_img_localize.clear_search, - onClick: function onClick() { - return getPhotos(true); - } - }, "x", /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.clear_search))); -} - -/***/ }), - -/***/ "./src/js/constants/API.js": -/*!*********************************!*\ - !*** ./src/js/constants/API.js ***! - \*********************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ API: () => (/* binding */ API) -/* harmony export */ }); -/* harmony import */ var _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/ProviderIcons */ "./src/js/components/ProviderIcons.js"); - -var API = { - proxy: "https://proxy.getinstantimages.com/api/" || 0, - // eslint-disable-line - testmode: false, - defaults: { - provider: 'unsplash', - order: 'latest', - arr_key: 'results' - }, - providers: ['Unsplash', 'Openverse', 'Pixabay', 'Pexels', 'Giphy'], - unsplash: { - name: 'Unsplash', - requires_key: true, - "new": false, - api_var: 'client_id', - collections_api: 'https://api.unsplash.com/collections/', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.UnsplashIcon - }, - pixabay: { - name: 'Pixabay', - requires_key: true, - "new": false, - api_var: 'key', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.PixabayIcon - }, - pexels: { - name: 'Pexels', - requires_key: true, - "new": false, - api_var: 'key', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.PexelsIcon - }, - openverse: { - name: 'Openverse', - requires_key: false, - "new": false, - api_var: 'key', - key: '', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.OpenverseIcon - }, - giphy: { - name: 'Giphy', - requires_key: true, - "new": true, - api_var: 'key', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.GiphyIcon - } -}; - -/***/ }), - -/***/ "./src/js/constants/filters.js": -/*!*************************************!*\ - !*** ./src/js/constants/filters.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ FILTERS: () => (/* binding */ FILTERS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _filters_openverse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filters/openverse */ "./src/js/constants/filters/openverse.js"); -/* harmony import */ var _filters_pexels__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./filters/pexels */ "./src/js/constants/filters/pexels.js"); -/* harmony import */ var _filters_pixabay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./filters/pixabay */ "./src/js/constants/filters/pixabay.js"); -/* harmony import */ var _filters_unsplash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./filters/unsplash */ "./src/js/constants/filters/unsplash.js"); -function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } -function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } - - - - - -var ALL = { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('All', 'instant-images'), - value: 'all' -}; -var FILTERS = { - giphy: { - filters: { - order: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'trending', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Trending', 'instant-images'), - value: 'trending' - }] - } - }, - search: {} - }, - openverse: { - filters: { - source: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Source', 'instant-images'), - "default": 'wordpress', - filters: _toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_SOURCES) - }, - aspect_ratio: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_ORIENTATIONS)) - } - }, - search: { - category: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Type', 'instant-images'), - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Illustration', 'instant-images'), - value: 'illustration' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Photograph', 'instant-images'), - value: 'photograph' - }] - }, - extension: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Extension', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_EXTENSIONS)) - }, - aspect_ratio: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_ORIENTATIONS)) - }, - size: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Size', 'instant-images'), - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Large', 'instant-images'), - value: 'large' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Medium', 'instant-images'), - value: 'medium' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Small', 'instant-images'), - value: 'small' - }] - }, - license: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('License', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_LICENSES)) - }, - license_type: { - label: 'license_type', - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Commercial', 'instant-images'), - value: 'commercial' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Modification', 'instant-images'), - value: 'modification' - }] - } - } - }, - pexels: { - filters: { - order_by: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'curated', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Curated', 'instant-images'), - value: 'curated' - }] - } - }, - search: { - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pexels__WEBPACK_IMPORTED_MODULE_2__.PEXELS_ORIENTATIONS)) - }, - color: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pexels__WEBPACK_IMPORTED_MODULE_2__.PEXELS_COLORS)) - }, - size: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Size', 'instant-images'), - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Large', 'instant-images'), - value: 'large' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Medium', 'instant-images'), - value: 'medium' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Small', 'instant-images'), - value: 'small' - }] - } - } - }, - unsplash: { - filters: { - order_by: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'latest', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Latest', 'instant-images'), - value: 'latest' - }] - } - }, - search: { - order_by: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'relevant', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Relevance', 'instant-images'), - value: 'relevant' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Latest', 'instant-images'), - value: 'latest' - }] - }, - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_unsplash__WEBPACK_IMPORTED_MODULE_4__.UNSPLASH_ORIENTATIONS)) - }, - color: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_unsplash__WEBPACK_IMPORTED_MODULE_4__.UNSPLASH_COLORS)) - } - } - }, - pixabay: { - filters: { - order: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'popular', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Popular', 'instant-images'), - value: 'popular' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Latest', 'instant-images'), - value: 'latest' - }] - }, - image_type: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Type', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_IMAGE_TYPE)) - }, - category: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Category', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_CATS)) - }, - colors: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_COLORS)) - }, - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_ORIENTATIONS)) - } - }, - search: { - image_type: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Type', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_IMAGE_TYPE)) - }, - colors: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_COLORS)) - }, - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_ORIENTATIONS)) - } - } - } -}; - -/***/ }), - -/***/ "./src/js/constants/filters/openverse.js": -/*!***********************************************!*\ - !*** ./src/js/constants/filters/openverse.js ***! - \***********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ OPENVERSE_EXTENSIONS: () => (/* binding */ OPENVERSE_EXTENSIONS), -/* harmony export */ OPENVERSE_LICENSES: () => (/* binding */ OPENVERSE_LICENSES), -/* harmony export */ OPENVERSE_ORIENTATIONS: () => (/* binding */ OPENVERSE_ORIENTATIONS), -/* harmony export */ OPENVERSE_SOURCES: () => (/* binding */ OPENVERSE_SOURCES) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var OPENVERSE_SOURCES = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('WordPress', 'instant-images'), - value: 'wordpress' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Flickr', 'instant-images'), - value: 'flickr' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Nasa', 'instant-images'), - value: 'nasa' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('SpaceX', 'instant-images'), - value: 'spacex' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Wikimedia', 'instant-images'), - value: 'wikimedia' -}]; -var OPENVERSE_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Square', 'instant-images'), - value: 'square' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Tall', 'instant-images'), - value: 'tall' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Wide', 'instant-images'), - value: 'wide' -}]; -var OPENVERSE_EXTENSIONS = [{ - label: 'JPG', - value: 'JPG' -}, { - label: 'GIF', - value: 'GIF' -}, { - label: 'PNG', - value: 'PNG' -}, { - label: 'SVG', - value: 'SVG' -}]; -var OPENVERSE_LICENSES = [{ - label: 'BY', - value: 'BY' -}, { - label: 'BY-NC', - value: 'BY-NC' -}, { - label: 'BY-NC-ND', - value: 'BY-NC-ND' -}, { - label: 'BY-NC-SA', - value: 'BY-NC-SA' -}, { - label: 'BY-ND', - value: 'BY-ND' -}, { - label: 'BY-SA', - value: 'BY-SA' -}, { - label: 'CC0', - value: 'CC0' -}]; - -/***/ }), - -/***/ "./src/js/constants/filters/pexels.js": -/*!********************************************!*\ - !*** ./src/js/constants/filters/pexels.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ PEXELS_COLORS: () => (/* binding */ PEXELS_COLORS), -/* harmony export */ PEXELS_ORIENTATIONS: () => (/* binding */ PEXELS_ORIENTATIONS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var PEXELS_COLORS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Red', 'instant-images'), - value: 'red' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orange', 'instant-images'), - value: 'orange' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Yellow', 'instant-images'), - value: 'yellow' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Green', 'instant-images'), - value: 'green' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Turquoise', 'instant-images'), - value: 'turquoise' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Blue', 'instant-images'), - value: 'blue' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Violet', 'instant-images'), - value: 'violet' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Pink', 'instant-images'), - value: 'pink' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Brown', 'instant-images'), - value: 'brown' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black', 'instant-images'), - value: 'black' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Gray', 'instant-images'), - value: 'gray' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('White', 'instant-images'), - value: 'white' -}]; -var PEXELS_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Landscape', 'instant-images'), - value: 'landscape' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Portrait', 'instant-images'), - value: 'portrait' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Square', 'instant-images'), - value: 'squarish' -}]; - -/***/ }), - -/***/ "./src/js/constants/filters/pixabay.js": -/*!*********************************************!*\ - !*** ./src/js/constants/filters/pixabay.js ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ PIXABAY_CATS: () => (/* binding */ PIXABAY_CATS), -/* harmony export */ PIXABAY_COLORS: () => (/* binding */ PIXABAY_COLORS), -/* harmony export */ PIXABAY_IMAGE_TYPE: () => (/* binding */ PIXABAY_IMAGE_TYPE), -/* harmony export */ PIXABAY_ORIENTATIONS: () => (/* binding */ PIXABAY_ORIENTATIONS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var PIXABAY_COLORS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Grayscale', 'instant-images'), - value: 'grayscale' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Red', 'instant-images'), - value: 'red' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orange', 'instant-images'), - value: 'orange' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Yellow', 'instant-images'), - value: 'yellow' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Green', 'instant-images'), - value: 'green' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Turquoise', 'instant-images'), - value: 'turquoise' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Blue', 'instant-images'), - value: 'blue' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Lilac', 'instant-images'), - value: 'lilac' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Pink', 'instant-images'), - value: 'pink' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('White', 'instant-images'), - value: 'white' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Gray', 'instant-images'), - value: 'gray' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black', 'instant-images'), - value: 'black' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Brown', 'instant-images'), - value: 'brown' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Transparent', 'instant-images'), - value: 'transparent' -}]; -var PIXABAY_CATS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Backgrounds', 'instant-images'), - value: 'backgrounds' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Fashion', 'instant-images'), - value: 'fashion' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Nature', 'instant-images'), - value: 'nature' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Science', 'instant-images'), - value: 'science' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Education', 'instant-images'), - value: 'education' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Feelings', 'instant-images'), - value: 'feelings' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Health', 'instant-images'), - value: 'health' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('People', 'instant-images'), - value: 'people' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Religion', 'instant-images'), - value: 'religion' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Places', 'instant-images'), - value: 'places' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Animals', 'instant-images'), - value: 'animals' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Industry', 'instant-images'), - value: 'industry' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Computer', 'instant-images'), - value: 'computer' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Food', 'instant-images'), - value: 'food' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Sports', 'instant-images'), - value: 'sports' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Food', 'instant-images'), - value: 'food' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Transportation', 'instant-images'), - value: 'transportation' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Travel', 'instant-images'), - value: 'travel' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Buildings', 'instant-images'), - value: 'buildings' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Business', 'instant-images'), - value: 'business' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Music', 'instant-images'), - value: 'music' -}]; -var PIXABAY_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Horizontal', 'instant-images'), - value: 'horizontal' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Vertical', 'instant-images'), - value: 'vertical' -}]; -var PIXABAY_IMAGE_TYPE = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Photo', 'instant-images'), - value: 'photo' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Illustration', 'instant-images'), - value: 'illustration' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Vector', 'instant-images'), - value: 'vector' -}]; - -/***/ }), - -/***/ "./src/js/constants/filters/unsplash.js": -/*!**********************************************!*\ - !*** ./src/js/constants/filters/unsplash.js ***! - \**********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ UNSPLASH_COLORS: () => (/* binding */ UNSPLASH_COLORS), -/* harmony export */ UNSPLASH_ORIENTATIONS: () => (/* binding */ UNSPLASH_ORIENTATIONS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var UNSPLASH_COLORS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black & White', 'instant-images'), - value: 'black_and_white' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black', 'instant-images'), - value: 'black' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('White', 'instant-images'), - value: 'white' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Yellow', 'instant-images'), - value: 'yellow' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Green', 'instant-images'), - value: 'green' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orange', 'instant-images'), - value: 'orange' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Red', 'instant-images'), - value: 'red' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Purple', 'instant-images'), - value: 'purple' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Magenta', 'instant-images'), - value: 'magenta' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Teal', 'instant-images'), - value: 'teal' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Blue', 'instant-images'), - value: 'blue' -}]; -var UNSPLASH_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Landscape', 'instant-images'), - value: 'landscape' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Portrait', 'instant-images'), - value: 'portrait' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Square', 'instant-images'), - value: 'squarish' -}]; - -/***/ }), - -/***/ "./src/js/editor/block/components/Header.js": -/*!**************************************************!*\ - !*** ./src/js/editor/block/components/Header.js ***! - \**************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ BlockHeader) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _components_Icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../components/Icon */ "./src/js/components/Icon.js"); - - - - -var providers = _constants_API__WEBPACK_IMPORTED_MODULE_2__.API.providers; - -/** - * Render the block header. - * - * @param {Object} props The component props. - * @param {Object} props.switchProvider The function to switch the provider. - * @return {JSX.Element} The BlockHeader component. - */ -function BlockHeader(_ref) { - var switchProvider = _ref.switchProvider; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - provider = _usePluginContext.provider; - - /** - * Switch the provider via select. - * - * @param {string} value The provider value. - */ - function providerChange(value) { - if (value) { - switchProvider(value); - } - } - return /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--header" - }, /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--header-logo" - }, /*#__PURE__*/React.createElement(_components_Icon__WEBPACK_IMPORTED_MODULE_3__.IconLogo, null), /*#__PURE__*/React.createElement("span", null, "Instant Images")), /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--header-nav" - }, /*#__PURE__*/React.createElement("label", { - className: "offscreen" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Select Provider', 'instant-images')), /*#__PURE__*/React.createElement("select", { - defaultValue: provider, - onChange: function onChange(e) { - return providerChange(e.target.value); - } - }, /*#__PURE__*/React.createElement("option", { - value: "" - }, "-- ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Select Provider', 'instant-images'), " --"), providers.map(function (item, index) { - return /*#__PURE__*/React.createElement("option", { - key: index, - value: item.toLowerCase() - }, item); - })))); -} - -/***/ }), - -/***/ "./src/js/editor/block/components/Instructions.js": -/*!********************************************************!*\ - !*** ./src/js/editor/block/components/Instructions.js ***! - \********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ BlockInstructions) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Render instructional text for the WP Block. - * - * @param {Object} props The component props. - * @return {JSX.Element} The BlockInstructions component. - */ -function BlockInstructions(props) { - var _props$show = props.show, - show = _props$show === void 0 ? false : _props$show; - if (!show) { - return null; - } - return /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--instructions" - }, /*#__PURE__*/React.createElement("span", null, "\u2190"), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Scroll to Load Images', 'instant-images'), /*#__PURE__*/React.createElement("span", null, "\u2192")); -} - -/***/ }), - -/***/ "./src/js/editor/block/components/LoadMore.js": -/*!****************************************************!*\ - !*** ./src/js/editor/block/components/LoadMore.js ***! - \****************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); - - - -/** - * Render the BlockLoadMore component. - * - * @return {JSX.Element} The BlockLoadMore component. - */ -var BlockLoadMore = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var done = props.done; - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('instant-images-block--loader', done ? 'done' : null), - ref: ref - }); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BlockLoadMore); - -/***/ }), - -/***/ "./src/js/editor/utils/insertImage.js": -/*!********************************************!*\ - !*** ./src/js/editor/utils/insertImage.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ insertImage) -/* harmony export */ }); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); - - - -/** - * Insert an image block into the block editor. - * - * @param {Object} attachment The attachment object. - * @param {string} clientId The block ID. - */ -function insertImage(attachment, clientId) { - var _attachment$id = attachment.id, - id = _attachment$id === void 0 ? null : _attachment$id, - _attachment$url = attachment.url, - url = _attachment$url === void 0 ? null : _attachment$url, - _attachment$caption = attachment.caption, - caption = _attachment$caption === void 0 ? '' : _attachment$caption, - _attachment$alt = attachment.alt, - alt = _attachment$alt === void 0 ? '' : _attachment$alt; - if (!url || !id) { - return; - } - - // Create block. - var block = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('core/image', { - id: id, - url: url, - caption: caption, - alt: alt - }); - if (clientId) { - // Replace the Instant Images block. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)('core/block-editor').replaceBlock(clientId, block); - } else { - // Insert Image block. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)('core/block-editor').insertBlocks(block); - } -} - -/***/ }), - -/***/ "./src/js/editor/utils/setFeaturedImage.js": -/*!*************************************************!*\ - !*** ./src/js/editor/utils/setFeaturedImage.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ setFeaturedImage) -/* harmony export */ }); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Set image as featured image in Gutenberg. - * - * @param {Object} attachment The attachment object. - */ -function setFeaturedImage(attachment) { - var _attachment$id = attachment.id, - id = _attachment$id === void 0 ? null : _attachment$id; - if (!id) { - return; - } - - // Set the featured image. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/editor').editPost({ - featured_media: id - }); - - // Open the document sidebar. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/edit-post').openGeneralSidebar('edit-post/document'); -} - -/***/ }), - -/***/ "./src/js/functions/buildURL.js": -/*!**************************************!*\ - !*** ./src/js/functions/buildURL.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ buildTestURL: () => (/* binding */ buildTestURL), -/* harmony export */ "default": () => (/* binding */ buildURL), -/* harmony export */ getProxyURL: () => (/* binding */ getProxyURL) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _getQueryParams__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getQueryParams */ "./src/js/functions/getQueryParams.js"); -/* harmony import */ var _providers_openverse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./providers/openverse */ "./src/js/functions/providers/openverse.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - - - - -/** - * Build the API query parameters. - * - * @param {string} type The query type (search, photos, id). - * @param {Object} params The current params object. - * @return {string} The new API URL with querystring params. - */ -function buildURL(type, params) { - if (!type) { - // Bail early if API query type is missing. - return ''; - } - // Get the current provider. - var _params = params, - _params$provider = _params.provider, - provider = _params$provider === void 0 ? 'unsplash' : _params$provider; - - // Provider doesn't need to be sent. - delete params.provider; - - // Set Openverse params. - params = provider === 'openverse' ? (0,_providers_openverse__WEBPACK_IMPORTED_MODULE_2__.openverseParams)(type, params) : params; - - // Build the API URL. - var url = new URL(getProxyURL(provider)); - - // Add `type` to params. - url.searchParams.append('type', type); - - // Append query params. - Object.keys(params).forEach(function (key) { - url.searchParams.append(key, params[key]); - }); - - // Add `version` to params. - url.searchParams.append('version', instant_img_localize.version); - return url === null || url === void 0 ? void 0 : url.href; -} - -/** - * Get the proxy URL from ENV vars. - * - * @param {string} provider The image provider. - * @return {string} The proxy URL. - */ -function getProxyURL(provider) { - var _API$proxy = _constants_API__WEBPACK_IMPORTED_MODULE_0__.API.proxy, - proxy = _API$proxy === void 0 ? 'https://proxy.getinstantimages.com/api/' : _API$proxy; - return "".concat(proxy).concat(provider); -} - -/** - * Build a API testing URL. - * - * @param {string} provider The current service provider. - * @return {string} The API URL. - */ -function buildTestURL(provider) { - var options = { - page: 1 - }; - - // Build URL. - var params = _objectSpread(_objectSpread({ - test: true - }, (0,_getQueryParams__WEBPACK_IMPORTED_MODULE_1__["default"])(provider)), options); - return buildURL('photos', params); -} - -/***/ }), - -/***/ "./src/js/functions/consoleStatus.js": -/*!*******************************************!*\ - !*** ./src/js/functions/consoleStatus.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ consoleStatus) -/* harmony export */ }); -/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _getErrorMessage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getErrorMessage */ "./src/js/functions/getErrorMessage.js"); - - - -/** - * Display a console.warn message about API status. - * - * @param {string} provider The API service provider. - * @param {string} status The API status. - */ -function consoleStatus(provider) { - var status = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200; - var local = instant_img_localize; - var message = (0,_getErrorMessage__WEBPACK_IMPORTED_MODULE_1__["default"])(status); - switch (status) { - case 400: - case 401: - case 500: - // Unsplash/Pixabay/Pexels incorrect API key - console.warn("[".concat(local.instant_images, " - ").concat(status, " Error] ").concat((0,_helpers__WEBPACK_IMPORTED_MODULE_0__.capitalizeFirstLetter)(provider), ": ").concat(message)); - break; - case 429: - /** - * Pixabay, Pexels - too many requests. - * - * @see https://www.pexels.com/api/documentation/#statistics - * @see https://pixabay.com/api/docs/#api_rate_limit - */ - console.warn("[".concat(local.instant_images, " - ").concat(status, " Error] ").concat((0,_helpers__WEBPACK_IMPORTED_MODULE_0__.capitalizeFirstLetter)(provider), ": ").concat(message)); - break; - default: - break; - } -} - -/***/ }), - -/***/ "./src/js/functions/generateAttribution.js": -/*!*************************************************!*\ - !*** ./src/js/functions/generateAttribution.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ generateAttribution) -/* harmony export */ }); -/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/js/functions/helpers.js"); - - -/** - * Get the API URL for searches by ID. - * - * @param {string} text Attribution hook content. - * @param {string} provider Image provider. - * @param {string} permalink Image url. - * @param {Object} user The user data. - * @return {string} The raw attribution HTML. - */ -function generateAttribution(text, provider, permalink, user) { - if (!text || !provider || !permalink || !user) { - return text; - } - - // Get user data. - var username = user.name, - user_url = user.url; - - // Format provider data. - var provider_url = instant_img_localize["".concat(provider, "_url")]; - var provider_name = (0,_helpers__WEBPACK_IMPORTED_MODULE_0__.capitalizeFirstLetter)(provider); - - // Generate attribution template. - var attribution = text; - attribution = attribution.replace('{username}', username); - attribution = attribution.replace('{user_url}', user_url); - attribution = attribution.replace('{image_url}', permalink); - attribution = attribution.replace('{provider_url}', provider_url); - attribution = attribution.replace('{provider}', provider_name); - return attribution; -} - -/***/ }), - -/***/ "./src/js/functions/getErrorMessage.js": -/*!*********************************************!*\ - !*** ./src/js/functions/getErrorMessage.js ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getErrorMessage) -/* harmony export */ }); -/** - * Get the correct error message by status code. - * - * @param {string} status The API status. - */ -function getErrorMessage() { - var status = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 200; - var local = instant_img_localize; - switch (status) { - case 400: - case 401: - // Unsplash/Pixabay/Pexels incorrect API key. - return local.api_invalid_msg; - case 403: - return local.api_invalid_403_msg; - case 404: - return local.api_invalid_404_msg; - case 429: - /** - * Pixabay, Pexels - too many requests. - * - * @see https://www.pexels.com/api/documentation/#statistics - * @see https://pixabay.com/api/docs/#api_rate_limit - */ - return local.api_ratelimit_msg; - case 500: - case 503: - // Internal server error. - return local.api_invalid_500_msg; - case 501: - // Missing params. - return local.api_invalid_501_msg; - default: - break; - } -} - -/***/ }), - -/***/ "./src/js/functions/getProvider.js": -/*!*****************************************!*\ - !*** ./src/js/functions/getProvider.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getProvider) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); - - -/** - * Get the default provider on page load. - * - * @return {string} The default service provider. - */ -function getProvider() { - return instant_img_localize && instant_img_localize.default_provider ? instant_img_localize.default_provider : _constants_API__WEBPACK_IMPORTED_MODULE_0__.API.defaults.provider; -} - -/***/ }), - -/***/ "./src/js/functions/getQueryParams.js": -/*!********************************************!*\ - !*** ./src/js/functions/getQueryParams.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getQueryParams), -/* harmony export */ getAuth: () => (/* binding */ getAuth), -/* harmony export */ getContentSafety: () => (/* binding */ getContentSafety) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - - -// eslint-disable - -/** - * Build the API query parameters - * - * @param {string} provider The current service provider. - * @param {Object} queryParams Optional query parameters to append to base params. - * @return {Object} Parameters used for the fetch request. - */ -function getQueryParams(provider, queryParams) { - if (!provider) { - return {}; - } - - // Set default params. - var params = { - provider: provider - }; - - // Append additional params. - params = getContentSafety(params, provider); - params = _objectSpread(_objectSpread({}, params), queryParams); - params = getAuth(params, provider); - - /** - * Display query params in the browser console. - * - * Global plugin hook. - */ - if (instant_img_localize.query_debug) { - console.table(params); - } - return params; -} - -/** - * Get auth keys and append to API query request. - * - * @param {Object} params The current params object. - * @param {string} provider The current service provider. - * @return {Object} The auth parameter object. - */ -function getAuth(params, provider) { - var has_auth = _constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider].requires_key; - if (!has_auth || !provider) { - return params; - } - var app_id = instant_img_localize["".concat(provider, "_app_id")]; - if (app_id) { - // Pass API keys if not using defaults. - params[_constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider].api_var] = app_id; - } - return params; -} - -/** - * Set the photo safety for indicating that only images suitable for all ages should be returned. - * - * @see https://unsplash.com/documentation#content-safety - * @see https://pixabay.com/api/docs/ - * - * @param {Object} params The current params object. - * @param {string} provider The current service provider. - * @return {Object} The fetch parameters object. - */ -function getContentSafety(params, provider) { - switch (provider) { - case 'unsplash': - if (instant_img_localize.unsplash_content_filter) { - params.content_filter = instant_img_localize.unsplash_content_filter; - } - break; - case 'pixabay': - if (instant_img_localize.pixabay_safesearch) { - params.safesearch = 'true'; - } - break; - case 'openverse': - if (instant_img_localize.openverse_mature) { - params.mature = 'true'; - } - break; - } - return params; -} - -/***/ }), - -/***/ "./src/js/functions/getResults.js": -/*!****************************************!*\ - !*** ./src/js/functions/getResults.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getResults), -/* harmony export */ getResultById: () => (/* binding */ getResultById), -/* harmony export */ getSearchTotal: () => (/* binding */ getSearchTotal) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); - - -/** - * Pluck `results` from the API response. - * - * @param {Object} data The API results object. - * @return {Array} The results as an array. - */ -function getResults(data) { - if (!data) { - return []; - } - return data[_constants_API__WEBPACK_IMPORTED_MODULE_0__.API.defaults.arr_key] || []; -} - -/** - * Get the total search results. - * - * @param {Object} data The search data object. - * @return {string} The total results. - */ -function getSearchTotal(data) { - // Return 0 if undefined or null. - return data.total === undefined || data.total === null ? 0 : data.total; -} - -/** - * Get results by photo ID. - * - * @param {string} provider The current service provider. - * @param {string} key The match key to access. - * @param {Object} data The API results object. - * @return {Array} The results as an array. - * @deprecated 5.0 - */ -function getResultById(provider, key, data) { - if (!data) { - return []; - } - var result = []; - switch (provider) { - case 'unsplash': - case 'pexels': - result = data || []; - break; - case 'pixabay': - result = data[key] && data[key][0] ? data[key][0] : []; - break; - } - return result; -} - -/***/ }), - -/***/ "./src/js/functions/helpers.js": -/*!*************************************!*\ - !*** ./src/js/functions/helpers.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ capitalizeFirstLetter: () => (/* binding */ capitalizeFirstLetter), -/* harmony export */ checkRateLimit: () => (/* binding */ checkRateLimit), -/* harmony export */ gotoURL: () => (/* binding */ gotoURL), -/* harmony export */ hideTooltip: () => (/* binding */ hideTooltip), -/* harmony export */ isObjectEmpty: () => (/* binding */ isObjectEmpty), -/* harmony export */ md5Hash: () => (/* binding */ md5Hash), -/* harmony export */ showTooltip: () => (/* binding */ showTooltip) -/* harmony export */ }); -/* harmony import */ var crypto_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! crypto-js */ "./node_modules/crypto-js/index.js"); -/* harmony import */ var crypto_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(crypto_js__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Get the MD5 hash value of a URL. - * - * @param {string} url The API URL to hash. - * @return {string} The MD5 hash. - */ -function md5Hash(url) { - return crypto_js__WEBPACK_IMPORTED_MODULE_0___default().MD5(url).toString(); -} - -/** - * Check if an object is empty. - * - * @param {Object} obj The object to test against. - * @return {boolean} Is this an object. - */ -function isObjectEmpty(obj) { - if (obj === null || obj === undefined) { - return true; - } - return Object.keys(obj).length === 0; -} - -/** - * Check the `x-ratelimit-remaining` headers to confirm the API is available. - * - * @param {Object} headers The request headers object. - */ -function checkRateLimit(headers) { - if (!headers) { - return; - } - var limit = headers.get('X-RateLimit-Limit') || -1; - var remaining = headers.get('X-RateLimit-Remaining') || -1; - if (limit > -1 && parseInt(remaining) < 2) { - alert(instant_img_localize.api_ratelimit_msg); // eslint-disable-line - } -} - -/** - * Capitalize the first letter of a string. - * - * @param {string} str The string to format. - * @return {string} The formatted string. - */ -function capitalizeFirstLetter(str) { - return str.charAt(0).toUpperCase() + str.slice(1); -} -var tooltipInterval = ''; - -/** - * Show the tooltip. - * - * @param {Event} e The target tooltip element. - * @since 4.3.0 - */ -function showTooltip(e) { - var target = e.currentTarget; - var rect = target.getBoundingClientRect(); - var left = Math.round(rect.left); - var top = Math.round(rect.top); - var container = target.closest('#photo-listing'); - var tooltip = container.querySelector('#tooltip'); - tooltip.classList.remove('over'); - if (target.classList.contains('tooltip--above')) { - tooltip.classList.add('above'); - } else { - tooltip.classList.remove('above'); - } - - // Delay Tooltip Reveal. - tooltipInterval = setInterval(function () { - clearInterval(tooltipInterval); - tooltip.innerHTML = target.dataset.title; // Tooltip content. - - // Position Tooltip. - left = left - tooltip.offsetWidth + target.offsetWidth + 5; - tooltip.style.left = "".concat(left, "px"); - tooltip.style.top = "".concat(top, "px"); - setTimeout(function () { - tooltip.classList.add('over'); - }, 25); - }, 750); -} - -/** - * Hide the tooltip. - * - * @param {Event} e The target tooltip element. - * @since 4.3.0 - */ -function hideTooltip(e) { - clearInterval(tooltipInterval); - var container = e.currentTarget.closest('#photo-listing'); - var tooltip = container.querySelector('#tooltip'); - tooltip.classList.remove('over'); -} - -/** - * Open the URL in new window. - * - * @param {string} url The destination URL. - */ -function gotoURL(url) { - if (url && window) { - window.open(url, '_blank'); - } -} - -/***/ }), - -/***/ "./src/js/functions/localStorage.js": -/*!******************************************!*\ - !*** ./src/js/functions/localStorage.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ clearSearchHistory: () => (/* binding */ clearSearchHistory), -/* harmony export */ getSearchHistory: () => (/* binding */ getSearchHistory), -/* harmony export */ getSetting: () => (/* binding */ getSetting), -/* harmony export */ saveSearchHistory: () => (/* binding */ saveSearchHistory), -/* harmony export */ saveSettings: () => (/* binding */ saveSettings) -/* harmony export */ }); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -var searchName = 'instant-images-recent-searches'; -var settingsName = 'instant-images-settings'; -var most = 10; - -/** - * Save search value to localstorage. - * - * @param {string} term The search term. - */ -function saveSearchHistory(term) { - if (term && term.toLowerCase().includes('id:')) { - return; // Don't index string with `id:` - } - var recent = getSearchHistory(); - if (!recent) { - localStorage.setItem(searchName, JSON.stringify([term])); - return; - } - - // Find duplicates. - var duplicate = recent.indexOf(term); - if (duplicate > -1) { - recent.splice(duplicate, 1); - } - - // Limit to 6 items. - if (recent.length >= most) { - recent.length = most; - } - - // Add new term to the beginning of the array. - recent.unshift(term); - localStorage.setItem(searchName, JSON.stringify(recent)); -} - -/** - * Get the search history from localstorage. - * - * @return {Array} The search history. - */ -function getSearchHistory() { - var history = localStorage.getItem(searchName); - if (!history) { - return []; - } - return JSON.parse(localStorage.getItem(searchName)); -} - -/** - * Clear search history. - */ -function clearSearchHistory() { - localStorage.removeItem(searchName); -} - -/** - * Save generic setting to localstorage as an key/value object pair. - * - * @param {string} key The object key. - * @param {value} value The object value. - */ -function saveSettings(key, value) { - var settings = localStorage.getItem(settingsName); - var setting = _defineProperty({}, key, value); - if (!settings) { - localStorage.setItem(settingsName, JSON.stringify(setting)); - } else { - var parsed = JSON.parse(settings); - parsed[key] = value; - localStorage.setItem(settingsName, JSON.stringify(parsed)); - } -} - -/** - * Get an individual setting from local storage. - * - * @param {string} key The stoarge key. - * @return {string|boolean} The storage value. - */ -function getSetting(key) { - var settings = localStorage.getItem(settingsName); - if (!settings) { - return false; - } - var parsed = JSON.parse(settings); - return parsed[key] ? parsed[key] : false; -} - -/***/ }), - -/***/ "./src/js/functions/providers/openverse.js": -/*!*************************************************!*\ - !*** ./src/js/functions/providers/openverse.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ openverseParams: () => (/* binding */ openverseParams) -/* harmony export */ }); -/* harmony import */ var _constants_filters_openverse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../constants/filters/openverse */ "./src/js/constants/filters/openverse.js"); - - -/** - * Format the params for Openverse. - * - * @param {string} type Query type (search, photos, id). - * @param {Object} params Query params object. - * @return {Object} Updated params. - */ -function openverseParams(type, params) { - if (type === 'photos' && !params.source) { - params.source = 'wordpress'; // Add `wordpress` as the default openverse `source`. - } - if (type === 'search') { - // Include these sources only. - var sources = _constants_filters_openverse__WEBPACK_IMPORTED_MODULE_0__.OPENVERSE_SOURCES.map(function (source) { - return source.value; - }).toString(); // e.g. `wordpress,flickr,nasa,spacex,wikimedia` - params.source = sources; - } - return params; -} - -/***/ }), - -/***/ "./src/js/functions/providers/unsplash.js": -/*!************************************************!*\ - !*** ./src/js/functions/providers/unsplash.js ***! - \************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ unsplashDownload: () => (/* binding */ unsplashDownload) -/* harmony export */ }); -/* harmony import */ var _buildURL__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../buildURL */ "./src/js/functions/buildURL.js"); -/* harmony import */ var _getQueryParams__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../getQueryParams */ "./src/js/functions/getQueryParams.js"); - - - -/** - * Function to trigger an image download at unsplash.com. - * Note: This is used to give authors download credits and nothing more. - * - * @see https://help.unsplash.com/en/articles/2511258-guideline-triggering-a-download - * - * @param {string} download_url The URL to trigger a download. - * @since 3.1 - */ -function unsplashDownload(download_url) { - var params = (0,_getQueryParams__WEBPACK_IMPORTED_MODULE_1__.getAuth)({}, 'unsplash'); - params.download_url = download_url; // Append download URL to query params. - var url = (0,_buildURL__WEBPACK_IMPORTED_MODULE_0__["default"])('photos', params); - fetch(url).then(function (data) { - return data.json(); - }).then(function () { - // Success, nothing else happens here - console.log('Image download successsfully triggered at Unsplash.'); // eslint-disable-line no-console - })["catch"](function (error) { - console.warn(error); - }); -} - -/***/ }), - -/***/ "./src/js/functions/session.js": -/*!*************************************!*\ - !*** ./src/js/functions/session.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ deleteSession: () => (/* binding */ deleteSession), -/* harmony export */ getSession: () => (/* binding */ getSession), -/* harmony export */ saveSession: () => (/* binding */ saveSession) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "./src/js/functions/helpers.js"); - - - -/** - * Get results from session storage by URL. - * - * @param {string} url The API URL. - * @return {Array|boolean} Session results. - */ -function getSession(url) { - if (!url || _constants_API__WEBPACK_IMPORTED_MODULE_0__.API.testmode) { - return false; // Exit if no URL or test m ode is enabled. - } - var session = sessionStorage.getItem((0,_helpers__WEBPACK_IMPORTED_MODULE_1__.md5Hash)(url)); - if (!session) { - return false; // Exit if no session data. - } - var data = JSON.parse(session); - var _data$expires = data.expires, - expires = _data$expires === void 0 ? 0 : _data$expires, - _data$error = data.error, - error = _data$error === void 0 ? null : _data$error; - if (error) { - return false; // Exit if session data has error entry. - } - - // Check if expiration time has passed. - var expired = Date.now() > expires; - - // Delete session data when expired. - if (expired) { - deleteSession(url); - } - return data && !expired ? data : false; -} - -/** - * Save API data to session storage by URL. - * - * @param {string} url Save results to session by URL. - * @param {Array} results The API results. - */ -function saveSession(url, results) { - if (!url || !results || results !== null && results !== void 0 && results.error) { - return false; - } - - // Set expiration to 2 hours. - results.expires = Date.now() + 7200000; - - // Save session data. - sessionStorage.setItem((0,_helpers__WEBPACK_IMPORTED_MODULE_1__.md5Hash)(url), JSON.stringify(results)); -} - -/** - * Remove/delete session storage by URL. - * - * @param {string} url The API URL. - */ -function deleteSession(url) { - if (!url) { - return false; - } - sessionStorage.removeItem((0,_helpers__WEBPACK_IMPORTED_MODULE_1__.md5Hash)(url)); -} - -/***/ }), - -/***/ "./src/js/functions/updatePluginSetting.js": -/*!*************************************************!*\ - !*** ./src/js/functions/updatePluginSetting.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ updatePluginSetting) -/* harmony export */ }); -/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js"); - - -/** - * Update plugin settings by specific key/value pair. - * - * @param {string} setting The previous provider. - * @param {string} value The value to save. - */ -function updatePluginSetting(setting, value) { - var _instant_img_localize; - var api = ((_instant_img_localize = instant_img_localize) === null || _instant_img_localize === void 0 ? void 0 : _instant_img_localize.root) + 'instant-images/settings/'; // eslint-disable-line no-undef - - var params = { - setting: setting, - value: value - }; - var config = { - headers: { - 'X-WP-Nonce': instant_img_localize.nonce, - // eslint-disable-line no-undef - 'Content-Type': 'application/json' - } - }; - axios__WEBPACK_IMPORTED_MODULE_0__["default"].post(api, JSON.stringify(params), config).then(function () {})["catch"](function (error) { - console.warn(error); - }); -} - -/***/ }), - -/***/ "./src/js/hooks/useArrowControls.js": -/*!******************************************!*\ - !*** ./src/js/hooks/useArrowControls.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ useArrowControls: () => (/* binding */ useArrowControls) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } -function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } - - -/** - * Detect up and down arrow presses. - * - * @param {boolean} active Is the element currently active. - * @param {Object} ref The container ref to select the focusable elements. - */ -function useArrowControls(active, ref) { - var focusedRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(active); - - /** - * Add event listener for arrow keys. - * - * @param {KeyboardEvent} e The event. - */ - function arrowHandler(e) { - var key = e.key; - if (focusedRef !== null && focusedRef !== void 0 && focusedRef.current && ref !== null && ref !== void 0 && ref.current) { - var focusable = ref === null || ref === void 0 ? void 0 : ref.current.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), input'); - if (!(focusable !== null && focusable !== void 0 && focusable.length)) { - // Exit if no focusable elements. - return; - } - var first = focusable[0]; - var last = focusable[focusable.length - 1]; - var _active = document.activeElement; // eslint-disable-line - var activeIndex = _toConsumableArray(focusable).indexOf(_active); - - // Up arrow. - if (key === 'ArrowUp') { - e.preventDefault(); - if (activeIndex === 0) { - last.focus({ - preventScroll: true - }); - } else { - focusable[activeIndex - 1].focus({ - preventScroll: true - }); - } - } - // Down Arrow - if (key === 'ArrowDown') { - e.preventDefault(); - if (activeIndex === focusable.length - 1 || activeIndex === -1) { - first.focus({ - preventScroll: true - }); - } else { - focusable[activeIndex + 1].focus({ - preventScroll: true - }); - } - } - } - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - focusedRef.current = active; - }, [active]); - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - document.addEventListener('keydown', arrowHandler, false); - return function () { - // Dispose of events. - document.removeEventListener('keydown', arrowHandler, false); - }; - }, []); // eslint-disable-line react-hooks/exhaustive-deps -} - -/***/ }), - -/***/ "./src/js/hooks/useClickOutside.js": -/*!*****************************************!*\ - !*** ./src/js/hooks/useClickOutside.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ useClickOutside: () => (/* binding */ useClickOutside) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Detect clicks outside of ref. - * - * @param {Object} ref React ref. - * @param {Function} onClickOutside Function to invoke when clicked outside. - */ -function useClickOutside(ref, onClickOutside) { - /** - * Escape handler. - * - * @param {Event} e The key press event. - */ - function escapeClick(e) { - var key = e.key; - if (key === 'Escape') { - onClickOutside(); - } - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - /** - * Invoke Function onClick outside of element - * - * @param {Event} event The event object. - */ - function handleClickOutside(event) { - if (ref.current && !ref.current.contains(event.target)) { - onClickOutside(); - } - } - - // Bind events. - document.addEventListener('mousedown', handleClickOutside); - document.addEventListener('keyup', handleClickOutside); - document.addEventListener('keydown', escapeClick, false); - return function () { - // Dispose of events. - document.removeEventListener('mousedown', handleClickOutside); - document.removeEventListener('keyup', handleClickOutside); - document.removeEventListener('keydown', escapeClick, false); - }; - }, [ref, onClickOutside]); //eslint-disable-line react-hooks/exhaustive-deps -} - -/***/ }), - -/***/ "./src/js/index.js": -/*!*************************!*\ - !*** ./src/js/index.js ***! - \*************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _components_InstantImages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/InstantImages */ "./src/js/components/InstantImages.js"); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _functions_buildURL__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./functions/buildURL */ "./src/js/functions/buildURL.js"); -/* harmony import */ var _functions_consoleStatus__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./functions/consoleStatus */ "./src/js/functions/consoleStatus.js"); -/* harmony import */ var _functions_getProvider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./functions/getProvider */ "./src/js/functions/getProvider.js"); -/* harmony import */ var _functions_getQueryParams__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./functions/getQueryParams */ "./src/js/functions/getQueryParams.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _functions_session__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./functions/session */ "./src/js/functions/session.js"); -/* harmony import */ var _scss_style_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../scss/style.scss */ "./src/scss/style.scss"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } -function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } - - - - - - - - - - - -// Get provider from settings. -var defaultProvider = (0,_functions_getProvider__WEBPACK_IMPORTED_MODULE_5__["default"])(); - -/** - * Get the initial set of photos. - * - * @param {string} provider The current service provider. - */ -function getImages() { - var provider = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _constants_API__WEBPACK_IMPORTED_MODULE_2__.API.defaults.provider; - // Build URL. - var params = (0,_functions_getQueryParams__WEBPACK_IMPORTED_MODULE_6__["default"])(provider); - var url = (0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_3__["default"])('photos', params); - function initialize() { - return _initialize.apply(this, arguments); - } - function _initialize() { - _initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() { - var app, sessionData, root, response, status, headers, results, _results$error, error, _root; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - app = document.getElementById('app'); - if (!app) { - _context.next = 25; - break; - } - // Get session storage. - sessionData = (0,_functions_session__WEBPACK_IMPORTED_MODULE_8__.getSession)(url); - if (!sessionData) { - _context.next = 7; - break; - } - // Display results from session. - if (_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createRoot) { - root = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createRoot)(app); - root.render(/*#__PURE__*/React.createElement(_components_InstantImages__WEBPACK_IMPORTED_MODULE_1__["default"], { - editor: "classic", - data: sessionData, - container: app, - provider: provider, - api_error: null - })); - } else { - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)(/*#__PURE__*/React.createElement(_components_InstantImages__WEBPACK_IMPORTED_MODULE_1__["default"], { - editor: "classic", - data: sessionData, - container: app, - provider: provider, - api_error: null - }), app); - } - _context.next = 25; - break; - case 7: - _context.next = 9; - return fetch(url); - case 9: - response = _context.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_7__.checkRateLimit)(headers); - _context.prev = 12; - _context.next = 15; - return response.json(); - case 15: - results = _context.sent; - _results$error = results.error, error = _results$error === void 0 ? null : _results$error; - if (_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createRoot) { - _root = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createRoot)(app); - _root.render(/*#__PURE__*/React.createElement(_components_InstantImages__WEBPACK_IMPORTED_MODULE_1__["default"], { - editor: "classic", - data: results, - container: app, - provider: provider, - api_error: error - })); - } else { - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)(/*#__PURE__*/React.createElement(_components_InstantImages__WEBPACK_IMPORTED_MODULE_1__["default"], { - editor: "classic", - data: results, - container: app, - provider: provider, - api_error: error - }), app); - } - (0,_functions_session__WEBPACK_IMPORTED_MODULE_8__.saveSession)(url, results); - _context.next = 25; - break; - case 21: - _context.prev = 21; - _context.t0 = _context["catch"](12); - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_4__["default"])(provider, status); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_8__.deleteSession)(url); - case 25: - case "end": - return _context.stop(); - } - }, _callee, null, [[12, 21]]); - })); - return _initialize.apply(this, arguments); - } - initialize(); -} - -/** - * Dispatch an initial fetch request to confirm the default API key is valid. - */ -_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { - return _regeneratorRuntime().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - getImages(defaultProvider); - case 1: - case "end": - return _context2.stop(); - } - }, _callee2); -}))(); - -/***/ }), - -/***/ "./node_modules/crypto-js/aes.js": -/*!***************************************!*\ - !*** ./node_modules/crypto-js/aes.js ***! - \***************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - // Lookup tables - var SBOX = []; - var INV_SBOX = []; - var SUB_MIX_0 = []; - var SUB_MIX_1 = []; - var SUB_MIX_2 = []; - var SUB_MIX_3 = []; - var INV_SUB_MIX_0 = []; - var INV_SUB_MIX_1 = []; - var INV_SUB_MIX_2 = []; - var INV_SUB_MIX_3 = []; - - // Compute lookup tables - (function () { - // Compute double table - var d = []; - for (var i = 0; i < 256; i++) { - if (i < 128) { - d[i] = i << 1; - } else { - d[i] = (i << 1) ^ 0x11b; - } - } - - // Walk GF(2^8) - var x = 0; - var xi = 0; - for (var i = 0; i < 256; i++) { - // Compute sbox - var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); - sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; - SBOX[x] = sx; - INV_SBOX[sx] = x; - - // Compute multiplication - var x2 = d[x]; - var x4 = d[x2]; - var x8 = d[x4]; - - // Compute sub bytes, mix columns tables - var t = (d[sx] * 0x101) ^ (sx * 0x1010100); - SUB_MIX_0[x] = (t << 24) | (t >>> 8); - SUB_MIX_1[x] = (t << 16) | (t >>> 16); - SUB_MIX_2[x] = (t << 8) | (t >>> 24); - SUB_MIX_3[x] = t; - - // Compute inv sub bytes, inv mix columns tables - var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); - INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); - INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); - INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); - INV_SUB_MIX_3[sx] = t; - - // Compute next counter - if (!x) { - x = xi = 1; - } else { - x = x2 ^ d[d[d[x8 ^ x2]]]; - xi ^= d[d[xi]]; - } - } - }()); - - // Precomputed Rcon lookup - var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; - - /** - * AES block cipher algorithm. - */ - var AES = C_algo.AES = BlockCipher.extend({ - _doReset: function () { - var t; - - // Skip reset of nRounds has been set before and key did not change - if (this._nRounds && this._keyPriorReset === this._key) { - return; - } - - // Shortcuts - var key = this._keyPriorReset = this._key; - var keyWords = key.words; - var keySize = key.sigBytes / 4; - - // Compute number of rounds - var nRounds = this._nRounds = keySize + 6; - - // Compute number of key schedule rows - var ksRows = (nRounds + 1) * 4; - - // Compute key schedule - var keySchedule = this._keySchedule = []; - for (var ksRow = 0; ksRow < ksRows; ksRow++) { - if (ksRow < keySize) { - keySchedule[ksRow] = keyWords[ksRow]; - } else { - t = keySchedule[ksRow - 1]; - - if (!(ksRow % keySize)) { - // Rot word - t = (t << 8) | (t >>> 24); - - // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; - - // Mix Rcon - t ^= RCON[(ksRow / keySize) | 0] << 24; - } else if (keySize > 6 && ksRow % keySize == 4) { - // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; - } - - keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; - } - } - - // Compute inv key schedule - var invKeySchedule = this._invKeySchedule = []; - for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { - var ksRow = ksRows - invKsRow; - - if (invKsRow % 4) { - var t = keySchedule[ksRow]; - } else { - var t = keySchedule[ksRow - 4]; - } - - if (invKsRow < 4 || ksRow <= 4) { - invKeySchedule[invKsRow] = t; - } else { - invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ - INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; - } - } - }, - - encryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); - }, - - decryptBlock: function (M, offset) { - // Swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; - - this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); - - // Inv swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; - }, - - _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { - // Shortcut - var nRounds = this._nRounds; - - // Get input, add round key - var s0 = M[offset] ^ keySchedule[0]; - var s1 = M[offset + 1] ^ keySchedule[1]; - var s2 = M[offset + 2] ^ keySchedule[2]; - var s3 = M[offset + 3] ^ keySchedule[3]; - - // Key schedule row counter - var ksRow = 4; - - // Rounds - for (var round = 1; round < nRounds; round++) { - // Shift rows, sub bytes, mix columns, add round key - var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; - var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; - var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; - var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; - - // Update state - s0 = t0; - s1 = t1; - s2 = t2; - s3 = t3; - } - - // Shift rows, sub bytes, add round key - var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; - var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; - var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; - var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; - - // Set output - M[offset] = t0; - M[offset + 1] = t1; - M[offset + 2] = t2; - M[offset + 3] = t3; - }, - - keySize: 256/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); - */ - C.AES = BlockCipher._createHelper(AES); - }()); - - - return CryptoJS.AES; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/blowfish.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/blowfish.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - const N = 16; - - //Origin pbox and sbox, derived from PI - const ORIG_P = [ - 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, - 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89, - 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C, - 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917, - 0x9216D5D9, 0x8979FB1B - ]; - - const ORIG_S = [ - [ 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7, - 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99, - 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16, - 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E, - 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE, - 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013, - 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF, - 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E, - 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60, - 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440, - 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE, - 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A, - 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E, - 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677, - 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193, - 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032, - 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88, - 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239, - 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E, - 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0, - 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3, - 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98, - 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88, - 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE, - 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6, - 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D, - 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B, - 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7, - 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA, - 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463, - 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F, - 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09, - 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3, - 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB, - 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279, - 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8, - 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB, - 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82, - 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB, - 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573, - 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0, - 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B, - 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790, - 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8, - 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4, - 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0, - 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7, - 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C, - 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD, - 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1, - 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299, - 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9, - 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477, - 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF, - 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49, - 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF, - 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA, - 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5, - 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41, - 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915, - 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400, - 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915, - 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664, - 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A ], - [ 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623, - 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266, - 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1, - 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E, - 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6, - 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1, - 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E, - 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1, - 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737, - 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8, - 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF, - 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD, - 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701, - 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7, - 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41, - 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331, - 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF, - 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF, - 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E, - 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87, - 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C, - 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2, - 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16, - 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD, - 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B, - 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509, - 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E, - 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3, - 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F, - 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A, - 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4, - 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960, - 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66, - 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28, - 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802, - 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84, - 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510, - 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF, - 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14, - 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E, - 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50, - 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7, - 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8, - 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281, - 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99, - 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696, - 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128, - 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73, - 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0, - 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0, - 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105, - 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250, - 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3, - 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285, - 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00, - 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061, - 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB, - 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E, - 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735, - 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC, - 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9, - 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340, - 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20, - 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7 ], - [ 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934, - 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068, - 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF, - 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840, - 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45, - 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504, - 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A, - 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB, - 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE, - 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6, - 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42, - 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B, - 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2, - 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB, - 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527, - 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B, - 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33, - 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C, - 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3, - 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC, - 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17, - 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564, - 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B, - 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115, - 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922, - 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728, - 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0, - 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E, - 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37, - 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D, - 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804, - 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B, - 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3, - 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB, - 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D, - 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C, - 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350, - 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9, - 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A, - 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE, - 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D, - 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC, - 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F, - 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61, - 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2, - 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9, - 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2, - 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C, - 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E, - 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633, - 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10, - 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169, - 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52, - 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027, - 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5, - 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62, - 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634, - 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76, - 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24, - 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC, - 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4, - 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C, - 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837, - 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0 ], - [ 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B, - 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE, - 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B, - 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4, - 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8, - 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6, - 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304, - 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22, - 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4, - 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6, - 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9, - 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59, - 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593, - 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51, - 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28, - 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C, - 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B, - 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28, - 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C, - 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD, - 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A, - 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319, - 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB, - 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F, - 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991, - 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32, - 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680, - 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166, - 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE, - 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB, - 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5, - 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47, - 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370, - 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D, - 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84, - 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048, - 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8, - 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD, - 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9, - 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7, - 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38, - 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F, - 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C, - 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525, - 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1, - 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442, - 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964, - 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E, - 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8, - 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D, - 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F, - 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299, - 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02, - 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC, - 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614, - 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A, - 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6, - 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B, - 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0, - 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060, - 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E, - 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9, - 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F, - 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6 ] - ]; - - var BLOWFISH_CTX = { - pbox: [], - sbox: [] - } - - function F(ctx, x){ - let a = (x >> 24) & 0xFF; - let b = (x >> 16) & 0xFF; - let c = (x >> 8) & 0xFF; - let d = x & 0xFF; - - let y = ctx.sbox[0][a] + ctx.sbox[1][b]; - y = y ^ ctx.sbox[2][c]; - y = y + ctx.sbox[3][d]; - - return y; - } - - function BlowFish_Encrypt(ctx, left, right){ - let Xl = left; - let Xr = right; - let temp; - - for(let i = 0; i < N; ++i){ - Xl = Xl ^ ctx.pbox[i]; - Xr = F(ctx, Xl) ^ Xr; - - temp = Xl; - Xl = Xr; - Xr = temp; - } - - temp = Xl; - Xl = Xr; - Xr = temp; - - Xr = Xr ^ ctx.pbox[N]; - Xl = Xl ^ ctx.pbox[N + 1]; - - return {left: Xl, right: Xr}; - } - - function BlowFish_Decrypt(ctx, left, right){ - let Xl = left; - let Xr = right; - let temp; - - for(let i = N + 1; i > 1; --i){ - Xl = Xl ^ ctx.pbox[i]; - Xr = F(ctx, Xl) ^ Xr; - - temp = Xl; - Xl = Xr; - Xr = temp; - } - - temp = Xl; - Xl = Xr; - Xr = temp; - - Xr = Xr ^ ctx.pbox[1]; - Xl = Xl ^ ctx.pbox[0]; - - return {left: Xl, right: Xr}; - } - - /** - * Initialization ctx's pbox and sbox. - * - * @param {Object} ctx The object has pbox and sbox. - * @param {Array} key An array of 32-bit words. - * @param {int} keysize The length of the key. - * - * @example - * - * BlowFishInit(BLOWFISH_CTX, key, 128/32); - */ - function BlowFishInit(ctx, key, keysize) - { - for(let Row = 0; Row < 4; Row++) - { - ctx.sbox[Row] = []; - for(let Col = 0; Col < 256; Col++) - { - ctx.sbox[Row][Col] = ORIG_S[Row][Col]; - } - } - - let keyIndex = 0; - for(let index = 0; index < N + 2; index++) - { - ctx.pbox[index] = ORIG_P[index] ^ key[keyIndex]; - keyIndex++; - if(keyIndex >= keysize) - { - keyIndex = 0; - } - } - - let Data1 = 0; - let Data2 = 0; - let res = 0; - for(let i = 0; i < N + 2; i += 2) - { - res = BlowFish_Encrypt(ctx, Data1, Data2); - Data1 = res.left; - Data2 = res.right; - ctx.pbox[i] = Data1; - ctx.pbox[i + 1] = Data2; - } - - for(let i = 0; i < 4; i++) - { - for(let j = 0; j < 256; j += 2) - { - res = BlowFish_Encrypt(ctx, Data1, Data2); - Data1 = res.left; - Data2 = res.right; - ctx.sbox[i][j] = Data1; - ctx.sbox[i][j + 1] = Data2; - } - } - - return true; - } - - /** - * Blowfish block cipher algorithm. - */ - var Blowfish = C_algo.Blowfish = BlockCipher.extend({ - _doReset: function () { - // Skip reset of nRounds has been set before and key did not change - if (this._keyPriorReset === this._key) { - return; - } - - // Shortcuts - var key = this._keyPriorReset = this._key; - var keyWords = key.words; - var keySize = key.sigBytes / 4; - - //Initialization pbox and sbox - BlowFishInit(BLOWFISH_CTX, keyWords, keySize); - }, - - encryptBlock: function (M, offset) { - var res = BlowFish_Encrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); - M[offset] = res.left; - M[offset + 1] = res.right; - }, - - decryptBlock: function (M, offset) { - var res = BlowFish_Decrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); - M[offset] = res.left; - M[offset + 1] = res.right; - }, - - blockSize: 64/32, - - keySize: 128/32, - - ivSize: 64/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.Blowfish.encrypt(message, key, cfg); - * var plaintext = CryptoJS.Blowfish.decrypt(ciphertext, key, cfg); - */ - C.Blowfish = BlockCipher._createHelper(Blowfish); - }()); - - - return CryptoJS.Blowfish; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/cipher-core.js": -/*!***********************************************!*\ - !*** ./node_modules/crypto-js/cipher-core.js ***! - \***********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Cipher core components. - */ - CryptoJS.lib.Cipher || (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var Base64 = C_enc.Base64; - var C_algo = C.algo; - var EvpKDF = C_algo.EvpKDF; - - /** - * Abstract base cipher template. - * - * @property {number} keySize This cipher's key size. Default: 4 (128 bits) - * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) - * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. - * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. - */ - var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ - /** - * Configuration options. - * - * @property {WordArray} iv The IV to use for this operation. - */ - cfg: Base.extend(), - - /** - * Creates this cipher in encryption mode. - * - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {Cipher} A cipher instance. - * - * @static - * - * @example - * - * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); - */ - createEncryptor: function (key, cfg) { - return this.create(this._ENC_XFORM_MODE, key, cfg); - }, - - /** - * Creates this cipher in decryption mode. - * - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {Cipher} A cipher instance. - * - * @static - * - * @example - * - * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); - */ - createDecryptor: function (key, cfg) { - return this.create(this._DEC_XFORM_MODE, key, cfg); - }, - - /** - * Initializes a newly created cipher. - * - * @param {number} xformMode Either the encryption or decryption transormation mode constant. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @example - * - * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); - */ - init: function (xformMode, key, cfg) { - // Apply config defaults - this.cfg = this.cfg.extend(cfg); - - // Store transform mode and key - this._xformMode = xformMode; - this._key = key; - - // Set initial values - this.reset(); - }, - - /** - * Resets this cipher to its initial state. - * - * @example - * - * cipher.reset(); - */ - reset: function () { - // Reset data buffer - BufferedBlockAlgorithm.reset.call(this); - - // Perform concrete-cipher logic - this._doReset(); - }, - - /** - * Adds data to be encrypted or decrypted. - * - * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. - * - * @return {WordArray} The data after processing. - * - * @example - * - * var encrypted = cipher.process('data'); - * var encrypted = cipher.process(wordArray); - */ - process: function (dataUpdate) { - // Append - this._append(dataUpdate); - - // Process available blocks - return this._process(); - }, - - /** - * Finalizes the encryption or decryption process. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. - * - * @return {WordArray} The data after final processing. - * - * @example - * - * var encrypted = cipher.finalize(); - * var encrypted = cipher.finalize('data'); - * var encrypted = cipher.finalize(wordArray); - */ - finalize: function (dataUpdate) { - // Final data update - if (dataUpdate) { - this._append(dataUpdate); - } - - // Perform concrete-cipher logic - var finalProcessedData = this._doFinalize(); - - return finalProcessedData; - }, - - keySize: 128/32, - - ivSize: 128/32, - - _ENC_XFORM_MODE: 1, - - _DEC_XFORM_MODE: 2, - - /** - * Creates shortcut functions to a cipher's object interface. - * - * @param {Cipher} cipher The cipher to create a helper for. - * - * @return {Object} An object with encrypt and decrypt shortcut functions. - * - * @static - * - * @example - * - * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); - */ - _createHelper: (function () { - function selectCipherStrategy(key) { - if (typeof key == 'string') { - return PasswordBasedCipher; - } else { - return SerializableCipher; - } - } - - return function (cipher) { - return { - encrypt: function (message, key, cfg) { - return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); - }, - - decrypt: function (ciphertext, key, cfg) { - return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); - } - }; - }; - }()) - }); - - /** - * Abstract base stream cipher template. - * - * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) - */ - var StreamCipher = C_lib.StreamCipher = Cipher.extend({ - _doFinalize: function () { - // Process partial blocks - var finalProcessedBlocks = this._process(!!'flush'); - - return finalProcessedBlocks; - }, - - blockSize: 1 - }); - - /** - * Mode namespace. - */ - var C_mode = C.mode = {}; - - /** - * Abstract base block cipher mode template. - */ - var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ - /** - * Creates this mode for encryption. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @static - * - * @example - * - * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); - */ - createEncryptor: function (cipher, iv) { - return this.Encryptor.create(cipher, iv); - }, - - /** - * Creates this mode for decryption. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @static - * - * @example - * - * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); - */ - createDecryptor: function (cipher, iv) { - return this.Decryptor.create(cipher, iv); - }, - - /** - * Initializes a newly created mode. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @example - * - * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); - */ - init: function (cipher, iv) { - this._cipher = cipher; - this._iv = iv; - } - }); - - /** - * Cipher Block Chaining mode. - */ - var CBC = C_mode.CBC = (function () { - /** - * Abstract base CBC mode. - */ - var CBC = BlockCipherMode.extend(); - - /** - * CBC encryptor. - */ - CBC.Encryptor = CBC.extend({ - /** - * Processes the data block at offset. - * - * @param {Array} words The data words to operate on. - * @param {number} offset The offset where the block starts. - * - * @example - * - * mode.processBlock(data.words, offset); - */ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // XOR and encrypt - xorBlock.call(this, words, offset, blockSize); - cipher.encryptBlock(words, offset); - - // Remember this block to use with next block - this._prevBlock = words.slice(offset, offset + blockSize); - } - }); - - /** - * CBC decryptor. - */ - CBC.Decryptor = CBC.extend({ - /** - * Processes the data block at offset. - * - * @param {Array} words The data words to operate on. - * @param {number} offset The offset where the block starts. - * - * @example - * - * mode.processBlock(data.words, offset); - */ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // Remember this block to use with next block - var thisBlock = words.slice(offset, offset + blockSize); - - // Decrypt and XOR - cipher.decryptBlock(words, offset); - xorBlock.call(this, words, offset, blockSize); - - // This block becomes the previous block - this._prevBlock = thisBlock; - } - }); - - function xorBlock(words, offset, blockSize) { - var block; - - // Shortcut - var iv = this._iv; - - // Choose mixing block - if (iv) { - block = iv; - - // Remove IV for subsequent blocks - this._iv = undefined; - } else { - block = this._prevBlock; - } - - // XOR blocks - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= block[i]; - } - } - - return CBC; - }()); - - /** - * Padding namespace. - */ - var C_pad = C.pad = {}; - - /** - * PKCS #5/7 padding strategy. - */ - var Pkcs7 = C_pad.Pkcs7 = { - /** - * Pads data using the algorithm defined in PKCS #5/7. - * - * @param {WordArray} data The data to pad. - * @param {number} blockSize The multiple that the data should be padded to. - * - * @static - * - * @example - * - * CryptoJS.pad.Pkcs7.pad(wordArray, 4); - */ - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - - // Create padding word - var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; - - // Create padding - var paddingWords = []; - for (var i = 0; i < nPaddingBytes; i += 4) { - paddingWords.push(paddingWord); - } - var padding = WordArray.create(paddingWords, nPaddingBytes); - - // Add padding - data.concat(padding); - }, - - /** - * Unpads data that had been padded using the algorithm defined in PKCS #5/7. - * - * @param {WordArray} data The data to unpad. - * - * @static - * - * @example - * - * CryptoJS.pad.Pkcs7.unpad(wordArray); - */ - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - /** - * Abstract base block cipher template. - * - * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) - */ - var BlockCipher = C_lib.BlockCipher = Cipher.extend({ - /** - * Configuration options. - * - * @property {Mode} mode The block mode to use. Default: CBC - * @property {Padding} padding The padding strategy to use. Default: Pkcs7 - */ - cfg: Cipher.cfg.extend({ - mode: CBC, - padding: Pkcs7 - }), - - reset: function () { - var modeCreator; - - // Reset cipher - Cipher.reset.call(this); - - // Shortcuts - var cfg = this.cfg; - var iv = cfg.iv; - var mode = cfg.mode; - - // Reset block mode - if (this._xformMode == this._ENC_XFORM_MODE) { - modeCreator = mode.createEncryptor; - } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { - modeCreator = mode.createDecryptor; - // Keep at least one block in the buffer for unpadding - this._minBufferSize = 1; - } - - if (this._mode && this._mode.__creator == modeCreator) { - this._mode.init(this, iv && iv.words); - } else { - this._mode = modeCreator.call(mode, this, iv && iv.words); - this._mode.__creator = modeCreator; - } - }, - - _doProcessBlock: function (words, offset) { - this._mode.processBlock(words, offset); - }, - - _doFinalize: function () { - var finalProcessedBlocks; - - // Shortcut - var padding = this.cfg.padding; - - // Finalize - if (this._xformMode == this._ENC_XFORM_MODE) { - // Pad data - padding.pad(this._data, this.blockSize); - - // Process final blocks - finalProcessedBlocks = this._process(!!'flush'); - } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { - // Process final blocks - finalProcessedBlocks = this._process(!!'flush'); - - // Unpad data - padding.unpad(finalProcessedBlocks); - } - - return finalProcessedBlocks; - }, - - blockSize: 128/32 - }); - - /** - * A collection of cipher parameters. - * - * @property {WordArray} ciphertext The raw ciphertext. - * @property {WordArray} key The key to this ciphertext. - * @property {WordArray} iv The IV used in the ciphering operation. - * @property {WordArray} salt The salt used with a key derivation function. - * @property {Cipher} algorithm The cipher algorithm. - * @property {Mode} mode The block mode used in the ciphering operation. - * @property {Padding} padding The padding scheme used in the ciphering operation. - * @property {number} blockSize The block size of the cipher. - * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. - */ - var CipherParams = C_lib.CipherParams = Base.extend({ - /** - * Initializes a newly created cipher params object. - * - * @param {Object} cipherParams An object with any of the possible cipher parameters. - * - * @example - * - * var cipherParams = CryptoJS.lib.CipherParams.create({ - * ciphertext: ciphertextWordArray, - * key: keyWordArray, - * iv: ivWordArray, - * salt: saltWordArray, - * algorithm: CryptoJS.algo.AES, - * mode: CryptoJS.mode.CBC, - * padding: CryptoJS.pad.PKCS7, - * blockSize: 4, - * formatter: CryptoJS.format.OpenSSL - * }); - */ - init: function (cipherParams) { - this.mixIn(cipherParams); - }, - - /** - * Converts this cipher params object to a string. - * - * @param {Format} formatter (Optional) The formatting strategy to use. - * - * @return {string} The stringified cipher params. - * - * @throws Error If neither the formatter nor the default formatter is set. - * - * @example - * - * var string = cipherParams + ''; - * var string = cipherParams.toString(); - * var string = cipherParams.toString(CryptoJS.format.OpenSSL); - */ - toString: function (formatter) { - return (formatter || this.formatter).stringify(this); - } - }); - - /** - * Format namespace. - */ - var C_format = C.format = {}; - - /** - * OpenSSL formatting strategy. - */ - var OpenSSLFormatter = C_format.OpenSSL = { - /** - * Converts a cipher params object to an OpenSSL-compatible string. - * - * @param {CipherParams} cipherParams The cipher params object. - * - * @return {string} The OpenSSL-compatible string. - * - * @static - * - * @example - * - * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); - */ - stringify: function (cipherParams) { - var wordArray; - - // Shortcuts - var ciphertext = cipherParams.ciphertext; - var salt = cipherParams.salt; - - // Format - if (salt) { - wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); - } else { - wordArray = ciphertext; - } - - return wordArray.toString(Base64); - }, - - /** - * Converts an OpenSSL-compatible string to a cipher params object. - * - * @param {string} openSSLStr The OpenSSL-compatible string. - * - * @return {CipherParams} The cipher params object. - * - * @static - * - * @example - * - * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); - */ - parse: function (openSSLStr) { - var salt; - - // Parse base64 - var ciphertext = Base64.parse(openSSLStr); - - // Shortcut - var ciphertextWords = ciphertext.words; - - // Test for salt - if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { - // Extract salt - salt = WordArray.create(ciphertextWords.slice(2, 4)); - - // Remove salt from ciphertext - ciphertextWords.splice(0, 4); - ciphertext.sigBytes -= 16; - } - - return CipherParams.create({ ciphertext: ciphertext, salt: salt }); - } - }; - - /** - * A cipher wrapper that returns ciphertext as a serializable cipher params object. - */ - var SerializableCipher = C_lib.SerializableCipher = Base.extend({ - /** - * Configuration options. - * - * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL - */ - cfg: Base.extend({ - format: OpenSSLFormatter - }), - - /** - * Encrypts a message. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {WordArray|string} message The message to encrypt. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {CipherParams} A cipher params object. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - */ - encrypt: function (cipher, message, key, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Encrypt - var encryptor = cipher.createEncryptor(key, cfg); - var ciphertext = encryptor.finalize(message); - - // Shortcut - var cipherCfg = encryptor.cfg; - - // Create and return serializable cipher params - return CipherParams.create({ - ciphertext: ciphertext, - key: key, - iv: cipherCfg.iv, - algorithm: cipher, - mode: cipherCfg.mode, - padding: cipherCfg.padding, - blockSize: cipher.blockSize, - formatter: cfg.format - }); - }, - - /** - * Decrypts serialized ciphertext. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {CipherParams|string} ciphertext The ciphertext to decrypt. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {WordArray} The plaintext. - * - * @static - * - * @example - * - * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - */ - decrypt: function (cipher, ciphertext, key, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Convert string to CipherParams - ciphertext = this._parse(ciphertext, cfg.format); - - // Decrypt - var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); - - return plaintext; - }, - - /** - * Converts serialized ciphertext to CipherParams, - * else assumed CipherParams already and returns ciphertext unchanged. - * - * @param {CipherParams|string} ciphertext The ciphertext. - * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. - * - * @return {CipherParams} The unserialized ciphertext. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); - */ - _parse: function (ciphertext, format) { - if (typeof ciphertext == 'string') { - return format.parse(ciphertext, this); - } else { - return ciphertext; - } - } - }); - - /** - * Key derivation function namespace. - */ - var C_kdf = C.kdf = {}; - - /** - * OpenSSL key derivation function. - */ - var OpenSSLKdf = C_kdf.OpenSSL = { - /** - * Derives a key and IV from a password. - * - * @param {string} password The password to derive from. - * @param {number} keySize The size in words of the key to generate. - * @param {number} ivSize The size in words of the IV to generate. - * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. - * - * @return {CipherParams} A cipher params object with the key, IV, and salt. - * - * @static - * - * @example - * - * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); - * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); - */ - execute: function (password, keySize, ivSize, salt, hasher) { - // Generate random salt - if (!salt) { - salt = WordArray.random(64/8); - } - - // Derive key and IV - if (!hasher) { - var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); - } else { - var key = EvpKDF.create({ keySize: keySize + ivSize, hasher: hasher }).compute(password, salt); - } - - - // Separate key and IV - var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); - key.sigBytes = keySize * 4; - - // Return params - return CipherParams.create({ key: key, iv: iv, salt: salt }); - } - }; - - /** - * A serializable cipher wrapper that derives the key from a password, - * and returns ciphertext as a serializable cipher params object. - */ - var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ - /** - * Configuration options. - * - * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL - */ - cfg: SerializableCipher.cfg.extend({ - kdf: OpenSSLKdf - }), - - /** - * Encrypts a message using a password. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {WordArray|string} message The message to encrypt. - * @param {string} password The password. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {CipherParams} A cipher params object. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); - * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); - */ - encrypt: function (cipher, message, password, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Derive key and other params - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher); - - // Add IV to config - cfg.iv = derivedParams.iv; - - // Encrypt - var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); - - // Mix in derived params - ciphertext.mixIn(derivedParams); - - return ciphertext; - }, - - /** - * Decrypts serialized ciphertext using a password. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {CipherParams|string} ciphertext The ciphertext to decrypt. - * @param {string} password The password. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {WordArray} The plaintext. - * - * @static - * - * @example - * - * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); - * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); - */ - decrypt: function (cipher, ciphertext, password, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Convert string to CipherParams - ciphertext = this._parse(ciphertext, cfg.format); - - // Derive key and other params - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher); - - // Add IV to config - cfg.iv = derivedParams.iv; - - // Decrypt - var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); - - return plaintext; - } - }); - }()); - - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/core.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/core.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(); - } - else {} -}(this, function () { - - /*globals window, global, require*/ - - /** - * CryptoJS core components. - */ - var CryptoJS = CryptoJS || (function (Math, undefined) { - - var crypto; - - // Native crypto from window (Browser) - if (typeof window !== 'undefined' && window.crypto) { - crypto = window.crypto; - } - - // Native crypto in web worker (Browser) - if (typeof self !== 'undefined' && self.crypto) { - crypto = self.crypto; - } - - // Native crypto from worker - if (typeof globalThis !== 'undefined' && globalThis.crypto) { - crypto = globalThis.crypto; - } - - // Native (experimental IE 11) crypto from window (Browser) - if (!crypto && typeof window !== 'undefined' && window.msCrypto) { - crypto = window.msCrypto; - } - - // Native crypto from global (NodeJS) - if (!crypto && typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.crypto) { - crypto = __webpack_require__.g.crypto; - } - - // Native crypto import via require (NodeJS) - if (!crypto && "function" === 'function') { - try { - crypto = __webpack_require__(/*! crypto */ "?9157"); - } catch (err) {} - } - - /* - * Cryptographically secure pseudorandom number generator - * - * As Math.random() is cryptographically not safe to use - */ - var cryptoSecureRandomInt = function () { - if (crypto) { - // Use getRandomValues method (Browser) - if (typeof crypto.getRandomValues === 'function') { - try { - return crypto.getRandomValues(new Uint32Array(1))[0]; - } catch (err) {} - } - - // Use randomBytes method (NodeJS) - if (typeof crypto.randomBytes === 'function') { - try { - return crypto.randomBytes(4).readInt32LE(); - } catch (err) {} - } - } - - throw new Error('Native crypto module could not be used to get secure random number.'); - }; - - /* - * Local polyfill of Object.create - - */ - var create = Object.create || (function () { - function F() {} - - return function (obj) { - var subtype; - - F.prototype = obj; - - subtype = new F(); - - F.prototype = null; - - return subtype; - }; - }()); - - /** - * CryptoJS namespace. - */ - var C = {}; - - /** - * Library namespace. - */ - var C_lib = C.lib = {}; - - /** - * Base object for prototypal inheritance. - */ - var Base = C_lib.Base = (function () { - - - return { - /** - * Creates a new object that inherits from this object. - * - * @param {Object} overrides Properties to copy into the new object. - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * field: 'value', - * - * method: function () { - * } - * }); - */ - extend: function (overrides) { - // Spawn - var subtype = create(this); - - // Augment - if (overrides) { - subtype.mixIn(overrides); - } - - // Create default initializer - if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { - subtype.init = function () { - subtype.$super.init.apply(this, arguments); - }; - } - - // Initializer's prototype is the subtype object - subtype.init.prototype = subtype; - - // Reference supertype - subtype.$super = this; - - return subtype; - }, - - /** - * Extends this object and runs the init method. - * Arguments to create() will be passed to init(). - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var instance = MyType.create(); - */ - create: function () { - var instance = this.extend(); - instance.init.apply(instance, arguments); - - return instance; - }, - - /** - * Initializes a newly created object. - * Override this method to add some logic when your objects are created. - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * init: function () { - * // ... - * } - * }); - */ - init: function () { - }, - - /** - * Copies properties into this object. - * - * @param {Object} properties The properties to mix in. - * - * @example - * - * MyType.mixIn({ - * field: 'value' - * }); - */ - mixIn: function (properties) { - for (var propertyName in properties) { - if (properties.hasOwnProperty(propertyName)) { - this[propertyName] = properties[propertyName]; - } - } - - // IE won't copy toString using the loop above - if (properties.hasOwnProperty('toString')) { - this.toString = properties.toString; - } - }, - - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = instance.clone(); - */ - clone: function () { - return this.init.prototype.extend(this); - } - }; - }()); - - /** - * An array of 32-bit words. - * - * @property {Array} words The array of 32-bit words. - * @property {number} sigBytes The number of significant bytes in this word array. - */ - var WordArray = C_lib.WordArray = Base.extend({ - /** - * Initializes a newly created word array. - * - * @param {Array} words (Optional) An array of 32-bit words. - * @param {number} sigBytes (Optional) The number of significant bytes in the words. - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.create(); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); - */ - init: function (words, sigBytes) { - words = this.words = words || []; - - if (sigBytes != undefined) { - this.sigBytes = sigBytes; - } else { - this.sigBytes = words.length * 4; - } - }, - - /** - * Converts this word array to a string. - * - * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex - * - * @return {string} The stringified word array. - * - * @example - * - * var string = wordArray + ''; - * var string = wordArray.toString(); - * var string = wordArray.toString(CryptoJS.enc.Utf8); - */ - toString: function (encoder) { - return (encoder || Hex).stringify(this); - }, - - /** - * Concatenates a word array to this word array. - * - * @param {WordArray} wordArray The word array to append. - * - * @return {WordArray} This word array. - * - * @example - * - * wordArray1.concat(wordArray2); - */ - concat: function (wordArray) { - // Shortcuts - var thisWords = this.words; - var thatWords = wordArray.words; - var thisSigBytes = this.sigBytes; - var thatSigBytes = wordArray.sigBytes; - - // Clamp excess bits - this.clamp(); - - // Concat - if (thisSigBytes % 4) { - // Copy one byte at a time - for (var i = 0; i < thatSigBytes; i++) { - var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); - } - } else { - // Copy one word at a time - for (var j = 0; j < thatSigBytes; j += 4) { - thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2]; - } - } - this.sigBytes += thatSigBytes; - - // Chainable - return this; - }, - - /** - * Removes insignificant bits. - * - * @example - * - * wordArray.clamp(); - */ - clamp: function () { - // Shortcuts - var words = this.words; - var sigBytes = this.sigBytes; - - // Clamp - words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); - words.length = Math.ceil(sigBytes / 4); - }, - - /** - * Creates a copy of this word array. - * - * @return {WordArray} The clone. - * - * @example - * - * var clone = wordArray.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - clone.words = this.words.slice(0); - - return clone; - }, - - /** - * Creates a word array filled with random bytes. - * - * @param {number} nBytes The number of random bytes to generate. - * - * @return {WordArray} The random word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.random(16); - */ - random: function (nBytes) { - var words = []; - - for (var i = 0; i < nBytes; i += 4) { - words.push(cryptoSecureRandomInt()); - } - - return new WordArray.init(words, nBytes); - } - }); - - /** - * Encoder namespace. - */ - var C_enc = C.enc = {}; - - /** - * Hex encoding strategy. - */ - var Hex = C_enc.Hex = { - /** - * Converts a word array to a hex string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The hex string. - * - * @static - * - * @example - * - * var hexString = CryptoJS.enc.Hex.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var hexChars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - hexChars.push((bite >>> 4).toString(16)); - hexChars.push((bite & 0x0f).toString(16)); - } - - return hexChars.join(''); - }, - - /** - * Converts a hex string to a word array. - * - * @param {string} hexStr The hex string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Hex.parse(hexString); - */ - parse: function (hexStr) { - // Shortcut - var hexStrLength = hexStr.length; - - // Convert - var words = []; - for (var i = 0; i < hexStrLength; i += 2) { - words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); - } - - return new WordArray.init(words, hexStrLength / 2); - } - }; - - /** - * Latin1 encoding strategy. - */ - var Latin1 = C_enc.Latin1 = { - /** - * Converts a word array to a Latin1 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The Latin1 string. - * - * @static - * - * @example - * - * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var latin1Chars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - latin1Chars.push(String.fromCharCode(bite)); - } - - return latin1Chars.join(''); - }, - - /** - * Converts a Latin1 string to a word array. - * - * @param {string} latin1Str The Latin1 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); - */ - parse: function (latin1Str) { - // Shortcut - var latin1StrLength = latin1Str.length; - - // Convert - var words = []; - for (var i = 0; i < latin1StrLength; i++) { - words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); - } - - return new WordArray.init(words, latin1StrLength); - } - }; - - /** - * UTF-8 encoding strategy. - */ - var Utf8 = C_enc.Utf8 = { - /** - * Converts a word array to a UTF-8 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-8 string. - * - * @static - * - * @example - * - * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); - */ - stringify: function (wordArray) { - try { - return decodeURIComponent(escape(Latin1.stringify(wordArray))); - } catch (e) { - throw new Error('Malformed UTF-8 data'); - } - }, - - /** - * Converts a UTF-8 string to a word array. - * - * @param {string} utf8Str The UTF-8 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); - */ - parse: function (utf8Str) { - return Latin1.parse(unescape(encodeURIComponent(utf8Str))); - } - }; - - /** - * Abstract buffered block algorithm template. - * - * The property blockSize must be implemented in a concrete subtype. - * - * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 - */ - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ - /** - * Resets this block algorithm's data buffer to its initial state. - * - * @example - * - * bufferedBlockAlgorithm.reset(); - */ - reset: function () { - // Initial values - this._data = new WordArray.init(); - this._nDataBytes = 0; - }, - - /** - * Adds new data to this block algorithm's buffer. - * - * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. - * - * @example - * - * bufferedBlockAlgorithm._append('data'); - * bufferedBlockAlgorithm._append(wordArray); - */ - _append: function (data) { - // Convert string to WordArray, else assume WordArray already - if (typeof data == 'string') { - data = Utf8.parse(data); - } - - // Append - this._data.concat(data); - this._nDataBytes += data.sigBytes; - }, - - /** - * Processes available data blocks. - * - * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. - * - * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. - * - * @return {WordArray} The processed data. - * - * @example - * - * var processedData = bufferedBlockAlgorithm._process(); - * var processedData = bufferedBlockAlgorithm._process(!!'flush'); - */ - _process: function (doFlush) { - var processedWords; - - // Shortcuts - var data = this._data; - var dataWords = data.words; - var dataSigBytes = data.sigBytes; - var blockSize = this.blockSize; - var blockSizeBytes = blockSize * 4; - - // Count blocks ready - var nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - // Round up to include partial blocks - nBlocksReady = Math.ceil(nBlocksReady); - } else { - // Round down to include only full blocks, - // less the number of blocks that must remain in the buffer - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } - - // Count words ready - var nWordsReady = nBlocksReady * blockSize; - - // Count bytes ready - var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); - - // Process blocks - if (nWordsReady) { - for (var offset = 0; offset < nWordsReady; offset += blockSize) { - // Perform concrete-algorithm logic - this._doProcessBlock(dataWords, offset); - } - - // Remove processed words - processedWords = dataWords.splice(0, nWordsReady); - data.sigBytes -= nBytesReady; - } - - // Return processed words - return new WordArray.init(processedWords, nBytesReady); - }, - - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = bufferedBlockAlgorithm.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - clone._data = this._data.clone(); - - return clone; - }, - - _minBufferSize: 0 - }); - - /** - * Abstract hasher template. - * - * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) - */ - var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ - /** - * Configuration options. - */ - cfg: Base.extend(), - - /** - * Initializes a newly created hasher. - * - * @param {Object} cfg (Optional) The configuration options to use for this hash computation. - * - * @example - * - * var hasher = CryptoJS.algo.SHA256.create(); - */ - init: function (cfg) { - // Apply config defaults - this.cfg = this.cfg.extend(cfg); - - // Set initial values - this.reset(); - }, - - /** - * Resets this hasher to its initial state. - * - * @example - * - * hasher.reset(); - */ - reset: function () { - // Reset data buffer - BufferedBlockAlgorithm.reset.call(this); - - // Perform concrete-hasher logic - this._doReset(); - }, - - /** - * Updates this hasher with a message. - * - * @param {WordArray|string} messageUpdate The message to append. - * - * @return {Hasher} This hasher. - * - * @example - * - * hasher.update('message'); - * hasher.update(wordArray); - */ - update: function (messageUpdate) { - // Append - this._append(messageUpdate); - - // Update the hash - this._process(); - - // Chainable - return this; - }, - - /** - * Finalizes the hash computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} messageUpdate (Optional) A final message update. - * - * @return {WordArray} The hash. - * - * @example - * - * var hash = hasher.finalize(); - * var hash = hasher.finalize('message'); - * var hash = hasher.finalize(wordArray); - */ - finalize: function (messageUpdate) { - // Final message update - if (messageUpdate) { - this._append(messageUpdate); - } - - // Perform concrete-hasher logic - var hash = this._doFinalize(); - - return hash; - }, - - blockSize: 512/32, - - /** - * Creates a shortcut function to a hasher's object interface. - * - * @param {Hasher} hasher The hasher to create a helper for. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); - */ - _createHelper: function (hasher) { - return function (message, cfg) { - return new hasher.init(cfg).finalize(message); - }; - }, - - /** - * Creates a shortcut function to the HMAC's object interface. - * - * @param {Hasher} hasher The hasher to use in this HMAC helper. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); - */ - _createHmacHelper: function (hasher) { - return function (message, key) { - return new C_algo.HMAC.init(hasher, key).finalize(message); - }; - } - }); - - /** - * Algorithm namespace. - */ - var C_algo = C.algo = {}; - - return C; - }(Math)); - - - return CryptoJS; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/enc-base64.js": -/*!**********************************************!*\ - !*** ./node_modules/crypto-js/enc-base64.js ***! - \**********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - - /** - * Base64 encoding strategy. - */ - var Base64 = C_enc.Base64 = { - /** - * Converts a word array to a Base64 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The Base64 string. - * - * @static - * - * @example - * - * var base64String = CryptoJS.enc.Base64.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var map = this._map; - - // Clamp excess bits - wordArray.clamp(); - - // Convert - var base64Chars = []; - for (var i = 0; i < sigBytes; i += 3) { - var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; - var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; - - var triplet = (byte1 << 16) | (byte2 << 8) | byte3; - - for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { - base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); - } - } - - // Add padding - var paddingChar = map.charAt(64); - if (paddingChar) { - while (base64Chars.length % 4) { - base64Chars.push(paddingChar); - } - } - - return base64Chars.join(''); - }, - - /** - * Converts a Base64 string to a word array. - * - * @param {string} base64Str The Base64 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Base64.parse(base64String); - */ - parse: function (base64Str) { - // Shortcuts - var base64StrLength = base64Str.length; - var map = this._map; - var reverseMap = this._reverseMap; - - if (!reverseMap) { - reverseMap = this._reverseMap = []; - for (var j = 0; j < map.length; j++) { - reverseMap[map.charCodeAt(j)] = j; - } - } - - // Ignore padding - var paddingChar = map.charAt(64); - if (paddingChar) { - var paddingIndex = base64Str.indexOf(paddingChar); - if (paddingIndex !== -1) { - base64StrLength = paddingIndex; - } - } - - // Convert - return parseLoop(base64Str, base64StrLength, reverseMap); - - }, - - _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' - }; - - function parseLoop(base64Str, base64StrLength, reverseMap) { - var words = []; - var nBytes = 0; - for (var i = 0; i < base64StrLength; i++) { - if (i % 4) { - var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); - var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); - var bitsCombined = bits1 | bits2; - words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); - nBytes++; - } - } - return WordArray.create(words, nBytes); - } - }()); - - - return CryptoJS.enc.Base64; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/enc-base64url.js": -/*!*************************************************!*\ - !*** ./node_modules/crypto-js/enc-base64url.js ***! - \*************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - - /** - * Base64url encoding strategy. - */ - var Base64url = C_enc.Base64url = { - /** - * Converts a word array to a Base64url string. - * - * @param {WordArray} wordArray The word array. - * - * @param {boolean} urlSafe Whether to use url safe - * - * @return {string} The Base64url string. - * - * @static - * - * @example - * - * var base64String = CryptoJS.enc.Base64url.stringify(wordArray); - */ - stringify: function (wordArray, urlSafe) { - if (urlSafe === undefined) { - urlSafe = true - } - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var map = urlSafe ? this._safe_map : this._map; - - // Clamp excess bits - wordArray.clamp(); - - // Convert - var base64Chars = []; - for (var i = 0; i < sigBytes; i += 3) { - var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; - var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; - - var triplet = (byte1 << 16) | (byte2 << 8) | byte3; - - for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { - base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); - } - } - - // Add padding - var paddingChar = map.charAt(64); - if (paddingChar) { - while (base64Chars.length % 4) { - base64Chars.push(paddingChar); - } - } - - return base64Chars.join(''); - }, - - /** - * Converts a Base64url string to a word array. - * - * @param {string} base64Str The Base64url string. - * - * @param {boolean} urlSafe Whether to use url safe - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Base64url.parse(base64String); - */ - parse: function (base64Str, urlSafe) { - if (urlSafe === undefined) { - urlSafe = true - } - - // Shortcuts - var base64StrLength = base64Str.length; - var map = urlSafe ? this._safe_map : this._map; - var reverseMap = this._reverseMap; - - if (!reverseMap) { - reverseMap = this._reverseMap = []; - for (var j = 0; j < map.length; j++) { - reverseMap[map.charCodeAt(j)] = j; - } - } - - // Ignore padding - var paddingChar = map.charAt(64); - if (paddingChar) { - var paddingIndex = base64Str.indexOf(paddingChar); - if (paddingIndex !== -1) { - base64StrLength = paddingIndex; - } - } - - // Convert - return parseLoop(base64Str, base64StrLength, reverseMap); - - }, - - _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', - _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', - }; - - function parseLoop(base64Str, base64StrLength, reverseMap) { - var words = []; - var nBytes = 0; - for (var i = 0; i < base64StrLength; i++) { - if (i % 4) { - var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); - var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); - var bitsCombined = bits1 | bits2; - words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); - nBytes++; - } - } - return WordArray.create(words, nBytes); - } - }()); - - - return CryptoJS.enc.Base64url; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/enc-utf16.js": -/*!*********************************************!*\ - !*** ./node_modules/crypto-js/enc-utf16.js ***! - \*********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - - /** - * UTF-16 BE encoding strategy. - */ - var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { - /** - * Converts a word array to a UTF-16 BE string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-16 BE string. - * - * @static - * - * @example - * - * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var utf16Chars = []; - for (var i = 0; i < sigBytes; i += 2) { - var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; - utf16Chars.push(String.fromCharCode(codePoint)); - } - - return utf16Chars.join(''); - }, - - /** - * Converts a UTF-16 BE string to a word array. - * - * @param {string} utf16Str The UTF-16 BE string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); - */ - parse: function (utf16Str) { - // Shortcut - var utf16StrLength = utf16Str.length; - - // Convert - var words = []; - for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); - } - - return WordArray.create(words, utf16StrLength * 2); - } - }; - - /** - * UTF-16 LE encoding strategy. - */ - C_enc.Utf16LE = { - /** - * Converts a word array to a UTF-16 LE string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-16 LE string. - * - * @static - * - * @example - * - * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var utf16Chars = []; - for (var i = 0; i < sigBytes; i += 2) { - var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); - utf16Chars.push(String.fromCharCode(codePoint)); - } - - return utf16Chars.join(''); - }, - - /** - * Converts a UTF-16 LE string to a word array. - * - * @param {string} utf16Str The UTF-16 LE string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); - */ - parse: function (utf16Str) { - // Shortcut - var utf16StrLength = utf16Str.length; - - // Convert - var words = []; - for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); - } - - return WordArray.create(words, utf16StrLength * 2); - } - }; - - function swapEndian(word) { - return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); - } - }()); - - - return CryptoJS.enc.Utf16; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/evpkdf.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/evpkdf.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha1 */ "./node_modules/crypto-js/sha1.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var MD5 = C_algo.MD5; - - /** - * This key derivation function is meant to conform with EVP_BytesToKey. - * www.openssl.org/docs/crypto/EVP_BytesToKey.html - */ - var EvpKDF = C_algo.EvpKDF = Base.extend({ - /** - * Configuration options. - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hash algorithm to use. Default: MD5 - * @property {number} iterations The number of iterations to perform. Default: 1 - */ - cfg: Base.extend({ - keySize: 128/32, - hasher: MD5, - iterations: 1 - }), - - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * var kdf = CryptoJS.algo.EvpKDF.create(); - * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); - * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); - */ - init: function (cfg) { - this.cfg = this.cfg.extend(cfg); - }, - - /** - * Derives a key from a password. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * var key = kdf.compute(password, salt); - */ - compute: function (password, salt) { - var block; - - // Shortcut - var cfg = this.cfg; - - // Init hasher - var hasher = cfg.hasher.create(); - - // Initial values - var derivedKey = WordArray.create(); - - // Shortcuts - var derivedKeyWords = derivedKey.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; - - // Generate key - while (derivedKeyWords.length < keySize) { - if (block) { - hasher.update(block); - } - block = hasher.update(password).finalize(salt); - hasher.reset(); - - // Iterations - for (var i = 1; i < iterations; i++) { - block = hasher.finalize(block); - hasher.reset(); - } - - derivedKey.concat(block); - } - derivedKey.sigBytes = keySize * 4; - - return derivedKey; - } - }); - - /** - * Derives a key from a password. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * @param {Object} cfg (Optional) The configuration options to use for this computation. - * - * @return {WordArray} The derived key. - * - * @static - * - * @example - * - * var key = CryptoJS.EvpKDF(password, salt); - * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); - * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); - */ - C.EvpKDF = function (password, salt, cfg) { - return EvpKDF.create(cfg).compute(password, salt); - }; - }()); - - - return CryptoJS.EvpKDF; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/format-hex.js": -/*!**********************************************!*\ - !*** ./node_modules/crypto-js/format-hex.js ***! - \**********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var CipherParams = C_lib.CipherParams; - var C_enc = C.enc; - var Hex = C_enc.Hex; - var C_format = C.format; - - var HexFormatter = C_format.Hex = { - /** - * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. - * - * @param {CipherParams} cipherParams The cipher params object. - * - * @return {string} The hexadecimally encoded string. - * - * @static - * - * @example - * - * var hexString = CryptoJS.format.Hex.stringify(cipherParams); - */ - stringify: function (cipherParams) { - return cipherParams.ciphertext.toString(Hex); - }, - - /** - * Converts a hexadecimally encoded ciphertext string to a cipher params object. - * - * @param {string} input The hexadecimally encoded string. - * - * @return {CipherParams} The cipher params object. - * - * @static - * - * @example - * - * var cipherParams = CryptoJS.format.Hex.parse(hexString); - */ - parse: function (input) { - var ciphertext = Hex.parse(input); - return CipherParams.create({ ciphertext: ciphertext }); - } - }; - }()); - - - return CryptoJS.format.Hex; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/hmac.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/hmac.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var C_algo = C.algo; - - /** - * HMAC algorithm. - */ - var HMAC = C_algo.HMAC = Base.extend({ - /** - * Initializes a newly created HMAC. - * - * @param {Hasher} hasher The hash algorithm to use. - * @param {WordArray|string} key The secret key. - * - * @example - * - * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); - */ - init: function (hasher, key) { - // Init hasher - hasher = this._hasher = new hasher.init(); - - // Convert string to WordArray, else assume WordArray already - if (typeof key == 'string') { - key = Utf8.parse(key); - } - - // Shortcuts - var hasherBlockSize = hasher.blockSize; - var hasherBlockSizeBytes = hasherBlockSize * 4; - - // Allow arbitrary length keys - if (key.sigBytes > hasherBlockSizeBytes) { - key = hasher.finalize(key); - } - - // Clamp excess bits - key.clamp(); - - // Clone key for inner and outer pads - var oKey = this._oKey = key.clone(); - var iKey = this._iKey = key.clone(); - - // Shortcuts - var oKeyWords = oKey.words; - var iKeyWords = iKey.words; - - // XOR keys with pad constants - for (var i = 0; i < hasherBlockSize; i++) { - oKeyWords[i] ^= 0x5c5c5c5c; - iKeyWords[i] ^= 0x36363636; - } - oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; - - // Set initial values - this.reset(); - }, - - /** - * Resets this HMAC to its initial state. - * - * @example - * - * hmacHasher.reset(); - */ - reset: function () { - // Shortcut - var hasher = this._hasher; - - // Reset - hasher.reset(); - hasher.update(this._iKey); - }, - - /** - * Updates this HMAC with a message. - * - * @param {WordArray|string} messageUpdate The message to append. - * - * @return {HMAC} This HMAC instance. - * - * @example - * - * hmacHasher.update('message'); - * hmacHasher.update(wordArray); - */ - update: function (messageUpdate) { - this._hasher.update(messageUpdate); - - // Chainable - return this; - }, - - /** - * Finalizes the HMAC computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} messageUpdate (Optional) A final message update. - * - * @return {WordArray} The HMAC. - * - * @example - * - * var hmac = hmacHasher.finalize(); - * var hmac = hmacHasher.finalize('message'); - * var hmac = hmacHasher.finalize(wordArray); - */ - finalize: function (messageUpdate) { - // Shortcut - var hasher = this._hasher; - - // Compute HMAC - var innerHash = hasher.finalize(messageUpdate); - hasher.reset(); - var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); - - return hmac; - } - }); - }()); - - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/index.js": -/*!*****************************************!*\ - !*** ./node_modules/crypto-js/index.js ***! - \*****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js"), __webpack_require__(/*! ./lib-typedarrays */ "./node_modules/crypto-js/lib-typedarrays.js"), __webpack_require__(/*! ./enc-utf16 */ "./node_modules/crypto-js/enc-utf16.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./enc-base64url */ "./node_modules/crypto-js/enc-base64url.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./sha1 */ "./node_modules/crypto-js/sha1.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js"), __webpack_require__(/*! ./sha224 */ "./node_modules/crypto-js/sha224.js"), __webpack_require__(/*! ./sha512 */ "./node_modules/crypto-js/sha512.js"), __webpack_require__(/*! ./sha384 */ "./node_modules/crypto-js/sha384.js"), __webpack_require__(/*! ./sha3 */ "./node_modules/crypto-js/sha3.js"), __webpack_require__(/*! ./ripemd160 */ "./node_modules/crypto-js/ripemd160.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js"), __webpack_require__(/*! ./pbkdf2 */ "./node_modules/crypto-js/pbkdf2.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js"), __webpack_require__(/*! ./mode-cfb */ "./node_modules/crypto-js/mode-cfb.js"), __webpack_require__(/*! ./mode-ctr */ "./node_modules/crypto-js/mode-ctr.js"), __webpack_require__(/*! ./mode-ctr-gladman */ "./node_modules/crypto-js/mode-ctr-gladman.js"), __webpack_require__(/*! ./mode-ofb */ "./node_modules/crypto-js/mode-ofb.js"), __webpack_require__(/*! ./mode-ecb */ "./node_modules/crypto-js/mode-ecb.js"), __webpack_require__(/*! ./pad-ansix923 */ "./node_modules/crypto-js/pad-ansix923.js"), __webpack_require__(/*! ./pad-iso10126 */ "./node_modules/crypto-js/pad-iso10126.js"), __webpack_require__(/*! ./pad-iso97971 */ "./node_modules/crypto-js/pad-iso97971.js"), __webpack_require__(/*! ./pad-zeropadding */ "./node_modules/crypto-js/pad-zeropadding.js"), __webpack_require__(/*! ./pad-nopadding */ "./node_modules/crypto-js/pad-nopadding.js"), __webpack_require__(/*! ./format-hex */ "./node_modules/crypto-js/format-hex.js"), __webpack_require__(/*! ./aes */ "./node_modules/crypto-js/aes.js"), __webpack_require__(/*! ./tripledes */ "./node_modules/crypto-js/tripledes.js"), __webpack_require__(/*! ./rc4 */ "./node_modules/crypto-js/rc4.js"), __webpack_require__(/*! ./rabbit */ "./node_modules/crypto-js/rabbit.js"), __webpack_require__(/*! ./rabbit-legacy */ "./node_modules/crypto-js/rabbit-legacy.js"), __webpack_require__(/*! ./blowfish */ "./node_modules/crypto-js/blowfish.js")); - } - else {} -}(this, function (CryptoJS) { - - return CryptoJS; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/lib-typedarrays.js": -/*!***************************************************!*\ - !*** ./node_modules/crypto-js/lib-typedarrays.js ***! - \***************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Check if typed arrays are supported - if (typeof ArrayBuffer != 'function') { - return; - } - - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - - // Reference original init - var superInit = WordArray.init; - - // Augment WordArray.init to handle typed arrays - var subInit = WordArray.init = function (typedArray) { - // Convert buffers to uint8 - if (typedArray instanceof ArrayBuffer) { - typedArray = new Uint8Array(typedArray); - } - - // Convert other array views to uint8 - if ( - typedArray instanceof Int8Array || - (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || - typedArray instanceof Int16Array || - typedArray instanceof Uint16Array || - typedArray instanceof Int32Array || - typedArray instanceof Uint32Array || - typedArray instanceof Float32Array || - typedArray instanceof Float64Array - ) { - typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); - } - - // Handle Uint8Array - if (typedArray instanceof Uint8Array) { - // Shortcut - var typedArrayByteLength = typedArray.byteLength; - - // Extract bytes - var words = []; - for (var i = 0; i < typedArrayByteLength; i++) { - words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); - } - - // Initialize this word array - superInit.call(this, words, typedArrayByteLength); - } else { - // Else call normal init - superInit.apply(this, arguments); - } - }; - - subInit.prototype = WordArray; - }()); - - - return CryptoJS.lib.WordArray; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/md5.js": -/*!***************************************!*\ - !*** ./node_modules/crypto-js/md5.js ***! - \***************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Constants table - var T = []; - - // Compute constants - (function () { - for (var i = 0; i < 64; i++) { - T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; - } - }()); - - /** - * MD5 hash algorithm. - */ - var MD5 = C_algo.MD5 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0x67452301, 0xefcdab89, - 0x98badcfe, 0x10325476 - ]); - }, - - _doProcessBlock: function (M, offset) { - // Swap endian - for (var i = 0; i < 16; i++) { - // Shortcuts - var offset_i = offset + i; - var M_offset_i = M[offset_i]; - - M[offset_i] = ( - (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | - (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) - ); - } - - // Shortcuts - var H = this._hash.words; - - var M_offset_0 = M[offset + 0]; - var M_offset_1 = M[offset + 1]; - var M_offset_2 = M[offset + 2]; - var M_offset_3 = M[offset + 3]; - var M_offset_4 = M[offset + 4]; - var M_offset_5 = M[offset + 5]; - var M_offset_6 = M[offset + 6]; - var M_offset_7 = M[offset + 7]; - var M_offset_8 = M[offset + 8]; - var M_offset_9 = M[offset + 9]; - var M_offset_10 = M[offset + 10]; - var M_offset_11 = M[offset + 11]; - var M_offset_12 = M[offset + 12]; - var M_offset_13 = M[offset + 13]; - var M_offset_14 = M[offset + 14]; - var M_offset_15 = M[offset + 15]; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - - // Computation - a = FF(a, b, c, d, M_offset_0, 7, T[0]); - d = FF(d, a, b, c, M_offset_1, 12, T[1]); - c = FF(c, d, a, b, M_offset_2, 17, T[2]); - b = FF(b, c, d, a, M_offset_3, 22, T[3]); - a = FF(a, b, c, d, M_offset_4, 7, T[4]); - d = FF(d, a, b, c, M_offset_5, 12, T[5]); - c = FF(c, d, a, b, M_offset_6, 17, T[6]); - b = FF(b, c, d, a, M_offset_7, 22, T[7]); - a = FF(a, b, c, d, M_offset_8, 7, T[8]); - d = FF(d, a, b, c, M_offset_9, 12, T[9]); - c = FF(c, d, a, b, M_offset_10, 17, T[10]); - b = FF(b, c, d, a, M_offset_11, 22, T[11]); - a = FF(a, b, c, d, M_offset_12, 7, T[12]); - d = FF(d, a, b, c, M_offset_13, 12, T[13]); - c = FF(c, d, a, b, M_offset_14, 17, T[14]); - b = FF(b, c, d, a, M_offset_15, 22, T[15]); - - a = GG(a, b, c, d, M_offset_1, 5, T[16]); - d = GG(d, a, b, c, M_offset_6, 9, T[17]); - c = GG(c, d, a, b, M_offset_11, 14, T[18]); - b = GG(b, c, d, a, M_offset_0, 20, T[19]); - a = GG(a, b, c, d, M_offset_5, 5, T[20]); - d = GG(d, a, b, c, M_offset_10, 9, T[21]); - c = GG(c, d, a, b, M_offset_15, 14, T[22]); - b = GG(b, c, d, a, M_offset_4, 20, T[23]); - a = GG(a, b, c, d, M_offset_9, 5, T[24]); - d = GG(d, a, b, c, M_offset_14, 9, T[25]); - c = GG(c, d, a, b, M_offset_3, 14, T[26]); - b = GG(b, c, d, a, M_offset_8, 20, T[27]); - a = GG(a, b, c, d, M_offset_13, 5, T[28]); - d = GG(d, a, b, c, M_offset_2, 9, T[29]); - c = GG(c, d, a, b, M_offset_7, 14, T[30]); - b = GG(b, c, d, a, M_offset_12, 20, T[31]); - - a = HH(a, b, c, d, M_offset_5, 4, T[32]); - d = HH(d, a, b, c, M_offset_8, 11, T[33]); - c = HH(c, d, a, b, M_offset_11, 16, T[34]); - b = HH(b, c, d, a, M_offset_14, 23, T[35]); - a = HH(a, b, c, d, M_offset_1, 4, T[36]); - d = HH(d, a, b, c, M_offset_4, 11, T[37]); - c = HH(c, d, a, b, M_offset_7, 16, T[38]); - b = HH(b, c, d, a, M_offset_10, 23, T[39]); - a = HH(a, b, c, d, M_offset_13, 4, T[40]); - d = HH(d, a, b, c, M_offset_0, 11, T[41]); - c = HH(c, d, a, b, M_offset_3, 16, T[42]); - b = HH(b, c, d, a, M_offset_6, 23, T[43]); - a = HH(a, b, c, d, M_offset_9, 4, T[44]); - d = HH(d, a, b, c, M_offset_12, 11, T[45]); - c = HH(c, d, a, b, M_offset_15, 16, T[46]); - b = HH(b, c, d, a, M_offset_2, 23, T[47]); - - a = II(a, b, c, d, M_offset_0, 6, T[48]); - d = II(d, a, b, c, M_offset_7, 10, T[49]); - c = II(c, d, a, b, M_offset_14, 15, T[50]); - b = II(b, c, d, a, M_offset_5, 21, T[51]); - a = II(a, b, c, d, M_offset_12, 6, T[52]); - d = II(d, a, b, c, M_offset_3, 10, T[53]); - c = II(c, d, a, b, M_offset_10, 15, T[54]); - b = II(b, c, d, a, M_offset_1, 21, T[55]); - a = II(a, b, c, d, M_offset_8, 6, T[56]); - d = II(d, a, b, c, M_offset_15, 10, T[57]); - c = II(c, d, a, b, M_offset_6, 15, T[58]); - b = II(b, c, d, a, M_offset_13, 21, T[59]); - a = II(a, b, c, d, M_offset_4, 6, T[60]); - d = II(d, a, b, c, M_offset_11, 10, T[61]); - c = II(c, d, a, b, M_offset_2, 15, T[62]); - b = II(b, c, d, a, M_offset_9, 21, T[63]); - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - - var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); - var nBitsTotalL = nBitsTotal; - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( - (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | - (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) - ); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( - (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | - (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) - ); - - data.sigBytes = (dataWords.length + 1) * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var hash = this._hash; - var H = hash.words; - - // Swap endian - for (var i = 0; i < 4; i++) { - // Shortcut - var H_i = H[i]; - - H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | - (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); - } - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - function FF(a, b, c, d, x, s, t) { - var n = a + ((b & c) | (~b & d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function GG(a, b, c, d, x, s, t) { - var n = a + ((b & d) | (c & ~d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function HH(a, b, c, d, x, s, t) { - var n = a + (b ^ c ^ d) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function II(a, b, c, d, x, s, t) { - var n = a + (c ^ (b | ~d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.MD5('message'); - * var hash = CryptoJS.MD5(wordArray); - */ - C.MD5 = Hasher._createHelper(MD5); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacMD5(message, key); - */ - C.HmacMD5 = Hasher._createHmacHelper(MD5); - }(Math)); - - - return CryptoJS.MD5; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-cfb.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-cfb.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Cipher Feedback block mode. - */ - CryptoJS.mode.CFB = (function () { - var CFB = CryptoJS.lib.BlockCipherMode.extend(); - - CFB.Encryptor = CFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - - // Remember this block to use with next block - this._prevBlock = words.slice(offset, offset + blockSize); - } - }); - - CFB.Decryptor = CFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // Remember this block to use with next block - var thisBlock = words.slice(offset, offset + blockSize); - - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - - // This block becomes the previous block - this._prevBlock = thisBlock; - } - }); - - function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { - var keystream; - - // Shortcut - var iv = this._iv; - - // Generate keystream - if (iv) { - keystream = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } else { - keystream = this._prevBlock; - } - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - - return CFB; - }()); - - - return CryptoJS.mode.CFB; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ctr-gladman.js": -/*!****************************************************!*\ - !*** ./node_modules/crypto-js/mode-ctr-gladman.js ***! - \****************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** @preserve - * Counter block mode compatible with Dr Brian Gladman fileenc.c - * derived from CryptoJS.mode.CTR - * Jan Hruby jhruby.web@gmail.com - */ - CryptoJS.mode.CTRGladman = (function () { - var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); - - function incWord(word) - { - if (((word >> 24) & 0xff) === 0xff) { //overflow - var b1 = (word >> 16)&0xff; - var b2 = (word >> 8)&0xff; - var b3 = word & 0xff; - - if (b1 === 0xff) // overflow b1 - { - b1 = 0; - if (b2 === 0xff) - { - b2 = 0; - if (b3 === 0xff) - { - b3 = 0; - } - else - { - ++b3; - } - } - else - { - ++b2; - } - } - else - { - ++b1; - } - - word = 0; - word += (b1 << 16); - word += (b2 << 8); - word += b3; - } - else - { - word += (0x01 << 24); - } - return word; - } - - function incCounter(counter) - { - if ((counter[0] = incWord(counter[0])) === 0) - { - // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 - counter[1] = incWord(counter[1]); - } - return counter; - } - - var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; - - // Generate keystream - if (iv) { - counter = this._counter = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - - incCounter(counter); - - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - CTRGladman.Decryptor = Encryptor; - - return CTRGladman; - }()); - - - - - return CryptoJS.mode.CTRGladman; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ctr.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-ctr.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Counter block mode. - */ - CryptoJS.mode.CTR = (function () { - var CTR = CryptoJS.lib.BlockCipherMode.extend(); - - var Encryptor = CTR.Encryptor = CTR.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; - - // Generate keystream - if (iv) { - counter = this._counter = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - - // Increment counter - counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - CTR.Decryptor = Encryptor; - - return CTR; - }()); - - - return CryptoJS.mode.CTR; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ecb.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-ecb.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Electronic Codebook block mode. - */ - CryptoJS.mode.ECB = (function () { - var ECB = CryptoJS.lib.BlockCipherMode.extend(); - - ECB.Encryptor = ECB.extend({ - processBlock: function (words, offset) { - this._cipher.encryptBlock(words, offset); - } - }); - - ECB.Decryptor = ECB.extend({ - processBlock: function (words, offset) { - this._cipher.decryptBlock(words, offset); - } - }); - - return ECB; - }()); - - - return CryptoJS.mode.ECB; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ofb.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-ofb.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Output Feedback block mode. - */ - CryptoJS.mode.OFB = (function () { - var OFB = CryptoJS.lib.BlockCipherMode.extend(); - - var Encryptor = OFB.Encryptor = OFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var keystream = this._keystream; - - // Generate keystream - if (iv) { - keystream = this._keystream = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - OFB.Decryptor = Encryptor; - - return OFB; - }()); - - - return CryptoJS.mode.OFB; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-ansix923.js": -/*!************************************************!*\ - !*** ./node_modules/crypto-js/pad-ansix923.js ***! - \************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * ANSI X.923 padding strategy. - */ - CryptoJS.pad.AnsiX923 = { - pad: function (data, blockSize) { - // Shortcuts - var dataSigBytes = data.sigBytes; - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; - - // Compute last byte position - var lastBytePos = dataSigBytes + nPaddingBytes - 1; - - // Pad - data.clamp(); - data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); - data.sigBytes += nPaddingBytes; - }, - - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - - return CryptoJS.pad.Ansix923; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-iso10126.js": -/*!************************************************!*\ - !*** ./node_modules/crypto-js/pad-iso10126.js ***! - \************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * ISO 10126 padding strategy. - */ - CryptoJS.pad.Iso10126 = { - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - - // Pad - data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). - concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); - }, - - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - - return CryptoJS.pad.Iso10126; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-iso97971.js": -/*!************************************************!*\ - !*** ./node_modules/crypto-js/pad-iso97971.js ***! - \************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * ISO/IEC 9797-1 Padding Method 2. - */ - CryptoJS.pad.Iso97971 = { - pad: function (data, blockSize) { - // Add 0x80 byte - data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); - - // Zero pad the rest - CryptoJS.pad.ZeroPadding.pad(data, blockSize); - }, - - unpad: function (data) { - // Remove zero padding - CryptoJS.pad.ZeroPadding.unpad(data); - - // Remove one more byte -- the 0x80 byte - data.sigBytes--; - } - }; - - - return CryptoJS.pad.Iso97971; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-nopadding.js": -/*!*************************************************!*\ - !*** ./node_modules/crypto-js/pad-nopadding.js ***! - \*************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * A noop padding strategy. - */ - CryptoJS.pad.NoPadding = { - pad: function () { - }, - - unpad: function () { - } - }; - - - return CryptoJS.pad.NoPadding; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-zeropadding.js": -/*!***************************************************!*\ - !*** ./node_modules/crypto-js/pad-zeropadding.js ***! - \***************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Zero padding strategy. - */ - CryptoJS.pad.ZeroPadding = { - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Pad - data.clamp(); - data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); - }, - - unpad: function (data) { - // Shortcut - var dataWords = data.words; - - // Unpad - var i = data.sigBytes - 1; - for (var i = data.sigBytes - 1; i >= 0; i--) { - if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { - data.sigBytes = i + 1; - break; - } - } - } - }; - - - return CryptoJS.pad.ZeroPadding; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pbkdf2.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/pbkdf2.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA256 = C_algo.SHA256; - var HMAC = C_algo.HMAC; - - /** - * Password-Based Key Derivation Function 2 algorithm. - */ - var PBKDF2 = C_algo.PBKDF2 = Base.extend({ - /** - * Configuration options. - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hasher to use. Default: SHA256 - * @property {number} iterations The number of iterations to perform. Default: 250000 - */ - cfg: Base.extend({ - keySize: 128/32, - hasher: SHA256, - iterations: 250000 - }), - - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * var kdf = CryptoJS.algo.PBKDF2.create(); - * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); - * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); - */ - init: function (cfg) { - this.cfg = this.cfg.extend(cfg); - }, - - /** - * Computes the Password-Based Key Derivation Function 2. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * var key = kdf.compute(password, salt); - */ - compute: function (password, salt) { - // Shortcut - var cfg = this.cfg; - - // Init HMAC - var hmac = HMAC.create(cfg.hasher, password); - - // Initial values - var derivedKey = WordArray.create(); - var blockIndex = WordArray.create([0x00000001]); - - // Shortcuts - var derivedKeyWords = derivedKey.words; - var blockIndexWords = blockIndex.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; - - // Generate key - while (derivedKeyWords.length < keySize) { - var block = hmac.update(salt).finalize(blockIndex); - hmac.reset(); - - // Shortcuts - var blockWords = block.words; - var blockWordsLength = blockWords.length; - - // Iterations - var intermediate = block; - for (var i = 1; i < iterations; i++) { - intermediate = hmac.finalize(intermediate); - hmac.reset(); - - // Shortcut - var intermediateWords = intermediate.words; - - // XOR intermediate with block - for (var j = 0; j < blockWordsLength; j++) { - blockWords[j] ^= intermediateWords[j]; - } - } - - derivedKey.concat(block); - blockIndexWords[0]++; - } - derivedKey.sigBytes = keySize * 4; - - return derivedKey; - } - }); - - /** - * Computes the Password-Based Key Derivation Function 2. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * @param {Object} cfg (Optional) The configuration options to use for this computation. - * - * @return {WordArray} The derived key. - * - * @static - * - * @example - * - * var key = CryptoJS.PBKDF2(password, salt); - * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); - * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); - */ - C.PBKDF2 = function (password, salt, cfg) { - return PBKDF2.create(cfg).compute(password, salt); - }; - }()); - - - return CryptoJS.PBKDF2; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/rabbit-legacy.js": -/*!*************************************************!*\ - !*** ./node_modules/crypto-js/rabbit-legacy.js ***! - \*************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - // Reusable objects - var S = []; - var C_ = []; - var G = []; - - /** - * Rabbit stream cipher algorithm. - * - * This is a legacy version that neglected to convert the key to little-endian. - * This error doesn't affect the cipher's security, - * but it does affect its compatibility with other implementations. - */ - var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var K = this._key.words; - var iv = this.cfg.iv; - - // Generate initial state values - var X = this._X = [ - K[0], (K[3] << 16) | (K[2] >>> 16), - K[1], (K[0] << 16) | (K[3] >>> 16), - K[2], (K[1] << 16) | (K[0] >>> 16), - K[3], (K[2] << 16) | (K[1] >>> 16) - ]; - - // Generate initial counter values - var C = this._C = [ - (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), - (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), - (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), - (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) - ]; - - // Carry bit - this._b = 0; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - - // Modify the counters - for (var i = 0; i < 8; i++) { - C[i] ^= X[(i + 4) & 7]; - } - - // IV setup - if (iv) { - // Shortcuts - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; - - // Generate four subvectors - var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); - var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); - var i1 = (i0 >>> 16) | (i2 & 0xffff0000); - var i3 = (i2 << 16) | (i0 & 0x0000ffff); - - // Modify counter values - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - } - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var X = this._X; - - // Iterate the system - nextState.call(this); - - // Generate four keystream words - S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); - S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); - S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); - S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); - - for (var i = 0; i < 4; i++) { - // Swap endian - S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | - (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); - - // Encrypt - M[offset + i] ^= S[i]; - } - }, - - blockSize: 128/32, - - ivSize: 64/32 - }); - - function nextState() { - // Shortcuts - var X = this._X; - var C = this._C; - - // Save old counter values - for (var i = 0; i < 8; i++) { - C_[i] = C[i]; - } - - // Calculate new counter values - C[0] = (C[0] + 0x4d34d34d + this._b) | 0; - C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; - C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; - C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; - C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; - C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; - C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; - C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; - this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; - - // Calculate the g-values - for (var i = 0; i < 8; i++) { - var gx = X[i] + C[i]; - - // Construct high and low argument for squaring - var ga = gx & 0xffff; - var gb = gx >>> 16; - - // Calculate high and low result of squaring - var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; - var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); - - // High XOR low - G[i] = gh ^ gl; - } - - // Calculate new state values - X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; - X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; - X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; - X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; - X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; - X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; - X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; - X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); - */ - C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); - }()); - - - return CryptoJS.RabbitLegacy; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/rabbit.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/rabbit.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - // Reusable objects - var S = []; - var C_ = []; - var G = []; - - /** - * Rabbit stream cipher algorithm - */ - var Rabbit = C_algo.Rabbit = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var K = this._key.words; - var iv = this.cfg.iv; - - // Swap endian - for (var i = 0; i < 4; i++) { - K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | - (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); - } - - // Generate initial state values - var X = this._X = [ - K[0], (K[3] << 16) | (K[2] >>> 16), - K[1], (K[0] << 16) | (K[3] >>> 16), - K[2], (K[1] << 16) | (K[0] >>> 16), - K[3], (K[2] << 16) | (K[1] >>> 16) - ]; - - // Generate initial counter values - var C = this._C = [ - (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), - (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), - (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), - (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) - ]; - - // Carry bit - this._b = 0; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - - // Modify the counters - for (var i = 0; i < 8; i++) { - C[i] ^= X[(i + 4) & 7]; - } - - // IV setup - if (iv) { - // Shortcuts - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; - - // Generate four subvectors - var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); - var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); - var i1 = (i0 >>> 16) | (i2 & 0xffff0000); - var i3 = (i2 << 16) | (i0 & 0x0000ffff); - - // Modify counter values - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - } - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var X = this._X; - - // Iterate the system - nextState.call(this); - - // Generate four keystream words - S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); - S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); - S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); - S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); - - for (var i = 0; i < 4; i++) { - // Swap endian - S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | - (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); - - // Encrypt - M[offset + i] ^= S[i]; - } - }, - - blockSize: 128/32, - - ivSize: 64/32 - }); - - function nextState() { - // Shortcuts - var X = this._X; - var C = this._C; - - // Save old counter values - for (var i = 0; i < 8; i++) { - C_[i] = C[i]; - } - - // Calculate new counter values - C[0] = (C[0] + 0x4d34d34d + this._b) | 0; - C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; - C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; - C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; - C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; - C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; - C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; - C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; - this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; - - // Calculate the g-values - for (var i = 0; i < 8; i++) { - var gx = X[i] + C[i]; - - // Construct high and low argument for squaring - var ga = gx & 0xffff; - var gb = gx >>> 16; - - // Calculate high and low result of squaring - var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; - var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); - - // High XOR low - G[i] = gh ^ gl; - } - - // Calculate new state values - X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; - X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; - X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; - X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; - X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; - X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; - X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; - X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); - * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); - */ - C.Rabbit = StreamCipher._createHelper(Rabbit); - }()); - - - return CryptoJS.Rabbit; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/rc4.js": -/*!***************************************!*\ - !*** ./node_modules/crypto-js/rc4.js ***! - \***************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - /** - * RC4 stream cipher algorithm. - */ - var RC4 = C_algo.RC4 = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - var keySigBytes = key.sigBytes; - - // Init sbox - var S = this._S = []; - for (var i = 0; i < 256; i++) { - S[i] = i; - } - - // Key setup - for (var i = 0, j = 0; i < 256; i++) { - var keyByteIndex = i % keySigBytes; - var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; - - j = (j + S[i] + keyByte) % 256; - - // Swap - var t = S[i]; - S[i] = S[j]; - S[j] = t; - } - - // Counters - this._i = this._j = 0; - }, - - _doProcessBlock: function (M, offset) { - M[offset] ^= generateKeystreamWord.call(this); - }, - - keySize: 256/32, - - ivSize: 0 - }); - - function generateKeystreamWord() { - // Shortcuts - var S = this._S; - var i = this._i; - var j = this._j; - - // Generate keystream word - var keystreamWord = 0; - for (var n = 0; n < 4; n++) { - i = (i + 1) % 256; - j = (j + S[i]) % 256; - - // Swap - var t = S[i]; - S[i] = S[j]; - S[j] = t; - - keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); - } - - // Update counters - this._i = i; - this._j = j; - - return keystreamWord; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); - */ - C.RC4 = StreamCipher._createHelper(RC4); - - /** - * Modified RC4 stream cipher algorithm. - */ - var RC4Drop = C_algo.RC4Drop = RC4.extend({ - /** - * Configuration options. - * - * @property {number} drop The number of keystream words to drop. Default 192 - */ - cfg: RC4.cfg.extend({ - drop: 192 - }), - - _doReset: function () { - RC4._doReset.call(this); - - // Drop - for (var i = this.cfg.drop; i > 0; i--) { - generateKeystreamWord.call(this); - } - } - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); - */ - C.RC4Drop = StreamCipher._createHelper(RC4Drop); - }()); - - - return CryptoJS.RC4; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/ripemd160.js": -/*!*********************************************!*\ - !*** ./node_modules/crypto-js/ripemd160.js ***! - \*********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** @preserve - (c) 2012 by Cédric Mesnil. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Constants table - var _zl = WordArray.create([ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, - 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, - 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, - 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); - var _zr = WordArray.create([ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, - 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, - 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, - 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, - 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); - var _sl = WordArray.create([ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, - 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, - 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, - 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, - 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); - var _sr = WordArray.create([ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, - 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, - 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, - 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, - 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); - - var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); - var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); - - /** - * RIPEMD160 hash algorithm. - */ - var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ - _doReset: function () { - this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); - }, - - _doProcessBlock: function (M, offset) { - - // Swap endian - for (var i = 0; i < 16; i++) { - // Shortcuts - var offset_i = offset + i; - var M_offset_i = M[offset_i]; - - // Swap - M[offset_i] = ( - (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | - (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) - ); - } - // Shortcut - var H = this._hash.words; - var hl = _hl.words; - var hr = _hr.words; - var zl = _zl.words; - var zr = _zr.words; - var sl = _sl.words; - var sr = _sr.words; - - // Working variables - var al, bl, cl, dl, el; - var ar, br, cr, dr, er; - - ar = al = H[0]; - br = bl = H[1]; - cr = cl = H[2]; - dr = dl = H[3]; - er = el = H[4]; - // Computation - var t; - for (var i = 0; i < 80; i += 1) { - t = (al + M[offset+zl[i]])|0; - if (i<16){ - t += f1(bl,cl,dl) + hl[0]; - } else if (i<32) { - t += f2(bl,cl,dl) + hl[1]; - } else if (i<48) { - t += f3(bl,cl,dl) + hl[2]; - } else if (i<64) { - t += f4(bl,cl,dl) + hl[3]; - } else {// if (i<80) { - t += f5(bl,cl,dl) + hl[4]; - } - t = t|0; - t = rotl(t,sl[i]); - t = (t+el)|0; - al = el; - el = dl; - dl = rotl(cl, 10); - cl = bl; - bl = t; - - t = (ar + M[offset+zr[i]])|0; - if (i<16){ - t += f5(br,cr,dr) + hr[0]; - } else if (i<32) { - t += f4(br,cr,dr) + hr[1]; - } else if (i<48) { - t += f3(br,cr,dr) + hr[2]; - } else if (i<64) { - t += f2(br,cr,dr) + hr[3]; - } else {// if (i<80) { - t += f1(br,cr,dr) + hr[4]; - } - t = t|0; - t = rotl(t,sr[i]) ; - t = (t+er)|0; - ar = er; - er = dr; - dr = rotl(cr, 10); - cr = br; - br = t; - } - // Intermediate hash value - t = (H[1] + cl + dr)|0; - H[1] = (H[2] + dl + er)|0; - H[2] = (H[3] + el + ar)|0; - H[3] = (H[4] + al + br)|0; - H[4] = (H[0] + bl + cr)|0; - H[0] = t; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( - (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | - (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) - ); - data.sigBytes = (dataWords.length + 1) * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var hash = this._hash; - var H = hash.words; - - // Swap endian - for (var i = 0; i < 5; i++) { - // Shortcut - var H_i = H[i]; - - // Swap - H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | - (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); - } - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - - function f1(x, y, z) { - return ((x) ^ (y) ^ (z)); - - } - - function f2(x, y, z) { - return (((x)&(y)) | ((~x)&(z))); - } - - function f3(x, y, z) { - return (((x) | (~(y))) ^ (z)); - } - - function f4(x, y, z) { - return (((x) & (z)) | ((y)&(~(z)))); - } - - function f5(x, y, z) { - return ((x) ^ ((y) |(~(z)))); - - } - - function rotl(x,n) { - return (x<>>(32-n)); - } - - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.RIPEMD160('message'); - * var hash = CryptoJS.RIPEMD160(wordArray); - */ - C.RIPEMD160 = Hasher._createHelper(RIPEMD160); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacRIPEMD160(message, key); - */ - C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); - }(Math)); - - - return CryptoJS.RIPEMD160; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha1.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/sha1.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Reusable object - var W = []; - - /** - * SHA-1 hash algorithm. - */ - var SHA1 = C_algo.SHA1 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0x67452301, 0xefcdab89, - 0x98badcfe, 0x10325476, - 0xc3d2e1f0 - ]); - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var H = this._hash.words; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - - // Computation - for (var i = 0; i < 80; i++) { - if (i < 16) { - W[i] = M[offset + i] | 0; - } else { - var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; - W[i] = (n << 1) | (n >>> 31); - } - - var t = ((a << 5) | (a >>> 27)) + e + W[i]; - if (i < 20) { - t += ((b & c) | (~b & d)) + 0x5a827999; - } else if (i < 40) { - t += (b ^ c ^ d) + 0x6ed9eba1; - } else if (i < 60) { - t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; - } else /* if (i < 80) */ { - t += (b ^ c ^ d) - 0x359d3e2a; - } - - e = d; - d = c; - c = (b << 30) | (b >>> 2); - b = a; - a = t; - } - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - H[4] = (H[4] + e) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Return final computed hash - return this._hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA1('message'); - * var hash = CryptoJS.SHA1(wordArray); - */ - C.SHA1 = Hasher._createHelper(SHA1); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA1(message, key); - */ - C.HmacSHA1 = Hasher._createHmacHelper(SHA1); - }()); - - - return CryptoJS.SHA1; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha224.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha224.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA256 = C_algo.SHA256; - - /** - * SHA-224 hash algorithm. - */ - var SHA224 = C_algo.SHA224 = SHA256.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, - 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 - ]); - }, - - _doFinalize: function () { - var hash = SHA256._doFinalize.call(this); - - hash.sigBytes -= 4; - - return hash; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA224('message'); - * var hash = CryptoJS.SHA224(wordArray); - */ - C.SHA224 = SHA256._createHelper(SHA224); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA224(message, key); - */ - C.HmacSHA224 = SHA256._createHmacHelper(SHA224); - }()); - - - return CryptoJS.SHA224; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha256.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha256.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Initialization and round constants tables - var H = []; - var K = []; - - // Compute constants - (function () { - function isPrime(n) { - var sqrtN = Math.sqrt(n); - for (var factor = 2; factor <= sqrtN; factor++) { - if (!(n % factor)) { - return false; - } - } - - return true; - } - - function getFractionalBits(n) { - return ((n - (n | 0)) * 0x100000000) | 0; - } - - var n = 2; - var nPrime = 0; - while (nPrime < 64) { - if (isPrime(n)) { - if (nPrime < 8) { - H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); - } - K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); - - nPrime++; - } - - n++; - } - }()); - - // Reusable object - var W = []; - - /** - * SHA-256 hash algorithm. - */ - var SHA256 = C_algo.SHA256 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init(H.slice(0)); - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var H = this._hash.words; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - var f = H[5]; - var g = H[6]; - var h = H[7]; - - // Computation - for (var i = 0; i < 64; i++) { - if (i < 16) { - W[i] = M[offset + i] | 0; - } else { - var gamma0x = W[i - 15]; - var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ - ((gamma0x << 14) | (gamma0x >>> 18)) ^ - (gamma0x >>> 3); - - var gamma1x = W[i - 2]; - var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ - ((gamma1x << 13) | (gamma1x >>> 19)) ^ - (gamma1x >>> 10); - - W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; - } - - var ch = (e & f) ^ (~e & g); - var maj = (a & b) ^ (a & c) ^ (b & c); - - var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); - var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); - - var t1 = h + sigma1 + ch + K[i] + W[i]; - var t2 = sigma0 + maj; - - h = g; - g = f; - f = e; - e = (d + t1) | 0; - d = c; - c = b; - b = a; - a = (t1 + t2) | 0; - } - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - H[4] = (H[4] + e) | 0; - H[5] = (H[5] + f) | 0; - H[6] = (H[6] + g) | 0; - H[7] = (H[7] + h) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Return final computed hash - return this._hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA256('message'); - * var hash = CryptoJS.SHA256(wordArray); - */ - C.SHA256 = Hasher._createHelper(SHA256); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA256(message, key); - */ - C.HmacSHA256 = Hasher._createHmacHelper(SHA256); - }(Math)); - - - return CryptoJS.SHA256; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha3.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/sha3.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var C_algo = C.algo; - - // Constants tables - var RHO_OFFSETS = []; - var PI_INDEXES = []; - var ROUND_CONSTANTS = []; - - // Compute Constants - (function () { - // Compute rho offset constants - var x = 1, y = 0; - for (var t = 0; t < 24; t++) { - RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; - - var newX = y % 5; - var newY = (2 * x + 3 * y) % 5; - x = newX; - y = newY; - } - - // Compute pi index constants - for (var x = 0; x < 5; x++) { - for (var y = 0; y < 5; y++) { - PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; - } - } - - // Compute round constants - var LFSR = 0x01; - for (var i = 0; i < 24; i++) { - var roundConstantMsw = 0; - var roundConstantLsw = 0; - - for (var j = 0; j < 7; j++) { - if (LFSR & 0x01) { - var bitPosition = (1 << j) - 1; - if (bitPosition < 32) { - roundConstantLsw ^= 1 << bitPosition; - } else /* if (bitPosition >= 32) */ { - roundConstantMsw ^= 1 << (bitPosition - 32); - } - } - - // Compute next LFSR - if (LFSR & 0x80) { - // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 - LFSR = (LFSR << 1) ^ 0x71; - } else { - LFSR <<= 1; - } - } - - ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); - } - }()); - - // Reusable objects for temporary values - var T = []; - (function () { - for (var i = 0; i < 25; i++) { - T[i] = X64Word.create(); - } - }()); - - /** - * SHA-3 hash algorithm. - */ - var SHA3 = C_algo.SHA3 = Hasher.extend({ - /** - * Configuration options. - * - * @property {number} outputLength - * The desired number of bits in the output hash. - * Only values permitted are: 224, 256, 384, 512. - * Default: 512 - */ - cfg: Hasher.cfg.extend({ - outputLength: 512 - }), - - _doReset: function () { - var state = this._state = [] - for (var i = 0; i < 25; i++) { - state[i] = new X64Word.init(); - } - - this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; - }, - - _doProcessBlock: function (M, offset) { - // Shortcuts - var state = this._state; - var nBlockSizeLanes = this.blockSize / 2; - - // Absorb - for (var i = 0; i < nBlockSizeLanes; i++) { - // Shortcuts - var M2i = M[offset + 2 * i]; - var M2i1 = M[offset + 2 * i + 1]; - - // Swap endian - M2i = ( - (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | - (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) - ); - M2i1 = ( - (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | - (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) - ); - - // Absorb message into state - var lane = state[i]; - lane.high ^= M2i1; - lane.low ^= M2i; - } - - // Rounds - for (var round = 0; round < 24; round++) { - // Theta - for (var x = 0; x < 5; x++) { - // Mix column lanes - var tMsw = 0, tLsw = 0; - for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - tMsw ^= lane.high; - tLsw ^= lane.low; - } - - // Temporary values - var Tx = T[x]; - Tx.high = tMsw; - Tx.low = tLsw; - } - for (var x = 0; x < 5; x++) { - // Shortcuts - var Tx4 = T[(x + 4) % 5]; - var Tx1 = T[(x + 1) % 5]; - var Tx1Msw = Tx1.high; - var Tx1Lsw = Tx1.low; - - // Mix surrounding columns - var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); - var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); - for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - lane.high ^= tMsw; - lane.low ^= tLsw; - } - } - - // Rho Pi - for (var laneIndex = 1; laneIndex < 25; laneIndex++) { - var tMsw; - var tLsw; - - // Shortcuts - var lane = state[laneIndex]; - var laneMsw = lane.high; - var laneLsw = lane.low; - var rhoOffset = RHO_OFFSETS[laneIndex]; - - // Rotate lanes - if (rhoOffset < 32) { - tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); - tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); - } else /* if (rhoOffset >= 32) */ { - tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); - tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); - } - - // Transpose lanes - var TPiLane = T[PI_INDEXES[laneIndex]]; - TPiLane.high = tMsw; - TPiLane.low = tLsw; - } - - // Rho pi at x = y = 0 - var T0 = T[0]; - var state0 = state[0]; - T0.high = state0.high; - T0.low = state0.low; - - // Chi - for (var x = 0; x < 5; x++) { - for (var y = 0; y < 5; y++) { - // Shortcuts - var laneIndex = x + 5 * y; - var lane = state[laneIndex]; - var TLane = T[laneIndex]; - var Tx1Lane = T[((x + 1) % 5) + 5 * y]; - var Tx2Lane = T[((x + 2) % 5) + 5 * y]; - - // Mix rows - lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); - lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); - } - } - - // Iota - var lane = state[0]; - var roundConstant = ROUND_CONSTANTS[round]; - lane.high ^= roundConstant.high; - lane.low ^= roundConstant.low; - } - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - var blockSizeBits = this.blockSize * 32; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); - dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var state = this._state; - var outputLengthBytes = this.cfg.outputLength / 8; - var outputLengthLanes = outputLengthBytes / 8; - - // Squeeze - var hashWords = []; - for (var i = 0; i < outputLengthLanes; i++) { - // Shortcuts - var lane = state[i]; - var laneMsw = lane.high; - var laneLsw = lane.low; - - // Swap endian - laneMsw = ( - (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | - (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) - ); - laneLsw = ( - (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | - (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) - ); - - // Squeeze state to retrieve hash - hashWords.push(laneLsw); - hashWords.push(laneMsw); - } - - // Return final computed hash - return new WordArray.init(hashWords, outputLengthBytes); - }, - - clone: function () { - var clone = Hasher.clone.call(this); - - var state = clone._state = this._state.slice(0); - for (var i = 0; i < 25; i++) { - state[i] = state[i].clone(); - } - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA3('message'); - * var hash = CryptoJS.SHA3(wordArray); - */ - C.SHA3 = Hasher._createHelper(SHA3); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA3(message, key); - */ - C.HmacSHA3 = Hasher._createHmacHelper(SHA3); - }(Math)); - - - return CryptoJS.SHA3; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha384.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha384.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js"), __webpack_require__(/*! ./sha512 */ "./node_modules/crypto-js/sha512.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; - var SHA512 = C_algo.SHA512; - - /** - * SHA-384 hash algorithm. - */ - var SHA384 = C_algo.SHA384 = SHA512.extend({ - _doReset: function () { - this._hash = new X64WordArray.init([ - new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), - new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), - new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), - new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) - ]); - }, - - _doFinalize: function () { - var hash = SHA512._doFinalize.call(this); - - hash.sigBytes -= 16; - - return hash; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA384('message'); - * var hash = CryptoJS.SHA384(wordArray); - */ - C.SHA384 = SHA512._createHelper(SHA384); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA384(message, key); - */ - C.HmacSHA384 = SHA512._createHmacHelper(SHA384); - }()); - - - return CryptoJS.SHA384; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha512.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha512.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; - - function X64Word_create() { - return X64Word.create.apply(X64Word, arguments); - } - - // Constants - var K = [ - X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), - X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), - X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), - X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), - X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), - X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), - X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), - X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), - X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), - X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), - X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), - X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), - X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), - X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), - X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), - X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), - X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), - X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), - X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), - X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), - X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), - X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), - X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), - X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), - X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), - X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), - X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), - X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), - X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), - X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), - X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), - X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), - X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), - X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), - X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), - X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), - X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), - X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), - X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), - X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) - ]; - - // Reusable objects - var W = []; - (function () { - for (var i = 0; i < 80; i++) { - W[i] = X64Word_create(); - } - }()); - - /** - * SHA-512 hash algorithm. - */ - var SHA512 = C_algo.SHA512 = Hasher.extend({ - _doReset: function () { - this._hash = new X64WordArray.init([ - new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), - new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), - new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), - new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) - ]); - }, - - _doProcessBlock: function (M, offset) { - // Shortcuts - var H = this._hash.words; - - var H0 = H[0]; - var H1 = H[1]; - var H2 = H[2]; - var H3 = H[3]; - var H4 = H[4]; - var H5 = H[5]; - var H6 = H[6]; - var H7 = H[7]; - - var H0h = H0.high; - var H0l = H0.low; - var H1h = H1.high; - var H1l = H1.low; - var H2h = H2.high; - var H2l = H2.low; - var H3h = H3.high; - var H3l = H3.low; - var H4h = H4.high; - var H4l = H4.low; - var H5h = H5.high; - var H5l = H5.low; - var H6h = H6.high; - var H6l = H6.low; - var H7h = H7.high; - var H7l = H7.low; - - // Working variables - var ah = H0h; - var al = H0l; - var bh = H1h; - var bl = H1l; - var ch = H2h; - var cl = H2l; - var dh = H3h; - var dl = H3l; - var eh = H4h; - var el = H4l; - var fh = H5h; - var fl = H5l; - var gh = H6h; - var gl = H6l; - var hh = H7h; - var hl = H7l; - - // Rounds - for (var i = 0; i < 80; i++) { - var Wil; - var Wih; - - // Shortcut - var Wi = W[i]; - - // Extend message - if (i < 16) { - Wih = Wi.high = M[offset + i * 2] | 0; - Wil = Wi.low = M[offset + i * 2 + 1] | 0; - } else { - // Gamma0 - var gamma0x = W[i - 15]; - var gamma0xh = gamma0x.high; - var gamma0xl = gamma0x.low; - var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); - var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); - - // Gamma1 - var gamma1x = W[i - 2]; - var gamma1xh = gamma1x.high; - var gamma1xl = gamma1x.low; - var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); - var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); - - // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] - var Wi7 = W[i - 7]; - var Wi7h = Wi7.high; - var Wi7l = Wi7.low; - - var Wi16 = W[i - 16]; - var Wi16h = Wi16.high; - var Wi16l = Wi16.low; - - Wil = gamma0l + Wi7l; - Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); - Wil = Wil + gamma1l; - Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); - Wil = Wil + Wi16l; - Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); - - Wi.high = Wih; - Wi.low = Wil; - } - - var chh = (eh & fh) ^ (~eh & gh); - var chl = (el & fl) ^ (~el & gl); - var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); - var majl = (al & bl) ^ (al & cl) ^ (bl & cl); - - var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); - var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); - var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); - var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); - - // t1 = h + sigma1 + ch + K[i] + W[i] - var Ki = K[i]; - var Kih = Ki.high; - var Kil = Ki.low; - - var t1l = hl + sigma1l; - var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); - var t1l = t1l + chl; - var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); - var t1l = t1l + Kil; - var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); - var t1l = t1l + Wil; - var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); - - // t2 = sigma0 + maj - var t2l = sigma0l + majl; - var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); - - // Update working variables - hh = gh; - hl = gl; - gh = fh; - gl = fl; - fh = eh; - fl = el; - el = (dl + t1l) | 0; - eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; - dh = ch; - dl = cl; - ch = bh; - cl = bl; - bh = ah; - bl = al; - al = (t1l + t2l) | 0; - ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; - } - - // Intermediate hash value - H0l = H0.low = (H0l + al); - H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); - H1l = H1.low = (H1l + bl); - H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); - H2l = H2.low = (H2l + cl); - H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); - H3l = H3.low = (H3l + dl); - H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); - H4l = H4.low = (H4l + el); - H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); - H5l = H5.low = (H5l + fl); - H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); - H6l = H6.low = (H6l + gl); - H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); - H7l = H7.low = (H7l + hl); - H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Convert hash to 32-bit word array before returning - var hash = this._hash.toX32(); - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - }, - - blockSize: 1024/32 - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA512('message'); - * var hash = CryptoJS.SHA512(wordArray); - */ - C.SHA512 = Hasher._createHelper(SHA512); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA512(message, key); - */ - C.HmacSHA512 = Hasher._createHmacHelper(SHA512); - }()); - - - return CryptoJS.SHA512; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/tripledes.js": -/*!*********************************************!*\ - !*** ./node_modules/crypto-js/tripledes.js ***! - \*********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - // Permuted Choice 1 constants - var PC1 = [ - 57, 49, 41, 33, 25, 17, 9, 1, - 58, 50, 42, 34, 26, 18, 10, 2, - 59, 51, 43, 35, 27, 19, 11, 3, - 60, 52, 44, 36, 63, 55, 47, 39, - 31, 23, 15, 7, 62, 54, 46, 38, - 30, 22, 14, 6, 61, 53, 45, 37, - 29, 21, 13, 5, 28, 20, 12, 4 - ]; - - // Permuted Choice 2 constants - var PC2 = [ - 14, 17, 11, 24, 1, 5, - 3, 28, 15, 6, 21, 10, - 23, 19, 12, 4, 26, 8, - 16, 7, 27, 20, 13, 2, - 41, 52, 31, 37, 47, 55, - 30, 40, 51, 45, 33, 48, - 44, 49, 39, 56, 34, 53, - 46, 42, 50, 36, 29, 32 - ]; - - // Cumulative bit shift constants - var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; - - // SBOXes and round permutation constants - var SBOX_P = [ - { - 0x0: 0x808200, - 0x10000000: 0x8000, - 0x20000000: 0x808002, - 0x30000000: 0x2, - 0x40000000: 0x200, - 0x50000000: 0x808202, - 0x60000000: 0x800202, - 0x70000000: 0x800000, - 0x80000000: 0x202, - 0x90000000: 0x800200, - 0xa0000000: 0x8200, - 0xb0000000: 0x808000, - 0xc0000000: 0x8002, - 0xd0000000: 0x800002, - 0xe0000000: 0x0, - 0xf0000000: 0x8202, - 0x8000000: 0x0, - 0x18000000: 0x808202, - 0x28000000: 0x8202, - 0x38000000: 0x8000, - 0x48000000: 0x808200, - 0x58000000: 0x200, - 0x68000000: 0x808002, - 0x78000000: 0x2, - 0x88000000: 0x800200, - 0x98000000: 0x8200, - 0xa8000000: 0x808000, - 0xb8000000: 0x800202, - 0xc8000000: 0x800002, - 0xd8000000: 0x8002, - 0xe8000000: 0x202, - 0xf8000000: 0x800000, - 0x1: 0x8000, - 0x10000001: 0x2, - 0x20000001: 0x808200, - 0x30000001: 0x800000, - 0x40000001: 0x808002, - 0x50000001: 0x8200, - 0x60000001: 0x200, - 0x70000001: 0x800202, - 0x80000001: 0x808202, - 0x90000001: 0x808000, - 0xa0000001: 0x800002, - 0xb0000001: 0x8202, - 0xc0000001: 0x202, - 0xd0000001: 0x800200, - 0xe0000001: 0x8002, - 0xf0000001: 0x0, - 0x8000001: 0x808202, - 0x18000001: 0x808000, - 0x28000001: 0x800000, - 0x38000001: 0x200, - 0x48000001: 0x8000, - 0x58000001: 0x800002, - 0x68000001: 0x2, - 0x78000001: 0x8202, - 0x88000001: 0x8002, - 0x98000001: 0x800202, - 0xa8000001: 0x202, - 0xb8000001: 0x808200, - 0xc8000001: 0x800200, - 0xd8000001: 0x0, - 0xe8000001: 0x8200, - 0xf8000001: 0x808002 - }, - { - 0x0: 0x40084010, - 0x1000000: 0x4000, - 0x2000000: 0x80000, - 0x3000000: 0x40080010, - 0x4000000: 0x40000010, - 0x5000000: 0x40084000, - 0x6000000: 0x40004000, - 0x7000000: 0x10, - 0x8000000: 0x84000, - 0x9000000: 0x40004010, - 0xa000000: 0x40000000, - 0xb000000: 0x84010, - 0xc000000: 0x80010, - 0xd000000: 0x0, - 0xe000000: 0x4010, - 0xf000000: 0x40080000, - 0x800000: 0x40004000, - 0x1800000: 0x84010, - 0x2800000: 0x10, - 0x3800000: 0x40004010, - 0x4800000: 0x40084010, - 0x5800000: 0x40000000, - 0x6800000: 0x80000, - 0x7800000: 0x40080010, - 0x8800000: 0x80010, - 0x9800000: 0x0, - 0xa800000: 0x4000, - 0xb800000: 0x40080000, - 0xc800000: 0x40000010, - 0xd800000: 0x84000, - 0xe800000: 0x40084000, - 0xf800000: 0x4010, - 0x10000000: 0x0, - 0x11000000: 0x40080010, - 0x12000000: 0x40004010, - 0x13000000: 0x40084000, - 0x14000000: 0x40080000, - 0x15000000: 0x10, - 0x16000000: 0x84010, - 0x17000000: 0x4000, - 0x18000000: 0x4010, - 0x19000000: 0x80000, - 0x1a000000: 0x80010, - 0x1b000000: 0x40000010, - 0x1c000000: 0x84000, - 0x1d000000: 0x40004000, - 0x1e000000: 0x40000000, - 0x1f000000: 0x40084010, - 0x10800000: 0x84010, - 0x11800000: 0x80000, - 0x12800000: 0x40080000, - 0x13800000: 0x4000, - 0x14800000: 0x40004000, - 0x15800000: 0x40084010, - 0x16800000: 0x10, - 0x17800000: 0x40000000, - 0x18800000: 0x40084000, - 0x19800000: 0x40000010, - 0x1a800000: 0x40004010, - 0x1b800000: 0x80010, - 0x1c800000: 0x0, - 0x1d800000: 0x4010, - 0x1e800000: 0x40080010, - 0x1f800000: 0x84000 - }, - { - 0x0: 0x104, - 0x100000: 0x0, - 0x200000: 0x4000100, - 0x300000: 0x10104, - 0x400000: 0x10004, - 0x500000: 0x4000004, - 0x600000: 0x4010104, - 0x700000: 0x4010000, - 0x800000: 0x4000000, - 0x900000: 0x4010100, - 0xa00000: 0x10100, - 0xb00000: 0x4010004, - 0xc00000: 0x4000104, - 0xd00000: 0x10000, - 0xe00000: 0x4, - 0xf00000: 0x100, - 0x80000: 0x4010100, - 0x180000: 0x4010004, - 0x280000: 0x0, - 0x380000: 0x4000100, - 0x480000: 0x4000004, - 0x580000: 0x10000, - 0x680000: 0x10004, - 0x780000: 0x104, - 0x880000: 0x4, - 0x980000: 0x100, - 0xa80000: 0x4010000, - 0xb80000: 0x10104, - 0xc80000: 0x10100, - 0xd80000: 0x4000104, - 0xe80000: 0x4010104, - 0xf80000: 0x4000000, - 0x1000000: 0x4010100, - 0x1100000: 0x10004, - 0x1200000: 0x10000, - 0x1300000: 0x4000100, - 0x1400000: 0x100, - 0x1500000: 0x4010104, - 0x1600000: 0x4000004, - 0x1700000: 0x0, - 0x1800000: 0x4000104, - 0x1900000: 0x4000000, - 0x1a00000: 0x4, - 0x1b00000: 0x10100, - 0x1c00000: 0x4010000, - 0x1d00000: 0x104, - 0x1e00000: 0x10104, - 0x1f00000: 0x4010004, - 0x1080000: 0x4000000, - 0x1180000: 0x104, - 0x1280000: 0x4010100, - 0x1380000: 0x0, - 0x1480000: 0x10004, - 0x1580000: 0x4000100, - 0x1680000: 0x100, - 0x1780000: 0x4010004, - 0x1880000: 0x10000, - 0x1980000: 0x4010104, - 0x1a80000: 0x10104, - 0x1b80000: 0x4000004, - 0x1c80000: 0x4000104, - 0x1d80000: 0x4010000, - 0x1e80000: 0x4, - 0x1f80000: 0x10100 - }, - { - 0x0: 0x80401000, - 0x10000: 0x80001040, - 0x20000: 0x401040, - 0x30000: 0x80400000, - 0x40000: 0x0, - 0x50000: 0x401000, - 0x60000: 0x80000040, - 0x70000: 0x400040, - 0x80000: 0x80000000, - 0x90000: 0x400000, - 0xa0000: 0x40, - 0xb0000: 0x80001000, - 0xc0000: 0x80400040, - 0xd0000: 0x1040, - 0xe0000: 0x1000, - 0xf0000: 0x80401040, - 0x8000: 0x80001040, - 0x18000: 0x40, - 0x28000: 0x80400040, - 0x38000: 0x80001000, - 0x48000: 0x401000, - 0x58000: 0x80401040, - 0x68000: 0x0, - 0x78000: 0x80400000, - 0x88000: 0x1000, - 0x98000: 0x80401000, - 0xa8000: 0x400000, - 0xb8000: 0x1040, - 0xc8000: 0x80000000, - 0xd8000: 0x400040, - 0xe8000: 0x401040, - 0xf8000: 0x80000040, - 0x100000: 0x400040, - 0x110000: 0x401000, - 0x120000: 0x80000040, - 0x130000: 0x0, - 0x140000: 0x1040, - 0x150000: 0x80400040, - 0x160000: 0x80401000, - 0x170000: 0x80001040, - 0x180000: 0x80401040, - 0x190000: 0x80000000, - 0x1a0000: 0x80400000, - 0x1b0000: 0x401040, - 0x1c0000: 0x80001000, - 0x1d0000: 0x400000, - 0x1e0000: 0x40, - 0x1f0000: 0x1000, - 0x108000: 0x80400000, - 0x118000: 0x80401040, - 0x128000: 0x0, - 0x138000: 0x401000, - 0x148000: 0x400040, - 0x158000: 0x80000000, - 0x168000: 0x80001040, - 0x178000: 0x40, - 0x188000: 0x80000040, - 0x198000: 0x1000, - 0x1a8000: 0x80001000, - 0x1b8000: 0x80400040, - 0x1c8000: 0x1040, - 0x1d8000: 0x80401000, - 0x1e8000: 0x400000, - 0x1f8000: 0x401040 - }, - { - 0x0: 0x80, - 0x1000: 0x1040000, - 0x2000: 0x40000, - 0x3000: 0x20000000, - 0x4000: 0x20040080, - 0x5000: 0x1000080, - 0x6000: 0x21000080, - 0x7000: 0x40080, - 0x8000: 0x1000000, - 0x9000: 0x20040000, - 0xa000: 0x20000080, - 0xb000: 0x21040080, - 0xc000: 0x21040000, - 0xd000: 0x0, - 0xe000: 0x1040080, - 0xf000: 0x21000000, - 0x800: 0x1040080, - 0x1800: 0x21000080, - 0x2800: 0x80, - 0x3800: 0x1040000, - 0x4800: 0x40000, - 0x5800: 0x20040080, - 0x6800: 0x21040000, - 0x7800: 0x20000000, - 0x8800: 0x20040000, - 0x9800: 0x0, - 0xa800: 0x21040080, - 0xb800: 0x1000080, - 0xc800: 0x20000080, - 0xd800: 0x21000000, - 0xe800: 0x1000000, - 0xf800: 0x40080, - 0x10000: 0x40000, - 0x11000: 0x80, - 0x12000: 0x20000000, - 0x13000: 0x21000080, - 0x14000: 0x1000080, - 0x15000: 0x21040000, - 0x16000: 0x20040080, - 0x17000: 0x1000000, - 0x18000: 0x21040080, - 0x19000: 0x21000000, - 0x1a000: 0x1040000, - 0x1b000: 0x20040000, - 0x1c000: 0x40080, - 0x1d000: 0x20000080, - 0x1e000: 0x0, - 0x1f000: 0x1040080, - 0x10800: 0x21000080, - 0x11800: 0x1000000, - 0x12800: 0x1040000, - 0x13800: 0x20040080, - 0x14800: 0x20000000, - 0x15800: 0x1040080, - 0x16800: 0x80, - 0x17800: 0x21040000, - 0x18800: 0x40080, - 0x19800: 0x21040080, - 0x1a800: 0x0, - 0x1b800: 0x21000000, - 0x1c800: 0x1000080, - 0x1d800: 0x40000, - 0x1e800: 0x20040000, - 0x1f800: 0x20000080 - }, - { - 0x0: 0x10000008, - 0x100: 0x2000, - 0x200: 0x10200000, - 0x300: 0x10202008, - 0x400: 0x10002000, - 0x500: 0x200000, - 0x600: 0x200008, - 0x700: 0x10000000, - 0x800: 0x0, - 0x900: 0x10002008, - 0xa00: 0x202000, - 0xb00: 0x8, - 0xc00: 0x10200008, - 0xd00: 0x202008, - 0xe00: 0x2008, - 0xf00: 0x10202000, - 0x80: 0x10200000, - 0x180: 0x10202008, - 0x280: 0x8, - 0x380: 0x200000, - 0x480: 0x202008, - 0x580: 0x10000008, - 0x680: 0x10002000, - 0x780: 0x2008, - 0x880: 0x200008, - 0x980: 0x2000, - 0xa80: 0x10002008, - 0xb80: 0x10200008, - 0xc80: 0x0, - 0xd80: 0x10202000, - 0xe80: 0x202000, - 0xf80: 0x10000000, - 0x1000: 0x10002000, - 0x1100: 0x10200008, - 0x1200: 0x10202008, - 0x1300: 0x2008, - 0x1400: 0x200000, - 0x1500: 0x10000000, - 0x1600: 0x10000008, - 0x1700: 0x202000, - 0x1800: 0x202008, - 0x1900: 0x0, - 0x1a00: 0x8, - 0x1b00: 0x10200000, - 0x1c00: 0x2000, - 0x1d00: 0x10002008, - 0x1e00: 0x10202000, - 0x1f00: 0x200008, - 0x1080: 0x8, - 0x1180: 0x202000, - 0x1280: 0x200000, - 0x1380: 0x10000008, - 0x1480: 0x10002000, - 0x1580: 0x2008, - 0x1680: 0x10202008, - 0x1780: 0x10200000, - 0x1880: 0x10202000, - 0x1980: 0x10200008, - 0x1a80: 0x2000, - 0x1b80: 0x202008, - 0x1c80: 0x200008, - 0x1d80: 0x0, - 0x1e80: 0x10000000, - 0x1f80: 0x10002008 - }, - { - 0x0: 0x100000, - 0x10: 0x2000401, - 0x20: 0x400, - 0x30: 0x100401, - 0x40: 0x2100401, - 0x50: 0x0, - 0x60: 0x1, - 0x70: 0x2100001, - 0x80: 0x2000400, - 0x90: 0x100001, - 0xa0: 0x2000001, - 0xb0: 0x2100400, - 0xc0: 0x2100000, - 0xd0: 0x401, - 0xe0: 0x100400, - 0xf0: 0x2000000, - 0x8: 0x2100001, - 0x18: 0x0, - 0x28: 0x2000401, - 0x38: 0x2100400, - 0x48: 0x100000, - 0x58: 0x2000001, - 0x68: 0x2000000, - 0x78: 0x401, - 0x88: 0x100401, - 0x98: 0x2000400, - 0xa8: 0x2100000, - 0xb8: 0x100001, - 0xc8: 0x400, - 0xd8: 0x2100401, - 0xe8: 0x1, - 0xf8: 0x100400, - 0x100: 0x2000000, - 0x110: 0x100000, - 0x120: 0x2000401, - 0x130: 0x2100001, - 0x140: 0x100001, - 0x150: 0x2000400, - 0x160: 0x2100400, - 0x170: 0x100401, - 0x180: 0x401, - 0x190: 0x2100401, - 0x1a0: 0x100400, - 0x1b0: 0x1, - 0x1c0: 0x0, - 0x1d0: 0x2100000, - 0x1e0: 0x2000001, - 0x1f0: 0x400, - 0x108: 0x100400, - 0x118: 0x2000401, - 0x128: 0x2100001, - 0x138: 0x1, - 0x148: 0x2000000, - 0x158: 0x100000, - 0x168: 0x401, - 0x178: 0x2100400, - 0x188: 0x2000001, - 0x198: 0x2100000, - 0x1a8: 0x0, - 0x1b8: 0x2100401, - 0x1c8: 0x100401, - 0x1d8: 0x400, - 0x1e8: 0x2000400, - 0x1f8: 0x100001 - }, - { - 0x0: 0x8000820, - 0x1: 0x20000, - 0x2: 0x8000000, - 0x3: 0x20, - 0x4: 0x20020, - 0x5: 0x8020820, - 0x6: 0x8020800, - 0x7: 0x800, - 0x8: 0x8020000, - 0x9: 0x8000800, - 0xa: 0x20800, - 0xb: 0x8020020, - 0xc: 0x820, - 0xd: 0x0, - 0xe: 0x8000020, - 0xf: 0x20820, - 0x80000000: 0x800, - 0x80000001: 0x8020820, - 0x80000002: 0x8000820, - 0x80000003: 0x8000000, - 0x80000004: 0x8020000, - 0x80000005: 0x20800, - 0x80000006: 0x20820, - 0x80000007: 0x20, - 0x80000008: 0x8000020, - 0x80000009: 0x820, - 0x8000000a: 0x20020, - 0x8000000b: 0x8020800, - 0x8000000c: 0x0, - 0x8000000d: 0x8020020, - 0x8000000e: 0x8000800, - 0x8000000f: 0x20000, - 0x10: 0x20820, - 0x11: 0x8020800, - 0x12: 0x20, - 0x13: 0x800, - 0x14: 0x8000800, - 0x15: 0x8000020, - 0x16: 0x8020020, - 0x17: 0x20000, - 0x18: 0x0, - 0x19: 0x20020, - 0x1a: 0x8020000, - 0x1b: 0x8000820, - 0x1c: 0x8020820, - 0x1d: 0x20800, - 0x1e: 0x820, - 0x1f: 0x8000000, - 0x80000010: 0x20000, - 0x80000011: 0x800, - 0x80000012: 0x8020020, - 0x80000013: 0x20820, - 0x80000014: 0x20, - 0x80000015: 0x8020000, - 0x80000016: 0x8000000, - 0x80000017: 0x8000820, - 0x80000018: 0x8020820, - 0x80000019: 0x8000020, - 0x8000001a: 0x8000800, - 0x8000001b: 0x0, - 0x8000001c: 0x20800, - 0x8000001d: 0x820, - 0x8000001e: 0x20020, - 0x8000001f: 0x8020800 - } - ]; - - // Masks that select the SBOX input - var SBOX_MASK = [ - 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, - 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f - ]; - - /** - * DES block cipher algorithm. - */ - var DES = C_algo.DES = BlockCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - - // Select 56 bits according to PC1 - var keyBits = []; - for (var i = 0; i < 56; i++) { - var keyBitPos = PC1[i] - 1; - keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; - } - - // Assemble 16 subkeys - var subKeys = this._subKeys = []; - for (var nSubKey = 0; nSubKey < 16; nSubKey++) { - // Create subkey - var subKey = subKeys[nSubKey] = []; - - // Shortcut - var bitShift = BIT_SHIFTS[nSubKey]; - - // Select 48 bits according to PC2 - for (var i = 0; i < 24; i++) { - // Select from the left 28 key bits - subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); - - // Select from the right 28 key bits - subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); - } - - // Since each subkey is applied to an expanded 32-bit input, - // the subkey can be broken into 8 values scaled to 32-bits, - // which allows the key to be used without expansion - subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); - for (var i = 1; i < 7; i++) { - subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); - } - subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); - } - - // Compute inverse subkeys - var invSubKeys = this._invSubKeys = []; - for (var i = 0; i < 16; i++) { - invSubKeys[i] = subKeys[15 - i]; - } - }, - - encryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._subKeys); - }, - - decryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._invSubKeys); - }, - - _doCryptBlock: function (M, offset, subKeys) { - // Get input - this._lBlock = M[offset]; - this._rBlock = M[offset + 1]; - - // Initial permutation - exchangeLR.call(this, 4, 0x0f0f0f0f); - exchangeLR.call(this, 16, 0x0000ffff); - exchangeRL.call(this, 2, 0x33333333); - exchangeRL.call(this, 8, 0x00ff00ff); - exchangeLR.call(this, 1, 0x55555555); - - // Rounds - for (var round = 0; round < 16; round++) { - // Shortcuts - var subKey = subKeys[round]; - var lBlock = this._lBlock; - var rBlock = this._rBlock; - - // Feistel function - var f = 0; - for (var i = 0; i < 8; i++) { - f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; - } - this._lBlock = rBlock; - this._rBlock = lBlock ^ f; - } - - // Undo swap from last round - var t = this._lBlock; - this._lBlock = this._rBlock; - this._rBlock = t; - - // Final permutation - exchangeLR.call(this, 1, 0x55555555); - exchangeRL.call(this, 8, 0x00ff00ff); - exchangeRL.call(this, 2, 0x33333333); - exchangeLR.call(this, 16, 0x0000ffff); - exchangeLR.call(this, 4, 0x0f0f0f0f); - - // Set output - M[offset] = this._lBlock; - M[offset + 1] = this._rBlock; - }, - - keySize: 64/32, - - ivSize: 64/32, - - blockSize: 64/32 - }); - - // Swap bits across the left and right words - function exchangeLR(offset, mask) { - var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; - this._rBlock ^= t; - this._lBlock ^= t << offset; - } - - function exchangeRL(offset, mask) { - var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; - this._lBlock ^= t; - this._rBlock ^= t << offset; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); - */ - C.DES = BlockCipher._createHelper(DES); - - /** - * Triple-DES block cipher algorithm. - */ - var TripleDES = C_algo.TripleDES = BlockCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - // Make sure the key length is valid (64, 128 or >= 192 bit) - if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) { - throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.'); - } - - // Extend the key according to the keying options defined in 3DES standard - var key1 = keyWords.slice(0, 2); - var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4); - var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6); - - // Create DES instances - this._des1 = DES.createEncryptor(WordArray.create(key1)); - this._des2 = DES.createEncryptor(WordArray.create(key2)); - this._des3 = DES.createEncryptor(WordArray.create(key3)); - }, - - encryptBlock: function (M, offset) { - this._des1.encryptBlock(M, offset); - this._des2.decryptBlock(M, offset); - this._des3.encryptBlock(M, offset); - }, - - decryptBlock: function (M, offset) { - this._des3.decryptBlock(M, offset); - this._des2.encryptBlock(M, offset); - this._des1.decryptBlock(M, offset); - }, - - keySize: 192/32, - - ivSize: 64/32, - - blockSize: 64/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); - */ - C.TripleDES = BlockCipher._createHelper(TripleDES); - }()); - - - return CryptoJS.TripleDES; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/x64-core.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/x64-core.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var X32WordArray = C_lib.WordArray; - - /** - * x64 namespace. - */ - var C_x64 = C.x64 = {}; - - /** - * A 64-bit word. - */ - var X64Word = C_x64.Word = Base.extend({ - /** - * Initializes a newly created 64-bit word. - * - * @param {number} high The high 32 bits. - * @param {number} low The low 32 bits. - * - * @example - * - * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); - */ - init: function (high, low) { - this.high = high; - this.low = low; - } - - /** - * Bitwise NOTs this word. - * - * @return {X64Word} A new x64-Word object after negating. - * - * @example - * - * var negated = x64Word.not(); - */ - // not: function () { - // var high = ~this.high; - // var low = ~this.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise ANDs this word with the passed word. - * - * @param {X64Word} word The x64-Word to AND with this word. - * - * @return {X64Word} A new x64-Word object after ANDing. - * - * @example - * - * var anded = x64Word.and(anotherX64Word); - */ - // and: function (word) { - // var high = this.high & word.high; - // var low = this.low & word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise ORs this word with the passed word. - * - * @param {X64Word} word The x64-Word to OR with this word. - * - * @return {X64Word} A new x64-Word object after ORing. - * - * @example - * - * var ored = x64Word.or(anotherX64Word); - */ - // or: function (word) { - // var high = this.high | word.high; - // var low = this.low | word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise XORs this word with the passed word. - * - * @param {X64Word} word The x64-Word to XOR with this word. - * - * @return {X64Word} A new x64-Word object after XORing. - * - * @example - * - * var xored = x64Word.xor(anotherX64Word); - */ - // xor: function (word) { - // var high = this.high ^ word.high; - // var low = this.low ^ word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Shifts this word n bits to the left. - * - * @param {number} n The number of bits to shift. - * - * @return {X64Word} A new x64-Word object after shifting. - * - * @example - * - * var shifted = x64Word.shiftL(25); - */ - // shiftL: function (n) { - // if (n < 32) { - // var high = (this.high << n) | (this.low >>> (32 - n)); - // var low = this.low << n; - // } else { - // var high = this.low << (n - 32); - // var low = 0; - // } - - // return X64Word.create(high, low); - // }, - - /** - * Shifts this word n bits to the right. - * - * @param {number} n The number of bits to shift. - * - * @return {X64Word} A new x64-Word object after shifting. - * - * @example - * - * var shifted = x64Word.shiftR(7); - */ - // shiftR: function (n) { - // if (n < 32) { - // var low = (this.low >>> n) | (this.high << (32 - n)); - // var high = this.high >>> n; - // } else { - // var low = this.high >>> (n - 32); - // var high = 0; - // } - - // return X64Word.create(high, low); - // }, - - /** - * Rotates this word n bits to the left. - * - * @param {number} n The number of bits to rotate. - * - * @return {X64Word} A new x64-Word object after rotating. - * - * @example - * - * var rotated = x64Word.rotL(25); - */ - // rotL: function (n) { - // return this.shiftL(n).or(this.shiftR(64 - n)); - // }, - - /** - * Rotates this word n bits to the right. - * - * @param {number} n The number of bits to rotate. - * - * @return {X64Word} A new x64-Word object after rotating. - * - * @example - * - * var rotated = x64Word.rotR(7); - */ - // rotR: function (n) { - // return this.shiftR(n).or(this.shiftL(64 - n)); - // }, - - /** - * Adds this word with the passed word. - * - * @param {X64Word} word The x64-Word to add with this word. - * - * @return {X64Word} A new x64-Word object after adding. - * - * @example - * - * var added = x64Word.add(anotherX64Word); - */ - // add: function (word) { - // var low = (this.low + word.low) | 0; - // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; - // var high = (this.high + word.high + carry) | 0; - - // return X64Word.create(high, low); - // } - }); - - /** - * An array of 64-bit words. - * - * @property {Array} words The array of CryptoJS.x64.Word objects. - * @property {number} sigBytes The number of significant bytes in this word array. - */ - var X64WordArray = C_x64.WordArray = Base.extend({ - /** - * Initializes a newly created word array. - * - * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. - * @param {number} sigBytes (Optional) The number of significant bytes in the words. - * - * @example - * - * var wordArray = CryptoJS.x64.WordArray.create(); - * - * var wordArray = CryptoJS.x64.WordArray.create([ - * CryptoJS.x64.Word.create(0x00010203, 0x04050607), - * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) - * ]); - * - * var wordArray = CryptoJS.x64.WordArray.create([ - * CryptoJS.x64.Word.create(0x00010203, 0x04050607), - * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) - * ], 10); - */ - init: function (words, sigBytes) { - words = this.words = words || []; - - if (sigBytes != undefined) { - this.sigBytes = sigBytes; - } else { - this.sigBytes = words.length * 8; - } - }, - - /** - * Converts this 64-bit word array to a 32-bit word array. - * - * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. - * - * @example - * - * var x32WordArray = x64WordArray.toX32(); - */ - toX32: function () { - // Shortcuts - var x64Words = this.words; - var x64WordsLength = x64Words.length; - - // Convert - var x32Words = []; - for (var i = 0; i < x64WordsLength; i++) { - var x64Word = x64Words[i]; - x32Words.push(x64Word.high); - x32Words.push(x64Word.low); - } - - return X32WordArray.create(x32Words, this.sigBytes); - }, - - /** - * Creates a copy of this word array. - * - * @return {X64WordArray} The clone. - * - * @example - * - * var clone = x64WordArray.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - - // Clone "words" array - var words = clone.words = this.words.slice(0); - - // Clone each X64Word object - var wordsLength = words.length; - for (var i = 0; i < wordsLength; i++) { - words[i] = words[i].clone(); - } - - return clone; - } - }); - }()); - - - return CryptoJS; - -})); - -/***/ }), - -/***/ "./node_modules/desandro-matches-selector/matches-selector.js": -/*!********************************************************************!*\ - !*** ./node_modules/desandro-matches-selector/matches-selector.js ***! - \********************************************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * matchesSelector v2.0.2 - * matchesSelector( element, '.selector' ) - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true */ - -( function( window, factory ) { - /*global define: false, module: false */ - 'use strict'; - // universal module definition - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory() { - 'use strict'; - - var matchesMethod = ( function() { - var ElemProto = window.Element.prototype; - // check for the standard method name first - if ( ElemProto.matches ) { - return 'matches'; - } - // check un-prefixed - if ( ElemProto.matchesSelector ) { - return 'matchesSelector'; - } - // check vendor prefixes - var prefixes = [ 'webkit', 'moz', 'ms', 'o' ]; - - for ( var i=0; i < prefixes.length; i++ ) { - var prefix = prefixes[i]; - var method = prefix + 'MatchesSelector'; - if ( ElemProto[ method ] ) { - return method; - } - } - })(); - - return function matchesSelector( elem, selector ) { - return elem[ matchesMethod ]( selector ); - }; - -})); - - -/***/ }), - -/***/ "./node_modules/ev-emitter/ev-emitter.js": -/*!***********************************************!*\ - !*** ./node_modules/ev-emitter/ev-emitter.js ***! - \***********************************************/ -/***/ (function(module) { - -/** - * EvEmitter v2.1.1 - * Lil' event emitter - * MIT License - */ - -( function( global, factory ) { - // universal module definition - if ( true && module.exports ) { - // CommonJS - Browserify, Webpack - module.exports = factory(); - } else { - // Browser globals - global.EvEmitter = factory(); - } - -}( typeof window != 'undefined' ? window : this, function() { - -function EvEmitter() {} - -let proto = EvEmitter.prototype; - -proto.on = function( eventName, listener ) { - if ( !eventName || !listener ) return this; - - // set events hash - let events = this._events = this._events || {}; - // set listeners array - let listeners = events[ eventName ] = events[ eventName ] || []; - // only add once - if ( !listeners.includes( listener ) ) { - listeners.push( listener ); - } - - return this; -}; - -proto.once = function( eventName, listener ) { - if ( !eventName || !listener ) return this; - - // add event - this.on( eventName, listener ); - // set once flag - // set onceEvents hash - let onceEvents = this._onceEvents = this._onceEvents || {}; - // set onceListeners object - let onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {}; - // set flag - onceListeners[ listener ] = true; - - return this; -}; - -proto.off = function( eventName, listener ) { - let listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) return this; - - let index = listeners.indexOf( listener ); - if ( index != -1 ) { - listeners.splice( index, 1 ); - } - - return this; -}; - -proto.emitEvent = function( eventName, args ) { - let listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) return this; - - // copy over to avoid interference if .off() in listener - listeners = listeners.slice( 0 ); - args = args || []; - // once stuff - let onceListeners = this._onceEvents && this._onceEvents[ eventName ]; - - for ( let listener of listeners ) { - let isOnce = onceListeners && onceListeners[ listener ]; - if ( isOnce ) { - // remove listener - // remove before trigger to prevent recursion - this.off( eventName, listener ); - // unset once flag - delete onceListeners[ listener ]; - } - // trigger listener - listener.apply( this, args ); - } - - return this; -}; - -proto.allOff = function() { - delete this._events; - delete this._onceEvents; - return this; -}; - -return EvEmitter; - -} ) ); - - -/***/ }), - -/***/ "./node_modules/fizzy-ui-utils/utils.js": -/*!**********************************************!*\ - !*** ./node_modules/fizzy-ui-utils/utils.js ***! - \**********************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * Fizzy UI utils v2.0.7 - * MIT license - */ - -/*jshint browser: true, undef: true, unused: true, strict: true */ - -( function( window, factory ) { - // universal module definition - /*jshint strict: false */ /*globals define, module, require */ - - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! desandro-matches-selector/matches-selector */ "./node_modules/desandro-matches-selector/matches-selector.js") - ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( matchesSelector ) { - return factory( window, matchesSelector ); - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( window, matchesSelector ) { - -'use strict'; - -var utils = {}; - -// ----- extend ----- // - -// extends objects -utils.extend = function( a, b ) { - for ( var prop in b ) { - a[ prop ] = b[ prop ]; - } - return a; -}; - -// ----- modulo ----- // - -utils.modulo = function( num, div ) { - return ( ( num % div ) + div ) % div; -}; - -// ----- makeArray ----- // - -var arraySlice = Array.prototype.slice; - -// turn element or nodeList into an array -utils.makeArray = function( obj ) { - if ( Array.isArray( obj ) ) { - // use object if already an array - return obj; - } - // return empty array if undefined or null. #6 - if ( obj === null || obj === undefined ) { - return []; - } - - var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number'; - if ( isArrayLike ) { - // convert nodeList to array - return arraySlice.call( obj ); - } - - // array of single index - return [ obj ]; -}; - -// ----- removeFrom ----- // - -utils.removeFrom = function( ary, obj ) { - var index = ary.indexOf( obj ); - if ( index != -1 ) { - ary.splice( index, 1 ); - } -}; - -// ----- getParent ----- // - -utils.getParent = function( elem, selector ) { - while ( elem.parentNode && elem != document.body ) { - elem = elem.parentNode; - if ( matchesSelector( elem, selector ) ) { - return elem; - } - } -}; - -// ----- getQueryElement ----- // - -// use element as selector string -utils.getQueryElement = function( elem ) { - if ( typeof elem == 'string' ) { - return document.querySelector( elem ); - } - return elem; -}; - -// ----- handleEvent ----- // - -// enable .ontype to trigger from .addEventListener( elem, 'type' ) -utils.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -// ----- filterFindElements ----- // - -utils.filterFindElements = function( elems, selector ) { - // make array of elems - elems = utils.makeArray( elems ); - var ffElems = []; - - elems.forEach( function( elem ) { - // check that elem is an actual element - if ( !( elem instanceof HTMLElement ) ) { - return; - } - // add elem if no selector - if ( !selector ) { - ffElems.push( elem ); - return; - } - // filter & find items if we have a selector - // filter - if ( matchesSelector( elem, selector ) ) { - ffElems.push( elem ); - } - // find children - var childElems = elem.querySelectorAll( selector ); - // concat childElems to filterFound array - for ( var i=0; i < childElems.length; i++ ) { - ffElems.push( childElems[i] ); - } - }); - - return ffElems; -}; - -// ----- debounceMethod ----- // - -utils.debounceMethod = function( _class, methodName, threshold ) { - threshold = threshold || 100; - // original method - var method = _class.prototype[ methodName ]; - var timeoutName = methodName + 'Timeout'; - - _class.prototype[ methodName ] = function() { - var timeout = this[ timeoutName ]; - clearTimeout( timeout ); - - var args = arguments; - var _this = this; - this[ timeoutName ] = setTimeout( function() { - method.apply( _this, args ); - delete _this[ timeoutName ]; - }, threshold ); - }; -}; - -// ----- docReady ----- // - -utils.docReady = function( callback ) { - var readyState = document.readyState; - if ( readyState == 'complete' || readyState == 'interactive' ) { - // do async to allow for other scripts to run. metafizzy/flickity#441 - setTimeout( callback ); - } else { - document.addEventListener( 'DOMContentLoaded', callback ); - } -}; - -// ----- htmlInit ----- // - -// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/ -utils.toDashed = function( str ) { - return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) { - return $1 + '-' + $2; - }).toLowerCase(); -}; - -var console = window.console; -/** - * allow user to initialize classes via [data-namespace] or .js-namespace class - * htmlInit( Widget, 'widgetName' ) - * options are parsed from data-namespace-options - */ -utils.htmlInit = function( WidgetClass, namespace ) { - utils.docReady( function() { - var dashedNamespace = utils.toDashed( namespace ); - var dataAttr = 'data-' + dashedNamespace; - var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' ); - var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace ); - var elems = utils.makeArray( dataAttrElems ) - .concat( utils.makeArray( jsDashElems ) ); - var dataOptionsAttr = dataAttr + '-options'; - var jQuery = window.jQuery; - - elems.forEach( function( elem ) { - var attr = elem.getAttribute( dataAttr ) || - elem.getAttribute( dataOptionsAttr ); - var options; - try { - options = attr && JSON.parse( attr ); - } catch ( error ) { - // log error, do not initialize - if ( console ) { - console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className + - ': ' + error ); - } - return; - } - // initialize - var instance = new WidgetClass( elem, options ); - // make available via $().data('namespace') - if ( jQuery ) { - jQuery.data( elem, namespace, instance ); - } - }); - - }); -}; - -// ----- ----- // - -return utils; - -})); - - -/***/ }), - -/***/ "./node_modules/get-size/get-size.js": -/*!*******************************************!*\ - !*** ./node_modules/get-size/get-size.js ***! - \*******************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - * getSize v2.0.3 - * measure size of elements - * MIT license - */ - -/* jshint browser: true, strict: true, undef: true, unused: true */ -/* globals console: false */ - -( function( window, factory ) { - /* jshint strict: false */ /* globals define, module */ - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -})( window, function factory() { -'use strict'; - -// -------------------------- helpers -------------------------- // - -// get a number from a string, not a percentage -function getStyleSize( value ) { - var num = parseFloat( value ); - // not a percent like '100%', and a number - var isValid = value.indexOf('%') == -1 && !isNaN( num ); - return isValid && num; -} - -function noop() {} - -var logError = typeof console == 'undefined' ? noop : - function( message ) { - console.error( message ); - }; - -// -------------------------- measurements -------------------------- // - -var measurements = [ - 'paddingLeft', - 'paddingRight', - 'paddingTop', - 'paddingBottom', - 'marginLeft', - 'marginRight', - 'marginTop', - 'marginBottom', - 'borderLeftWidth', - 'borderRightWidth', - 'borderTopWidth', - 'borderBottomWidth' -]; - -var measurementsLength = measurements.length; - -function getZeroSize() { - var size = { - width: 0, - height: 0, - innerWidth: 0, - innerHeight: 0, - outerWidth: 0, - outerHeight: 0 - }; - for ( var i=0; i < measurementsLength; i++ ) { - var measurement = measurements[i]; - size[ measurement ] = 0; - } - return size; -} - -// -------------------------- getStyle -------------------------- // - -/** - * getStyle, get style of element, check for Firefox bug - * https://bugzilla.mozilla.org/show_bug.cgi?id=548397 - */ -function getStyle( elem ) { - var style = getComputedStyle( elem ); - if ( !style ) { - logError( 'Style returned ' + style + - '. Are you running this code in a hidden iframe on Firefox? ' + - 'See https://bit.ly/getsizebug1' ); - } - return style; -} - -// -------------------------- setup -------------------------- // - -var isSetup = false; - -var isBoxSizeOuter; - -/** - * setup - * check isBoxSizerOuter - * do on first getSize() rather than on page load for Firefox bug - */ -function setup() { - // setup once - if ( isSetup ) { - return; - } - isSetup = true; - - // -------------------------- box sizing -------------------------- // - - /** - * Chrome & Safari measure the outer-width on style.width on border-box elems - * IE11 & Firefox<29 measures the inner-width - */ - var div = document.createElement('div'); - div.style.width = '200px'; - div.style.padding = '1px 2px 3px 4px'; - div.style.borderStyle = 'solid'; - div.style.borderWidth = '1px 2px 3px 4px'; - div.style.boxSizing = 'border-box'; - - var body = document.body || document.documentElement; - body.appendChild( div ); - var style = getStyle( div ); - // round value for browser zoom. desandro/masonry#928 - isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200; - getSize.isBoxSizeOuter = isBoxSizeOuter; - - body.removeChild( div ); -} - -// -------------------------- getSize -------------------------- // - -function getSize( elem ) { - setup(); - - // use querySeletor if elem is string - if ( typeof elem == 'string' ) { - elem = document.querySelector( elem ); - } - - // do not proceed on non-objects - if ( !elem || typeof elem != 'object' || !elem.nodeType ) { - return; - } - - var style = getStyle( elem ); - - // if hidden, everything is 0 - if ( style.display == 'none' ) { - return getZeroSize(); - } - - var size = {}; - size.width = elem.offsetWidth; - size.height = elem.offsetHeight; - - var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box'; - - // get all measurements - for ( var i=0; i < measurementsLength; i++ ) { - var measurement = measurements[i]; - var value = style[ measurement ]; - var num = parseFloat( value ); - // any 'auto', 'medium' value will be 0 - size[ measurement ] = !isNaN( num ) ? num : 0; - } - - var paddingWidth = size.paddingLeft + size.paddingRight; - var paddingHeight = size.paddingTop + size.paddingBottom; - var marginWidth = size.marginLeft + size.marginRight; - var marginHeight = size.marginTop + size.marginBottom; - var borderWidth = size.borderLeftWidth + size.borderRightWidth; - var borderHeight = size.borderTopWidth + size.borderBottomWidth; - - var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter; - - // overwrite width and height if we can get it from style - var styleWidth = getStyleSize( style.width ); - if ( styleWidth !== false ) { - size.width = styleWidth + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth ); - } - - var styleHeight = getStyleSize( style.height ); - if ( styleHeight !== false ) { - size.height = styleHeight + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight ); - } - - size.innerWidth = size.width - ( paddingWidth + borderWidth ); - size.innerHeight = size.height - ( paddingHeight + borderHeight ); - - size.outerWidth = size.width + marginWidth; - size.outerHeight = size.height + marginHeight; - - return size; -} - -return getSize; - -}); - - -/***/ }), - -/***/ "./node_modules/imagesloaded/imagesloaded.js": -/*!***************************************************!*\ - !*** ./node_modules/imagesloaded/imagesloaded.js ***! - \***************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -/*! - * imagesLoaded v5.0.0 - * JavaScript is all like "You images are done yet or what?" - * MIT License - */ - -( function( window, factory ) { - // universal module definition - if ( true && module.exports ) { - // CommonJS - module.exports = factory( window, __webpack_require__(/*! ev-emitter */ "./node_modules/ev-emitter/ev-emitter.js") ); - } else { - // browser global - window.imagesLoaded = factory( window, window.EvEmitter ); - } - -} )( typeof window !== 'undefined' ? window : this, - function factory( window, EvEmitter ) { - -let $ = window.jQuery; -let console = window.console; - -// -------------------------- helpers -------------------------- // - -// turn element or nodeList into an array -function makeArray( obj ) { - // use object if already an array - if ( Array.isArray( obj ) ) return obj; - - let isArrayLike = typeof obj == 'object' && typeof obj.length == 'number'; - // convert nodeList to array - if ( isArrayLike ) return [ ...obj ]; - - // array of single index - return [ obj ]; -} - -// -------------------------- imagesLoaded -------------------------- // - -/** - * @param {[Array, Element, NodeList, String]} elem - * @param {[Object, Function]} options - if function, use as callback - * @param {Function} onAlways - callback function - * @returns {ImagesLoaded} - */ -function ImagesLoaded( elem, options, onAlways ) { - // coerce ImagesLoaded() without new, to be new ImagesLoaded() - if ( !( this instanceof ImagesLoaded ) ) { - return new ImagesLoaded( elem, options, onAlways ); - } - // use elem as selector string - let queryElem = elem; - if ( typeof elem == 'string' ) { - queryElem = document.querySelectorAll( elem ); - } - // bail if bad element - if ( !queryElem ) { - console.error(`Bad element for imagesLoaded ${queryElem || elem}`); - return; - } - - this.elements = makeArray( queryElem ); - this.options = {}; - // shift arguments if no options set - if ( typeof options == 'function' ) { - onAlways = options; - } else { - Object.assign( this.options, options ); - } - - if ( onAlways ) this.on( 'always', onAlways ); - - this.getImages(); - // add jQuery Deferred object - if ( $ ) this.jqDeferred = new $.Deferred(); - - // HACK check async to allow time to bind listeners - setTimeout( this.check.bind( this ) ); -} - -ImagesLoaded.prototype = Object.create( EvEmitter.prototype ); - -ImagesLoaded.prototype.getImages = function() { - this.images = []; - - // filter & find items if we have an item selector - this.elements.forEach( this.addElementImages, this ); -}; - -const elementNodeTypes = [ 1, 9, 11 ]; - -/** - * @param {Node} elem - */ -ImagesLoaded.prototype.addElementImages = function( elem ) { - // filter siblings - if ( elem.nodeName === 'IMG' ) { - this.addImage( elem ); - } - // get background image on element - if ( this.options.background === true ) { - this.addElementBackgroundImages( elem ); - } - - // find children - // no non-element nodes, #143 - let { nodeType } = elem; - if ( !nodeType || !elementNodeTypes.includes( nodeType ) ) return; - - let childImgs = elem.querySelectorAll('img'); - // concat childElems to filterFound array - for ( let img of childImgs ) { - this.addImage( img ); - } - - // get child background images - if ( typeof this.options.background == 'string' ) { - let children = elem.querySelectorAll( this.options.background ); - for ( let child of children ) { - this.addElementBackgroundImages( child ); - } - } -}; - -const reURL = /url\((['"])?(.*?)\1\)/gi; - -ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) { - let style = getComputedStyle( elem ); - // Firefox returns null if in a hidden iframe https://bugzil.la/548397 - if ( !style ) return; - - // get url inside url("...") - let matches = reURL.exec( style.backgroundImage ); - while ( matches !== null ) { - let url = matches && matches[2]; - if ( url ) { - this.addBackground( url, elem ); - } - matches = reURL.exec( style.backgroundImage ); - } -}; - -/** - * @param {Image} img - */ -ImagesLoaded.prototype.addImage = function( img ) { - let loadingImage = new LoadingImage( img ); - this.images.push( loadingImage ); -}; - -ImagesLoaded.prototype.addBackground = function( url, elem ) { - let background = new Background( url, elem ); - this.images.push( background ); -}; - -ImagesLoaded.prototype.check = function() { - this.progressedCount = 0; - this.hasAnyBroken = false; - // complete if no images - if ( !this.images.length ) { - this.complete(); - return; - } - - /* eslint-disable-next-line func-style */ - let onProgress = ( image, elem, message ) => { - // HACK - Chrome triggers event before object properties have changed. #83 - setTimeout( () => { - this.progress( image, elem, message ); - } ); - }; - - this.images.forEach( function( loadingImage ) { - loadingImage.once( 'progress', onProgress ); - loadingImage.check(); - } ); -}; - -ImagesLoaded.prototype.progress = function( image, elem, message ) { - this.progressedCount++; - this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded; - // progress event - this.emitEvent( 'progress', [ this, image, elem ] ); - if ( this.jqDeferred && this.jqDeferred.notify ) { - this.jqDeferred.notify( this, image ); - } - // check if completed - if ( this.progressedCount === this.images.length ) { - this.complete(); - } - - if ( this.options.debug && console ) { - console.log( `progress: ${message}`, image, elem ); - } -}; - -ImagesLoaded.prototype.complete = function() { - let eventName = this.hasAnyBroken ? 'fail' : 'done'; - this.isComplete = true; - this.emitEvent( eventName, [ this ] ); - this.emitEvent( 'always', [ this ] ); - if ( this.jqDeferred ) { - let jqMethod = this.hasAnyBroken ? 'reject' : 'resolve'; - this.jqDeferred[ jqMethod ]( this ); - } -}; - -// -------------------------- -------------------------- // - -function LoadingImage( img ) { - this.img = img; -} - -LoadingImage.prototype = Object.create( EvEmitter.prototype ); - -LoadingImage.prototype.check = function() { - // If complete is true and browser supports natural sizes, - // try to check for image status manually. - let isComplete = this.getIsImageComplete(); - if ( isComplete ) { - // report based on naturalWidth - this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' ); - return; - } - - // If none of the checks above matched, simulate loading on detached element. - this.proxyImage = new Image(); - // add crossOrigin attribute. #204 - if ( this.img.crossOrigin ) { - this.proxyImage.crossOrigin = this.img.crossOrigin; - } - this.proxyImage.addEventListener( 'load', this ); - this.proxyImage.addEventListener( 'error', this ); - // bind to image as well for Firefox. #191 - this.img.addEventListener( 'load', this ); - this.img.addEventListener( 'error', this ); - this.proxyImage.src = this.img.currentSrc || this.img.src; -}; - -LoadingImage.prototype.getIsImageComplete = function() { - // check for non-zero, non-undefined naturalWidth - // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671 - return this.img.complete && this.img.naturalWidth; -}; - -LoadingImage.prototype.confirm = function( isLoaded, message ) { - this.isLoaded = isLoaded; - let { parentNode } = this.img; - // emit progress with parent or self - let elem = parentNode.nodeName === 'PICTURE' ? parentNode : this.img; - this.emitEvent( 'progress', [ this, elem, message ] ); -}; - -// ----- events ----- // - -// trigger specified handler for event type -LoadingImage.prototype.handleEvent = function( event ) { - let method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -LoadingImage.prototype.onload = function() { - this.confirm( true, 'onload' ); - this.unbindEvents(); -}; - -LoadingImage.prototype.onerror = function() { - this.confirm( false, 'onerror' ); - this.unbindEvents(); -}; - -LoadingImage.prototype.unbindEvents = function() { - this.proxyImage.removeEventListener( 'load', this ); - this.proxyImage.removeEventListener( 'error', this ); - this.img.removeEventListener( 'load', this ); - this.img.removeEventListener( 'error', this ); -}; - -// -------------------------- Background -------------------------- // - -function Background( url, element ) { - this.url = url; - this.element = element; - this.img = new Image(); -} - -// inherit LoadingImage prototype -Background.prototype = Object.create( LoadingImage.prototype ); - -Background.prototype.check = function() { - this.img.addEventListener( 'load', this ); - this.img.addEventListener( 'error', this ); - this.img.src = this.url; - // check if image is already complete - let isComplete = this.getIsImageComplete(); - if ( isComplete ) { - this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' ); - this.unbindEvents(); - } -}; - -Background.prototype.unbindEvents = function() { - this.img.removeEventListener( 'load', this ); - this.img.removeEventListener( 'error', this ); -}; - -Background.prototype.confirm = function( isLoaded, message ) { - this.isLoaded = isLoaded; - this.emitEvent( 'progress', [ this, this.element, message ] ); -}; - -// -------------------------- jQuery -------------------------- // - -ImagesLoaded.makeJQueryPlugin = function( jQuery ) { - jQuery = jQuery || window.jQuery; - if ( !jQuery ) return; - - // set local variable - $ = jQuery; - // $().imagesLoaded() - $.fn.imagesLoaded = function( options, onAlways ) { - let instance = new ImagesLoaded( this, options, onAlways ); - return instance.jqDeferred.promise( $( this ) ); - }; -}; -// try making plugin -ImagesLoaded.makeJQueryPlugin(); - -// -------------------------- -------------------------- // - -return ImagesLoaded; - -} ); - - -/***/ }), - -/***/ "./node_modules/masonry-layout/masonry.js": -/*!************************************************!*\ - !*** ./node_modules/masonry-layout/masonry.js ***! - \************************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - * Masonry v4.2.2 - * Cascading grid layout library - * https://masonry.desandro.com - * MIT License - * by David DeSandro - */ - -( function( window, factory ) { - // universal module definition - /* jshint strict: false */ /*globals define, module, require */ - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! outlayer/outlayer */ "./node_modules/outlayer/outlayer.js"), - __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js") - ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( Outlayer, getSize ) { - -'use strict'; - -// -------------------------- masonryDefinition -------------------------- // - - // create an Outlayer layout class - var Masonry = Outlayer.create('masonry'); - // isFitWidth -> fitWidth - Masonry.compatOptions.fitWidth = 'isFitWidth'; - - var proto = Masonry.prototype; - - proto._resetLayout = function() { - this.getSize(); - this._getMeasurement( 'columnWidth', 'outerWidth' ); - this._getMeasurement( 'gutter', 'outerWidth' ); - this.measureColumns(); - - // reset column Y - this.colYs = []; - for ( var i=0; i < this.cols; i++ ) { - this.colYs.push( 0 ); - } - - this.maxY = 0; - this.horizontalColIndex = 0; - }; - - proto.measureColumns = function() { - this.getContainerWidth(); - // if columnWidth is 0, default to outerWidth of first item - if ( !this.columnWidth ) { - var firstItem = this.items[0]; - var firstItemElem = firstItem && firstItem.element; - // columnWidth fall back to item of first element - this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth || - // if first elem has no width, default to size of container - this.containerWidth; - } - - var columnWidth = this.columnWidth += this.gutter; - - // calculate columns - var containerWidth = this.containerWidth + this.gutter; - var cols = containerWidth / columnWidth; - // fix rounding errors, typically with gutters - var excess = columnWidth - containerWidth % columnWidth; - // if overshoot is less than a pixel, round up, otherwise floor it - var mathMethod = excess && excess < 1 ? 'round' : 'floor'; - cols = Math[ mathMethod ]( cols ); - this.cols = Math.max( cols, 1 ); - }; - - proto.getContainerWidth = function() { - // container is parent if fit width - var isFitWidth = this._getOption('fitWidth'); - var container = isFitWidth ? this.element.parentNode : this.element; - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var size = getSize( container ); - this.containerWidth = size && size.innerWidth; - }; - - proto._getItemLayoutPosition = function( item ) { - item.getSize(); - // how many columns does this brick span - var remainder = item.size.outerWidth % this.columnWidth; - var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil'; - // round if off by 1 pixel, otherwise use ceil - var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth ); - colSpan = Math.min( colSpan, this.cols ); - // use horizontal or top column position - var colPosMethod = this.options.horizontalOrder ? - '_getHorizontalColPosition' : '_getTopColPosition'; - var colPosition = this[ colPosMethod ]( colSpan, item ); - // position the brick - var position = { - x: this.columnWidth * colPosition.col, - y: colPosition.y - }; - // apply setHeight to necessary columns - var setHeight = colPosition.y + item.size.outerHeight; - var setMax = colSpan + colPosition.col; - for ( var i = colPosition.col; i < setMax; i++ ) { - this.colYs[i] = setHeight; - } - - return position; - }; - - proto._getTopColPosition = function( colSpan ) { - var colGroup = this._getTopColGroup( colSpan ); - // get the minimum Y value from the columns - var minimumY = Math.min.apply( Math, colGroup ); - - return { - col: colGroup.indexOf( minimumY ), - y: minimumY, - }; - }; - - /** - * @param {Number} colSpan - number of columns the element spans - * @returns {Array} colGroup - */ - proto._getTopColGroup = function( colSpan ) { - if ( colSpan < 2 ) { - // if brick spans only one column, use all the column Ys - return this.colYs; - } - - var colGroup = []; - // how many different places could this brick fit horizontally - var groupCount = this.cols + 1 - colSpan; - // for each group potential horizontal position - for ( var i = 0; i < groupCount; i++ ) { - colGroup[i] = this._getColGroupY( i, colSpan ); - } - return colGroup; - }; - - proto._getColGroupY = function( col, colSpan ) { - if ( colSpan < 2 ) { - return this.colYs[ col ]; - } - // make an array of colY values for that one group - var groupColYs = this.colYs.slice( col, col + colSpan ); - // and get the max value of the array - return Math.max.apply( Math, groupColYs ); - }; - - // get column position based on horizontal index. #873 - proto._getHorizontalColPosition = function( colSpan, item ) { - var col = this.horizontalColIndex % this.cols; - var isOver = colSpan > 1 && col + colSpan > this.cols; - // shift to next row if item can't fit on current row - col = isOver ? 0 : col; - // don't let zero-size items take up space - var hasSize = item.size.outerWidth && item.size.outerHeight; - this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex; - - return { - col: col, - y: this._getColGroupY( col, colSpan ), - }; - }; - - proto._manageStamp = function( stamp ) { - var stampSize = getSize( stamp ); - var offset = this._getElementOffset( stamp ); - // get the columns that this stamp affects - var isOriginLeft = this._getOption('originLeft'); - var firstX = isOriginLeft ? offset.left : offset.right; - var lastX = firstX + stampSize.outerWidth; - var firstCol = Math.floor( firstX / this.columnWidth ); - firstCol = Math.max( 0, firstCol ); - var lastCol = Math.floor( lastX / this.columnWidth ); - // lastCol should not go over if multiple of columnWidth #425 - lastCol -= lastX % this.columnWidth ? 0 : 1; - lastCol = Math.min( this.cols - 1, lastCol ); - // set colYs to bottom of the stamp - - var isOriginTop = this._getOption('originTop'); - var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) + - stampSize.outerHeight; - for ( var i = firstCol; i <= lastCol; i++ ) { - this.colYs[i] = Math.max( stampMaxY, this.colYs[i] ); - } - }; - - proto._getContainerSize = function() { - this.maxY = Math.max.apply( Math, this.colYs ); - var size = { - height: this.maxY - }; - - if ( this._getOption('fitWidth') ) { - size.width = this._getContainerFitWidth(); - } - - return size; - }; - - proto._getContainerFitWidth = function() { - var unusedCols = 0; - // count unused columns - var i = this.cols; - while ( --i ) { - if ( this.colYs[i] !== 0 ) { - break; - } - unusedCols++; - } - // fit container to columns that have been used - return ( this.cols - unusedCols ) * this.columnWidth - this.gutter; - }; - - proto.needsResizeLayout = function() { - var previousWidth = this.containerWidth; - this.getContainerWidth(); - return previousWidth != this.containerWidth; - }; - - return Masonry; - -})); - - -/***/ }), - -/***/ "./src/scss/style.scss": -/*!*****************************!*\ - !*** ./src/scss/style.scss ***! - \*****************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -// extracted by mini-css-extract-plugin - - -/***/ }), - -/***/ "./node_modules/outlayer/item.js": -/*!***************************************!*\ - !*** ./node_modules/outlayer/item.js ***! - \***************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * Outlayer Item - */ - -( function( window, factory ) { - // universal module definition - /* jshint strict: false */ /* globals define, module, require */ - if ( true ) { - // AMD - RequireJS - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js"), - __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js") - ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( EvEmitter, getSize ) { -'use strict'; - -// ----- helpers ----- // - -function isEmptyObj( obj ) { - for ( var prop in obj ) { - return false; - } - prop = null; - return true; -} - -// -------------------------- CSS3 support -------------------------- // - - -var docElemStyle = document.documentElement.style; - -var transitionProperty = typeof docElemStyle.transition == 'string' ? - 'transition' : 'WebkitTransition'; -var transformProperty = typeof docElemStyle.transform == 'string' ? - 'transform' : 'WebkitTransform'; - -var transitionEndEvent = { - WebkitTransition: 'webkitTransitionEnd', - transition: 'transitionend' -}[ transitionProperty ]; - -// cache all vendor properties that could have vendor prefix -var vendorProperties = { - transform: transformProperty, - transition: transitionProperty, - transitionDuration: transitionProperty + 'Duration', - transitionProperty: transitionProperty + 'Property', - transitionDelay: transitionProperty + 'Delay' -}; - -// -------------------------- Item -------------------------- // - -function Item( element, layout ) { - if ( !element ) { - return; - } - - this.element = element; - // parent layout class, i.e. Masonry, Isotope, or Packery - this.layout = layout; - this.position = { - x: 0, - y: 0 - }; - - this._create(); -} - -// inherit EvEmitter -var proto = Item.prototype = Object.create( EvEmitter.prototype ); -proto.constructor = Item; - -proto._create = function() { - // transition objects - this._transn = { - ingProperties: {}, - clean: {}, - onEnd: {} - }; - - this.css({ - position: 'absolute' - }); -}; - -// trigger specified handler for event type -proto.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -proto.getSize = function() { - this.size = getSize( this.element ); -}; - -/** - * apply CSS styles to element - * @param {Object} style - */ -proto.css = function( style ) { - var elemStyle = this.element.style; - - for ( var prop in style ) { - // use vendor property if available - var supportedProp = vendorProperties[ prop ] || prop; - elemStyle[ supportedProp ] = style[ prop ]; - } -}; - - // measure position, and sets it -proto.getPosition = function() { - var style = getComputedStyle( this.element ); - var isOriginLeft = this.layout._getOption('originLeft'); - var isOriginTop = this.layout._getOption('originTop'); - var xValue = style[ isOriginLeft ? 'left' : 'right' ]; - var yValue = style[ isOriginTop ? 'top' : 'bottom' ]; - var x = parseFloat( xValue ); - var y = parseFloat( yValue ); - // convert percent to pixels - var layoutSize = this.layout.size; - if ( xValue.indexOf('%') != -1 ) { - x = ( x / 100 ) * layoutSize.width; - } - if ( yValue.indexOf('%') != -1 ) { - y = ( y / 100 ) * layoutSize.height; - } - // clean up 'auto' or other non-integer values - x = isNaN( x ) ? 0 : x; - y = isNaN( y ) ? 0 : y; - // remove padding from measurement - x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight; - y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom; - - this.position.x = x; - this.position.y = y; -}; - -// set settled position, apply padding -proto.layoutPosition = function() { - var layoutSize = this.layout.size; - var style = {}; - var isOriginLeft = this.layout._getOption('originLeft'); - var isOriginTop = this.layout._getOption('originTop'); - - // x - var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight'; - var xProperty = isOriginLeft ? 'left' : 'right'; - var xResetProperty = isOriginLeft ? 'right' : 'left'; - - var x = this.position.x + layoutSize[ xPadding ]; - // set in percentage or pixels - style[ xProperty ] = this.getXValue( x ); - // reset other property - style[ xResetProperty ] = ''; - - // y - var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom'; - var yProperty = isOriginTop ? 'top' : 'bottom'; - var yResetProperty = isOriginTop ? 'bottom' : 'top'; - - var y = this.position.y + layoutSize[ yPadding ]; - // set in percentage or pixels - style[ yProperty ] = this.getYValue( y ); - // reset other property - style[ yResetProperty ] = ''; - - this.css( style ); - this.emitEvent( 'layout', [ this ] ); -}; - -proto.getXValue = function( x ) { - var isHorizontal = this.layout._getOption('horizontal'); - return this.layout.options.percentPosition && !isHorizontal ? - ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px'; -}; - -proto.getYValue = function( y ) { - var isHorizontal = this.layout._getOption('horizontal'); - return this.layout.options.percentPosition && isHorizontal ? - ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px'; -}; - -proto._transitionTo = function( x, y ) { - this.getPosition(); - // get current x & y from top/left - var curX = this.position.x; - var curY = this.position.y; - - var didNotMove = x == this.position.x && y == this.position.y; - - // save end position - this.setPosition( x, y ); - - // if did not move and not transitioning, just go to layout - if ( didNotMove && !this.isTransitioning ) { - this.layoutPosition(); - return; - } - - var transX = x - curX; - var transY = y - curY; - var transitionStyle = {}; - transitionStyle.transform = this.getTranslate( transX, transY ); - - this.transition({ - to: transitionStyle, - onTransitionEnd: { - transform: this.layoutPosition - }, - isCleaning: true - }); -}; - -proto.getTranslate = function( x, y ) { - // flip cooridinates if origin on right or bottom - var isOriginLeft = this.layout._getOption('originLeft'); - var isOriginTop = this.layout._getOption('originTop'); - x = isOriginLeft ? x : -x; - y = isOriginTop ? y : -y; - return 'translate3d(' + x + 'px, ' + y + 'px, 0)'; -}; - -// non transition + transform support -proto.goTo = function( x, y ) { - this.setPosition( x, y ); - this.layoutPosition(); -}; - -proto.moveTo = proto._transitionTo; - -proto.setPosition = function( x, y ) { - this.position.x = parseFloat( x ); - this.position.y = parseFloat( y ); -}; - -// ----- transition ----- // - -/** - * @param {Object} style - CSS - * @param {Function} onTransitionEnd - */ - -// non transition, just trigger callback -proto._nonTransition = function( args ) { - this.css( args.to ); - if ( args.isCleaning ) { - this._removeStyles( args.to ); - } - for ( var prop in args.onTransitionEnd ) { - args.onTransitionEnd[ prop ].call( this ); - } -}; - -/** - * proper transition - * @param {Object} args - arguments - * @param {Object} to - style to transition to - * @param {Object} from - style to start transition from - * @param {Boolean} isCleaning - removes transition styles after transition - * @param {Function} onTransitionEnd - callback - */ -proto.transition = function( args ) { - // redirect to nonTransition if no transition duration - if ( !parseFloat( this.layout.options.transitionDuration ) ) { - this._nonTransition( args ); - return; - } - - var _transition = this._transn; - // keep track of onTransitionEnd callback by css property - for ( var prop in args.onTransitionEnd ) { - _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ]; - } - // keep track of properties that are transitioning - for ( prop in args.to ) { - _transition.ingProperties[ prop ] = true; - // keep track of properties to clean up when transition is done - if ( args.isCleaning ) { - _transition.clean[ prop ] = true; - } - } - - // set from styles - if ( args.from ) { - this.css( args.from ); - // force redraw. http://blog.alexmaccaw.com/css-transitions - var h = this.element.offsetHeight; - // hack for JSHint to hush about unused var - h = null; - } - // enable transition - this.enableTransition( args.to ); - // set styles that are transitioning - this.css( args.to ); - - this.isTransitioning = true; - -}; - -// dash before all cap letters, including first for -// WebkitTransform => -webkit-transform -function toDashedAll( str ) { - return str.replace( /([A-Z])/g, function( $1 ) { - return '-' + $1.toLowerCase(); - }); -} - -var transitionProps = 'opacity,' + toDashedAll( transformProperty ); - -proto.enableTransition = function(/* style */) { - // HACK changing transitionProperty during a transition - // will cause transition to jump - if ( this.isTransitioning ) { - return; - } - - // make `transition: foo, bar, baz` from style object - // HACK un-comment this when enableTransition can work - // while a transition is happening - // var transitionValues = []; - // for ( var prop in style ) { - // // dash-ify camelCased properties like WebkitTransition - // prop = vendorProperties[ prop ] || prop; - // transitionValues.push( toDashedAll( prop ) ); - // } - // munge number to millisecond, to match stagger - var duration = this.layout.options.transitionDuration; - duration = typeof duration == 'number' ? duration + 'ms' : duration; - // enable transition styles - this.css({ - transitionProperty: transitionProps, - transitionDuration: duration, - transitionDelay: this.staggerDelay || 0 - }); - // listen for transition end event - this.element.addEventListener( transitionEndEvent, this, false ); -}; - -// ----- events ----- // - -proto.onwebkitTransitionEnd = function( event ) { - this.ontransitionend( event ); -}; - -proto.onotransitionend = function( event ) { - this.ontransitionend( event ); -}; - -// properties that I munge to make my life easier -var dashedVendorProperties = { - '-webkit-transform': 'transform' -}; - -proto.ontransitionend = function( event ) { - // disregard bubbled events from children - if ( event.target !== this.element ) { - return; - } - var _transition = this._transn; - // get property name of transitioned property, convert to prefix-free - var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName; - - // remove property that has completed transitioning - delete _transition.ingProperties[ propertyName ]; - // check if any properties are still transitioning - if ( isEmptyObj( _transition.ingProperties ) ) { - // all properties have completed transitioning - this.disableTransition(); - } - // clean style - if ( propertyName in _transition.clean ) { - // clean up style - this.element.style[ event.propertyName ] = ''; - delete _transition.clean[ propertyName ]; - } - // trigger onTransitionEnd callback - if ( propertyName in _transition.onEnd ) { - var onTransitionEnd = _transition.onEnd[ propertyName ]; - onTransitionEnd.call( this ); - delete _transition.onEnd[ propertyName ]; - } - - this.emitEvent( 'transitionEnd', [ this ] ); -}; - -proto.disableTransition = function() { - this.removeTransitionStyles(); - this.element.removeEventListener( transitionEndEvent, this, false ); - this.isTransitioning = false; -}; - -/** - * removes style property from element - * @param {Object} style -**/ -proto._removeStyles = function( style ) { - // clean up transition styles - var cleanStyle = {}; - for ( var prop in style ) { - cleanStyle[ prop ] = ''; - } - this.css( cleanStyle ); -}; - -var cleanTransitionStyle = { - transitionProperty: '', - transitionDuration: '', - transitionDelay: '' -}; - -proto.removeTransitionStyles = function() { - // remove transition - this.css( cleanTransitionStyle ); -}; - -// ----- stagger ----- // - -proto.stagger = function( delay ) { - delay = isNaN( delay ) ? 0 : delay; - this.staggerDelay = delay + 'ms'; -}; - -// ----- show/hide/remove ----- // - -// remove element from DOM -proto.removeElem = function() { - this.element.parentNode.removeChild( this.element ); - // remove display: none - this.css({ display: '' }); - this.emitEvent( 'remove', [ this ] ); -}; - -proto.remove = function() { - // just remove element if no transition support or no transition - if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) { - this.removeElem(); - return; - } - - // start transition - this.once( 'transitionEnd', function() { - this.removeElem(); - }); - this.hide(); -}; - -proto.reveal = function() { - delete this.isHidden; - // remove display: none - this.css({ display: '' }); - - var options = this.layout.options; - - var onTransitionEnd = {}; - var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle'); - onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd; - - this.transition({ - from: options.hiddenStyle, - to: options.visibleStyle, - isCleaning: true, - onTransitionEnd: onTransitionEnd - }); -}; - -proto.onRevealTransitionEnd = function() { - // check if still visible - // during transition, item may have been hidden - if ( !this.isHidden ) { - this.emitEvent('reveal'); - } -}; - -/** - * get style property use for hide/reveal transition end - * @param {String} styleProperty - hiddenStyle/visibleStyle - * @returns {String} - */ -proto.getHideRevealTransitionEndProperty = function( styleProperty ) { - var optionStyle = this.layout.options[ styleProperty ]; - // use opacity - if ( optionStyle.opacity ) { - return 'opacity'; - } - // get first property - for ( var prop in optionStyle ) { - return prop; - } -}; - -proto.hide = function() { - // set flag - this.isHidden = true; - // remove display: none - this.css({ display: '' }); - - var options = this.layout.options; - - var onTransitionEnd = {}; - var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle'); - onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd; - - this.transition({ - from: options.visibleStyle, - to: options.hiddenStyle, - // keep hidden stuff hidden - isCleaning: true, - onTransitionEnd: onTransitionEnd - }); -}; - -proto.onHideTransitionEnd = function() { - // check if still hidden - // during transition, item may have been un-hidden - if ( this.isHidden ) { - this.css({ display: 'none' }); - this.emitEvent('hide'); - } -}; - -proto.destroy = function() { - this.css({ - position: '', - left: '', - right: '', - top: '', - bottom: '', - transition: '', - transform: '' - }); -}; - -return Item; - -})); - - -/***/ }), - -/***/ "./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js": -/*!*********************************************************************!*\ - !*** ./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js ***! - \*********************************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * EvEmitter v1.1.0 - * Lil' event emitter - * MIT License - */ - -/* jshint unused: true, undef: true, strict: true */ - -( function( global, factory ) { - // universal module definition - /* jshint strict: false */ /* globals define, module, window */ - if ( true ) { - // AMD - RequireJS - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( typeof window != 'undefined' ? window : this, function() { - -"use strict"; - -function EvEmitter() {} - -var proto = EvEmitter.prototype; - -proto.on = function( eventName, listener ) { - if ( !eventName || !listener ) { - return; - } - // set events hash - var events = this._events = this._events || {}; - // set listeners array - var listeners = events[ eventName ] = events[ eventName ] || []; - // only add once - if ( listeners.indexOf( listener ) == -1 ) { - listeners.push( listener ); - } - - return this; -}; - -proto.once = function( eventName, listener ) { - if ( !eventName || !listener ) { - return; - } - // add event - this.on( eventName, listener ); - // set once flag - // set onceEvents hash - var onceEvents = this._onceEvents = this._onceEvents || {}; - // set onceListeners object - var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {}; - // set flag - onceListeners[ listener ] = true; - - return this; -}; - -proto.off = function( eventName, listener ) { - var listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) { - return; - } - var index = listeners.indexOf( listener ); - if ( index != -1 ) { - listeners.splice( index, 1 ); - } - - return this; -}; - -proto.emitEvent = function( eventName, args ) { - var listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) { - return; - } - // copy over to avoid interference if .off() in listener - listeners = listeners.slice(0); - args = args || []; - // once stuff - var onceListeners = this._onceEvents && this._onceEvents[ eventName ]; - - for ( var i=0; i < listeners.length; i++ ) { - var listener = listeners[i] - var isOnce = onceListeners && onceListeners[ listener ]; - if ( isOnce ) { - // remove listener - // remove before trigger to prevent recursion - this.off( eventName, listener ); - // unset once flag - delete onceListeners[ listener ]; - } - // trigger listener - listener.apply( this, args ); - } - - return this; -}; - -proto.allOff = function() { - delete this._events; - delete this._onceEvents; -}; - -return EvEmitter; - -})); - - -/***/ }), - -/***/ "./node_modules/outlayer/outlayer.js": -/*!*******************************************!*\ - !*** ./node_modules/outlayer/outlayer.js ***! - \*******************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - * Outlayer v2.1.1 - * the brains and guts of a layout library - * MIT license - */ - -( function( window, factory ) { - 'use strict'; - // universal module definition - /* jshint strict: false */ /* globals define, module, require */ - if ( true ) { - // AMD - RequireJS - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js"), - __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js"), - __webpack_require__(/*! fizzy-ui-utils/utils */ "./node_modules/fizzy-ui-utils/utils.js"), - __webpack_require__(/*! ./item */ "./node_modules/outlayer/item.js") - ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( EvEmitter, getSize, utils, Item ) { - return factory( window, EvEmitter, getSize, utils, Item); - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( window, EvEmitter, getSize, utils, Item ) { -'use strict'; - -// ----- vars ----- // - -var console = window.console; -var jQuery = window.jQuery; -var noop = function() {}; - -// -------------------------- Outlayer -------------------------- // - -// globally unique identifiers -var GUID = 0; -// internal store of all Outlayer intances -var instances = {}; - - -/** - * @param {Element, String} element - * @param {Object} options - * @constructor - */ -function Outlayer( element, options ) { - var queryElement = utils.getQueryElement( element ); - if ( !queryElement ) { - if ( console ) { - console.error( 'Bad element for ' + this.constructor.namespace + - ': ' + ( queryElement || element ) ); - } - return; - } - this.element = queryElement; - // add jQuery - if ( jQuery ) { - this.$element = jQuery( this.element ); - } - - // options - this.options = utils.extend( {}, this.constructor.defaults ); - this.option( options ); - - // add id for Outlayer.getFromElement - var id = ++GUID; - this.element.outlayerGUID = id; // expando - instances[ id ] = this; // associate via id - - // kick it off - this._create(); - - var isInitLayout = this._getOption('initLayout'); - if ( isInitLayout ) { - this.layout(); - } -} - -// settings are for internal use only -Outlayer.namespace = 'outlayer'; -Outlayer.Item = Item; - -// default options -Outlayer.defaults = { - containerStyle: { - position: 'relative' - }, - initLayout: true, - originLeft: true, - originTop: true, - resize: true, - resizeContainer: true, - // item options - transitionDuration: '0.4s', - hiddenStyle: { - opacity: 0, - transform: 'scale(0.001)' - }, - visibleStyle: { - opacity: 1, - transform: 'scale(1)' - } -}; - -var proto = Outlayer.prototype; -// inherit EvEmitter -utils.extend( proto, EvEmitter.prototype ); - -/** - * set options - * @param {Object} opts - */ -proto.option = function( opts ) { - utils.extend( this.options, opts ); -}; - -/** - * get backwards compatible option value, check old name - */ -proto._getOption = function( option ) { - var oldOption = this.constructor.compatOptions[ option ]; - return oldOption && this.options[ oldOption ] !== undefined ? - this.options[ oldOption ] : this.options[ option ]; -}; - -Outlayer.compatOptions = { - // currentName: oldName - initLayout: 'isInitLayout', - horizontal: 'isHorizontal', - layoutInstant: 'isLayoutInstant', - originLeft: 'isOriginLeft', - originTop: 'isOriginTop', - resize: 'isResizeBound', - resizeContainer: 'isResizingContainer' -}; - -proto._create = function() { - // get items from children - this.reloadItems(); - // elements that affect layout, but are not laid out - this.stamps = []; - this.stamp( this.options.stamp ); - // set container style - utils.extend( this.element.style, this.options.containerStyle ); - - // bind resize method - var canBindResize = this._getOption('resize'); - if ( canBindResize ) { - this.bindResize(); - } -}; - -// goes through all children again and gets bricks in proper order -proto.reloadItems = function() { - // collection of item elements - this.items = this._itemize( this.element.children ); -}; - - -/** - * turn elements into Outlayer.Items to be used in layout - * @param {Array or NodeList or HTMLElement} elems - * @returns {Array} items - collection of new Outlayer Items - */ -proto._itemize = function( elems ) { - - var itemElems = this._filterFindItemElements( elems ); - var Item = this.constructor.Item; - - // create new Outlayer Items for collection - var items = []; - for ( var i=0; i < itemElems.length; i++ ) { - var elem = itemElems[i]; - var item = new Item( elem, this ); - items.push( item ); - } - - return items; -}; - -/** - * get item elements to be used in layout - * @param {Array or NodeList or HTMLElement} elems - * @returns {Array} items - item elements - */ -proto._filterFindItemElements = function( elems ) { - return utils.filterFindElements( elems, this.options.itemSelector ); -}; - -/** - * getter method for getting item elements - * @returns {Array} elems - collection of item elements - */ -proto.getItemElements = function() { - return this.items.map( function( item ) { - return item.element; - }); -}; - -// ----- init & layout ----- // - -/** - * lays out all items - */ -proto.layout = function() { - this._resetLayout(); - this._manageStamps(); - - // don't animate first layout - var layoutInstant = this._getOption('layoutInstant'); - var isInstant = layoutInstant !== undefined ? - layoutInstant : !this._isLayoutInited; - this.layoutItems( this.items, isInstant ); - - // flag for initalized - this._isLayoutInited = true; -}; - -// _init is alias for layout -proto._init = proto.layout; - -/** - * logic before any new layout - */ -proto._resetLayout = function() { - this.getSize(); -}; - - -proto.getSize = function() { - this.size = getSize( this.element ); -}; - -/** - * get measurement from option, for columnWidth, rowHeight, gutter - * if option is String -> get element from selector string, & get size of element - * if option is Element -> get size of element - * else use option as a number - * - * @param {String} measurement - * @param {String} size - width or height - * @private - */ -proto._getMeasurement = function( measurement, size ) { - var option = this.options[ measurement ]; - var elem; - if ( !option ) { - // default to 0 - this[ measurement ] = 0; - } else { - // use option as an element - if ( typeof option == 'string' ) { - elem = this.element.querySelector( option ); - } else if ( option instanceof HTMLElement ) { - elem = option; - } - // use size of element, if element - this[ measurement ] = elem ? getSize( elem )[ size ] : option; - } -}; - -/** - * layout a collection of item elements - * @api public - */ -proto.layoutItems = function( items, isInstant ) { - items = this._getItemsForLayout( items ); - - this._layoutItems( items, isInstant ); - - this._postLayout(); -}; - -/** - * get the items to be laid out - * you may want to skip over some items - * @param {Array} items - * @returns {Array} items - */ -proto._getItemsForLayout = function( items ) { - return items.filter( function( item ) { - return !item.isIgnored; - }); -}; - -/** - * layout items - * @param {Array} items - * @param {Boolean} isInstant - */ -proto._layoutItems = function( items, isInstant ) { - this._emitCompleteOnItems( 'layout', items ); - - if ( !items || !items.length ) { - // no items, emit event with empty array - return; - } - - var queue = []; - - items.forEach( function( item ) { - // get x/y object from method - var position = this._getItemLayoutPosition( item ); - // enqueue - position.item = item; - position.isInstant = isInstant || item.isLayoutInstant; - queue.push( position ); - }, this ); - - this._processLayoutQueue( queue ); -}; - -/** - * get item layout position - * @param {Outlayer.Item} item - * @returns {Object} x and y position - */ -proto._getItemLayoutPosition = function( /* item */ ) { - return { - x: 0, - y: 0 - }; -}; - -/** - * iterate over array and position each item - * Reason being - separating this logic prevents 'layout invalidation' - * thx @paul_irish - * @param {Array} queue - */ -proto._processLayoutQueue = function( queue ) { - this.updateStagger(); - queue.forEach( function( obj, i ) { - this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i ); - }, this ); -}; - -// set stagger from option in milliseconds number -proto.updateStagger = function() { - var stagger = this.options.stagger; - if ( stagger === null || stagger === undefined ) { - this.stagger = 0; - return; - } - this.stagger = getMilliseconds( stagger ); - return this.stagger; -}; - -/** - * Sets position of item in DOM - * @param {Outlayer.Item} item - * @param {Number} x - horizontal position - * @param {Number} y - vertical position - * @param {Boolean} isInstant - disables transitions - */ -proto._positionItem = function( item, x, y, isInstant, i ) { - if ( isInstant ) { - // if not transition, just set CSS - item.goTo( x, y ); - } else { - item.stagger( i * this.stagger ); - item.moveTo( x, y ); - } -}; - -/** - * Any logic you want to do after each layout, - * i.e. size the container - */ -proto._postLayout = function() { - this.resizeContainer(); -}; - -proto.resizeContainer = function() { - var isResizingContainer = this._getOption('resizeContainer'); - if ( !isResizingContainer ) { - return; - } - var size = this._getContainerSize(); - if ( size ) { - this._setContainerMeasure( size.width, true ); - this._setContainerMeasure( size.height, false ); - } -}; - -/** - * Sets width or height of container if returned - * @returns {Object} size - * @param {Number} width - * @param {Number} height - */ -proto._getContainerSize = noop; - -/** - * @param {Number} measure - size of width or height - * @param {Boolean} isWidth - */ -proto._setContainerMeasure = function( measure, isWidth ) { - if ( measure === undefined ) { - return; - } - - var elemSize = this.size; - // add padding and border width if border box - if ( elemSize.isBorderBox ) { - measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight + - elemSize.borderLeftWidth + elemSize.borderRightWidth : - elemSize.paddingBottom + elemSize.paddingTop + - elemSize.borderTopWidth + elemSize.borderBottomWidth; - } - - measure = Math.max( measure, 0 ); - this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px'; -}; - -/** - * emit eventComplete on a collection of items events - * @param {String} eventName - * @param {Array} items - Outlayer.Items - */ -proto._emitCompleteOnItems = function( eventName, items ) { - var _this = this; - function onComplete() { - _this.dispatchEvent( eventName + 'Complete', null, [ items ] ); - } - - var count = items.length; - if ( !items || !count ) { - onComplete(); - return; - } - - var doneCount = 0; - function tick() { - doneCount++; - if ( doneCount == count ) { - onComplete(); - } - } - - // bind callback - items.forEach( function( item ) { - item.once( eventName, tick ); - }); -}; - -/** - * emits events via EvEmitter and jQuery events - * @param {String} type - name of event - * @param {Event} event - original event - * @param {Array} args - extra arguments - */ -proto.dispatchEvent = function( type, event, args ) { - // add original event to arguments - var emitArgs = event ? [ event ].concat( args ) : args; - this.emitEvent( type, emitArgs ); - - if ( jQuery ) { - // set this.$element - this.$element = this.$element || jQuery( this.element ); - if ( event ) { - // create jQuery event - var $event = jQuery.Event( event ); - $event.type = type; - this.$element.trigger( $event, args ); - } else { - // just trigger with type if no event available - this.$element.trigger( type, args ); - } - } -}; - -// -------------------------- ignore & stamps -------------------------- // - - -/** - * keep item in collection, but do not lay it out - * ignored items do not get skipped in layout - * @param {Element} elem - */ -proto.ignore = function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - item.isIgnored = true; - } -}; - -/** - * return item to layout collection - * @param {Element} elem - */ -proto.unignore = function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - delete item.isIgnored; - } -}; - -/** - * adds elements to stamps - * @param {NodeList, Array, Element, or String} elems - */ -proto.stamp = function( elems ) { - elems = this._find( elems ); - if ( !elems ) { - return; - } - - this.stamps = this.stamps.concat( elems ); - // ignore - elems.forEach( this.ignore, this ); -}; - -/** - * removes elements to stamps - * @param {NodeList, Array, or Element} elems - */ -proto.unstamp = function( elems ) { - elems = this._find( elems ); - if ( !elems ){ - return; - } - - elems.forEach( function( elem ) { - // filter out removed stamp elements - utils.removeFrom( this.stamps, elem ); - this.unignore( elem ); - }, this ); -}; - -/** - * finds child elements - * @param {NodeList, Array, Element, or String} elems - * @returns {Array} elems - */ -proto._find = function( elems ) { - if ( !elems ) { - return; - } - // if string, use argument as selector string - if ( typeof elems == 'string' ) { - elems = this.element.querySelectorAll( elems ); - } - elems = utils.makeArray( elems ); - return elems; -}; - -proto._manageStamps = function() { - if ( !this.stamps || !this.stamps.length ) { - return; - } - - this._getBoundingRect(); - - this.stamps.forEach( this._manageStamp, this ); -}; - -// update boundingLeft / Top -proto._getBoundingRect = function() { - // get bounding rect for container element - var boundingRect = this.element.getBoundingClientRect(); - var size = this.size; - this._boundingRect = { - left: boundingRect.left + size.paddingLeft + size.borderLeftWidth, - top: boundingRect.top + size.paddingTop + size.borderTopWidth, - right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ), - bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth ) - }; -}; - -/** - * @param {Element} stamp -**/ -proto._manageStamp = noop; - -/** - * get x/y position of element relative to container element - * @param {Element} elem - * @returns {Object} offset - has left, top, right, bottom - */ -proto._getElementOffset = function( elem ) { - var boundingRect = elem.getBoundingClientRect(); - var thisRect = this._boundingRect; - var size = getSize( elem ); - var offset = { - left: boundingRect.left - thisRect.left - size.marginLeft, - top: boundingRect.top - thisRect.top - size.marginTop, - right: thisRect.right - boundingRect.right - size.marginRight, - bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom - }; - return offset; -}; - -// -------------------------- resize -------------------------- // - -// enable event handlers for listeners -// i.e. resize -> onresize -proto.handleEvent = utils.handleEvent; - -/** - * Bind layout to window resizing - */ -proto.bindResize = function() { - window.addEventListener( 'resize', this ); - this.isResizeBound = true; -}; - -/** - * Unbind layout to window resizing - */ -proto.unbindResize = function() { - window.removeEventListener( 'resize', this ); - this.isResizeBound = false; -}; - -proto.onresize = function() { - this.resize(); -}; - -utils.debounceMethod( Outlayer, 'onresize', 100 ); - -proto.resize = function() { - // don't trigger if size did not change - // or if resize was unbound. See #9 - if ( !this.isResizeBound || !this.needsResizeLayout() ) { - return; - } - - this.layout(); -}; - -/** - * check if layout is needed post layout - * @returns Boolean - */ -proto.needsResizeLayout = function() { - var size = getSize( this.element ); - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var hasSizes = this.size && size; - return hasSizes && size.innerWidth !== this.size.innerWidth; -}; - -// -------------------------- methods -------------------------- // - -/** - * add items to Outlayer instance - * @param {Array or NodeList or Element} elems - * @returns {Array} items - Outlayer.Items -**/ -proto.addItems = function( elems ) { - var items = this._itemize( elems ); - // add items to collection - if ( items.length ) { - this.items = this.items.concat( items ); - } - return items; -}; - -/** - * Layout newly-appended item elements - * @param {Array or NodeList or Element} elems - */ -proto.appended = function( elems ) { - var items = this.addItems( elems ); - if ( !items.length ) { - return; - } - // layout and reveal just the new items - this.layoutItems( items, true ); - this.reveal( items ); -}; - -/** - * Layout prepended elements - * @param {Array or NodeList or Element} elems - */ -proto.prepended = function( elems ) { - var items = this._itemize( elems ); - if ( !items.length ) { - return; - } - // add items to beginning of collection - var previousItems = this.items.slice(0); - this.items = items.concat( previousItems ); - // start new layout - this._resetLayout(); - this._manageStamps(); - // layout new stuff without transition - this.layoutItems( items, true ); - this.reveal( items ); - // layout previous items - this.layoutItems( previousItems ); -}; - -/** - * reveal a collection of items - * @param {Array of Outlayer.Items} items - */ -proto.reveal = function( items ) { - this._emitCompleteOnItems( 'reveal', items ); - if ( !items || !items.length ) { - return; - } - var stagger = this.updateStagger(); - items.forEach( function( item, i ) { - item.stagger( i * stagger ); - item.reveal(); - }); -}; - -/** - * hide a collection of items - * @param {Array of Outlayer.Items} items - */ -proto.hide = function( items ) { - this._emitCompleteOnItems( 'hide', items ); - if ( !items || !items.length ) { - return; - } - var stagger = this.updateStagger(); - items.forEach( function( item, i ) { - item.stagger( i * stagger ); - item.hide(); - }); -}; - -/** - * reveal item elements - * @param {Array}, {Element}, {NodeList} items - */ -proto.revealItemElements = function( elems ) { - var items = this.getItems( elems ); - this.reveal( items ); -}; - -/** - * hide item elements - * @param {Array}, {Element}, {NodeList} items - */ -proto.hideItemElements = function( elems ) { - var items = this.getItems( elems ); - this.hide( items ); -}; - -/** - * get Outlayer.Item, given an Element - * @param {Element} elem - * @param {Function} callback - * @returns {Outlayer.Item} item - */ -proto.getItem = function( elem ) { - // loop through items to get the one that matches - for ( var i=0; i < this.items.length; i++ ) { - var item = this.items[i]; - if ( item.element == elem ) { - // return item - return item; - } - } -}; - -/** - * get collection of Outlayer.Items, given Elements - * @param {Array} elems - * @returns {Array} items - Outlayer.Items - */ -proto.getItems = function( elems ) { - elems = utils.makeArray( elems ); - var items = []; - elems.forEach( function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - items.push( item ); - } - }, this ); - - return items; -}; - -/** - * remove element(s) from instance and DOM - * @param {Array or NodeList or Element} elems - */ -proto.remove = function( elems ) { - var removeItems = this.getItems( elems ); - - this._emitCompleteOnItems( 'remove', removeItems ); - - // bail if no items to remove - if ( !removeItems || !removeItems.length ) { - return; - } - - removeItems.forEach( function( item ) { - item.remove(); - // remove item from collection - utils.removeFrom( this.items, item ); - }, this ); -}; - -// ----- destroy ----- // - -// remove and disable Outlayer instance -proto.destroy = function() { - // clean up dynamic styles - var style = this.element.style; - style.height = ''; - style.position = ''; - style.width = ''; - // destroy items - this.items.forEach( function( item ) { - item.destroy(); - }); - - this.unbindResize(); - - var id = this.element.outlayerGUID; - delete instances[ id ]; // remove reference to instance by id - delete this.element.outlayerGUID; - // remove data for jQuery - if ( jQuery ) { - jQuery.removeData( this.element, this.constructor.namespace ); - } - -}; - -// -------------------------- data -------------------------- // - -/** - * get Outlayer instance from element - * @param {Element} elem - * @returns {Outlayer} - */ -Outlayer.data = function( elem ) { - elem = utils.getQueryElement( elem ); - var id = elem && elem.outlayerGUID; - return id && instances[ id ]; -}; - - -// -------------------------- create Outlayer class -------------------------- // - -/** - * create a layout class - * @param {String} namespace - */ -Outlayer.create = function( namespace, options ) { - // sub-class Outlayer - var Layout = subclass( Outlayer ); - // apply new options and compatOptions - Layout.defaults = utils.extend( {}, Outlayer.defaults ); - utils.extend( Layout.defaults, options ); - Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions ); - - Layout.namespace = namespace; - - Layout.data = Outlayer.data; - - // sub-class Item - Layout.Item = subclass( Item ); - - // -------------------------- declarative -------------------------- // - - utils.htmlInit( Layout, namespace ); - - // -------------------------- jQuery bridge -------------------------- // - - // make into jQuery plugin - if ( jQuery && jQuery.bridget ) { - jQuery.bridget( namespace, Layout ); - } - - return Layout; -}; - -function subclass( Parent ) { - function SubClass() { - Parent.apply( this, arguments ); - } - - SubClass.prototype = Object.create( Parent.prototype ); - SubClass.prototype.constructor = SubClass; - - return SubClass; -} - -// ----- helpers ----- // - -// how many milliseconds are in each unit -var msUnits = { - ms: 1, - s: 1000 -}; - -// munge time-like parameter into millisecond number -// '0.4s' -> 40 -function getMilliseconds( time ) { - if ( typeof time == 'number' ) { - return time; - } - var matches = time.match( /(^\d*\.?\d*)(\w*)/ ); - var num = matches && matches[1]; - var unit = matches && matches[2]; - if ( !num.length ) { - return 0; - } - num = parseFloat( num ); - var mult = msUnits[ unit ] || 1; - return num * mult; -} - -// ----- fin ----- // - -// back in global -Outlayer.Item = Item; - -return Outlayer; - -})); - - -/***/ }), - -/***/ "./src/img/logos/giphy-powered.png": -/*!*****************************************!*\ - !*** ./src/img/logos/giphy-powered.png ***! - \*****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -module.exports = __webpack_require__.p + "images/giphy-powered.9748c37d.png"; - -/***/ }), - -/***/ "react": -/*!************************!*\ - !*** external "React" ***! - \************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["React"]; - -/***/ }), - -/***/ "@wordpress/blocks": -/*!********************************!*\ - !*** external ["wp","blocks"] ***! - \********************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["blocks"]; - -/***/ }), - -/***/ "@wordpress/data": -/*!******************************!*\ - !*** external ["wp","data"] ***! - \******************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["data"]; - -/***/ }), - -/***/ "@wordpress/element": -/*!*********************************!*\ - !*** external ["wp","element"] ***! - \*********************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["element"]; - -/***/ }), - -/***/ "@wordpress/i18n": -/*!******************************!*\ - !*** external ["wp","i18n"] ***! - \******************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["i18n"]; - -/***/ }), - -/***/ "?9157": -/*!************************!*\ - !*** crypto (ignored) ***! - \************************/ -/***/ (() => { - -/* (ignored) */ - -/***/ }), - -/***/ "./node_modules/classnames/index.js": -/*!******************************************!*\ - !*** ./node_modules/classnames/index.js ***! - \******************************************/ -/***/ ((module, exports) => { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/* global define */ - -(function () { - 'use strict'; - - var hasOwn = {}.hasOwnProperty; - - function classNames () { - var classes = ''; - - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - if (arg) { - classes = appendClass(classes, parseValue(arg)); - } - } - - return classes; - } - - function parseValue (arg) { - if (typeof arg === 'string' || typeof arg === 'number') { - return arg; - } - - if (typeof arg !== 'object') { - return ''; - } - - if (Array.isArray(arg)) { - return classNames.apply(null, arg); - } - - if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { - return arg.toString(); - } - - var classes = ''; - - for (var key in arg) { - if (hasOwn.call(arg, key) && arg[key]) { - classes = appendClass(classes, key); - } - } - - return classes; - } - - function appendClass (value, newClass) { - if (!newClass) { - return value; - } - - if (value) { - return value + ' ' + newClass; - } - - return value + newClass; - } - - if ( true && module.exports) { - classNames.default = classNames; - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return classNames; - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}()); - - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/adapters.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/adapters/adapters.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _http_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./http.js */ "./node_modules/axios/lib/helpers/null.js"); -/* harmony import */ var _xhr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./xhr.js */ "./node_modules/axios/lib/adapters/xhr.js"); -/* harmony import */ var _fetch_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fetch.js */ "./node_modules/axios/lib/adapters/fetch.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - - - - - - -const knownAdapters = { - http: _http_js__WEBPACK_IMPORTED_MODULE_0__["default"], - xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_1__["default"], - fetch: _fetch_js__WEBPACK_IMPORTED_MODULE_2__["default"] -} - -_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(knownAdapters, (fn, value) => { - if (fn) { - try { - Object.defineProperty(fn, 'name', {value}); - } catch (e) { - // eslint-disable-next-line no-empty - } - Object.defineProperty(fn, 'adapterName', {value}); - } -}); - -const renderReason = (reason) => `- ${reason}`; - -const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(adapter) || adapter === null || adapter === false; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - getAdapter: (adapters) => { - adapters = _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isArray(adapters) ? adapters : [adapters]; - - const {length} = adapters; - let nameOrAdapter; - let adapter; - - const rejectedReasons = {}; - - for (let i = 0; i < length; i++) { - nameOrAdapter = adapters[i]; - let id; - - adapter = nameOrAdapter; - - if (!isResolvedHandle(nameOrAdapter)) { - adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; - - if (adapter === undefined) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"](`Unknown adapter '${id}'`); - } - } - - if (adapter) { - break; - } - - rejectedReasons[id || '#' + i] = adapter; - } - - if (!adapter) { - - const reasons = Object.entries(rejectedReasons) - .map(([id, state]) => `adapter ${id} ` + - (state === false ? 'is not supported by the environment' : 'is not available in the build') - ); - - let s = length ? - (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : - 'as no adapter specified'; - - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"]( - `There is no suitable adapter to dispatch the request ` + s, - 'ERR_NOT_SUPPORT' - ); - } - - return adapter; - }, - adapters: knownAdapters -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/fetch.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/adapters/fetch.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/composeSignals.js */ "./node_modules/axios/lib/helpers/composeSignals.js"); -/* harmony import */ var _helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/trackStream.js */ "./node_modules/axios/lib/helpers/trackStream.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../helpers/progressEventReducer.js */ "./node_modules/axios/lib/helpers/progressEventReducer.js"); -/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/resolveConfig.js */ "./node_modules/axios/lib/helpers/resolveConfig.js"); -/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/settle.js */ "./node_modules/axios/lib/core/settle.js"); - - - - - - - - - - -const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function'; -const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function'; - -// used only inside the fetch adapter -const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? - ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : - async (str) => new Uint8Array(await new Response(str).arrayBuffer()) -); - -const test = (fn, ...args) => { - try { - return !!fn(...args); - } catch (e) { - return false - } -} - -const supportsRequestStream = isReadableStreamSupported && test(() => { - let duplexAccessed = false; - - const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, { - body: new ReadableStream(), - method: 'POST', - get duplex() { - duplexAccessed = true; - return 'half'; - }, - }).headers.has('Content-Type'); - - return duplexAccessed && !hasContentType; -}); - -const DEFAULT_CHUNK_SIZE = 64 * 1024; - -const supportsResponseStream = isReadableStreamSupported && - test(() => _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReadableStream(new Response('').body)); - - -const resolvers = { - stream: supportsResponseStream && ((res) => res.body) -}; - -isFetchSupported && (((res) => { - ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => { - !resolvers[type] && (resolvers[type] = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(res[type]) ? (res) => res[type]() : - (_, config) => { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](`Response type '${type}' is not supported`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT, config); - }) - }); -})(new Response)); - -const getBodyLength = async (body) => { - if (body == null) { - return 0; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isBlob(body)) { - return body.size; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isSpecCompliantForm(body)) { - const _request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, { - method: 'POST', - body, - }); - return (await _request.arrayBuffer()).byteLength; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBufferView(body) || _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBuffer(body)) { - return body.byteLength; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isURLSearchParams(body)) { - body = body + ''; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(body)) { - return (await encodeText(body)).byteLength; - } -} - -const resolveBodyLength = async (headers, body) => { - const length = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(headers.getContentLength()); - - return length == null ? getBodyLength(body) : length; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isFetchSupported && (async (config) => { - let { - url, - method, - data, - signal, - cancelToken, - timeout, - onDownloadProgress, - onUploadProgress, - responseType, - headers, - withCredentials = 'same-origin', - fetchOptions - } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(config); - - responseType = responseType ? (responseType + '').toLowerCase() : 'text'; - - let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__["default"])([signal, cancelToken && cancelToken.toAbortSignal()], timeout); - - let request; - - const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { - composedSignal.unsubscribe(); - }); - - let requestContentLength; - - try { - if ( - onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' && - (requestContentLength = await resolveBodyLength(headers, data)) !== 0 - ) { - let _request = new Request(url, { - method: 'POST', - body: data, - duplex: "half" - }); - - let contentTypeHeader; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { - headers.setContentType(contentTypeHeader) - } - - if (_request.body) { - const [onProgress, flush] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)( - requestContentLength, - (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onUploadProgress)) - ); - - data = (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); - } - } - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(withCredentials)) { - withCredentials = withCredentials ? 'include' : 'omit'; - } - - // Cloudflare Workers throws when credentials are defined - // see https://github.com/cloudflare/workerd/issues/902 - const isCredentialsSupported = "credentials" in Request.prototype; - request = new Request(url, { - ...fetchOptions, - signal: composedSignal, - method: method.toUpperCase(), - headers: headers.normalize().toJSON(), - body: data, - duplex: "half", - credentials: isCredentialsSupported ? withCredentials : undefined - }); - - let response = await fetch(request); - - const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); - - if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) { - const options = {}; - - ['status', 'statusText', 'headers'].forEach(prop => { - options[prop] = response[prop]; - }); - - const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length')); - - const [onProgress, flush] = onDownloadProgress && (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)( - responseContentLength, - (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onDownloadProgress), true) - ) || []; - - response = new Response( - (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { - flush && flush(); - unsubscribe && unsubscribe(); - }), - options - ); - } - - responseType = responseType || 'text'; - - let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].findKey(resolvers, responseType) || 'text'](response, config); - - !isStreamResponse && unsubscribe && unsubscribe(); - - return await new Promise((resolve, reject) => { - (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_7__["default"])(resolve, reject, { - data: responseData, - headers: _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].from(response.headers), - status: response.status, - statusText: response.statusText, - config, - request - }) - }) - } catch (err) { - unsubscribe && unsubscribe(); - - if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) { - throw Object.assign( - new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NETWORK, config, request), - { - cause: err.cause || err - } - ) - } - - throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(err, err && err.code, config, request); - } -})); - - - - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/xhr.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/adapters/xhr.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../core/settle.js */ "./node_modules/axios/lib/core/settle.js"); -/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaults/transitional.js */ "./node_modules/axios/lib/defaults/transitional.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../helpers/parseProtocol.js */ "./node_modules/axios/lib/helpers/parseProtocol.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/progressEventReducer.js */ "./node_modules/axios/lib/helpers/progressEventReducer.js"); -/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/resolveConfig.js */ "./node_modules/axios/lib/helpers/resolveConfig.js"); - - - - - - - - - - - -const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported && function (config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_0__["default"])(config); - let requestData = _config.data; - const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(_config.headers).normalize(); - let {responseType, onUploadProgress, onDownloadProgress} = _config; - let onCanceled; - let uploadThrottled, downloadThrottled; - let flushUpload, flushDownload; - - function done() { - flushUpload && flushUpload(); // flush events - flushDownload && flushDownload(); // flush events - - _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); - - _config.signal && _config.signal.removeEventListener('abort', onCanceled); - } - - let request = new XMLHttpRequest(); - - request.open(_config.method.toUpperCase(), _config.url, true); - - // Set the request timeout in MS - request.timeout = _config.timeout; - - function onloadend() { - if (!request) { - return; - } - // Prepare the response - const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from( - 'getAllResponseHeaders' in request && request.getAllResponseHeaders() - ); - const responseData = !responseType || responseType === 'text' || responseType === 'json' ? - request.responseText : request.response; - const response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config, - request - }; - - (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(function _resolve(value) { - resolve(value); - done(); - }, function _reject(err) { - reject(err); - done(); - }, response); - - // Clean up request - request = null; - } - - if ('onloadend' in request) { - // Use onloadend if available - request.onloadend = onloadend; - } else { - // Listen for ready state to emulate onloadend - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - // readystate handler is calling before onerror or ontimeout handlers, - // so we should call onloadend on the next 'tick' - setTimeout(onloadend); - }; - } - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, config, request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_NETWORK, config, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; - const transitional = _config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_4__["default"]; - if (_config.timeoutErrorMessage) { - timeoutErrorMessage = _config.timeoutErrorMessage; - } - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]( - timeoutErrorMessage, - transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, - config, - request)); - - // Clean up request - request = null; - }; - - // Remove Content-Type if data is undefined - requestData === undefined && requestHeaders.setContentType(null); - - // Add headers to the request - if ('setRequestHeader' in request) { - _utils_js__WEBPACK_IMPORTED_MODULE_5__["default"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { - request.setRequestHeader(key, val); - }); - } - - // Add withCredentials to request if needed - if (!_utils_js__WEBPACK_IMPORTED_MODULE_5__["default"].isUndefined(_config.withCredentials)) { - request.withCredentials = !!_config.withCredentials; - } - - // Add responseType to request if needed - if (responseType && responseType !== 'json') { - request.responseType = _config.responseType; - } - - // Handle progress if needed - if (onDownloadProgress) { - ([downloadThrottled, flushDownload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)(onDownloadProgress, true)); - request.addEventListener('progress', downloadThrottled); - } - - // Not all browsers support upload events - if (onUploadProgress && request.upload) { - ([uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)(onUploadProgress)); - - request.upload.addEventListener('progress', uploadThrottled); - - request.upload.addEventListener('loadend', flushUpload); - } - - if (_config.cancelToken || _config.signal) { - // Handle cancellation - // eslint-disable-next-line func-names - onCanceled = cancel => { - if (!request) { - return; - } - reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_7__["default"](null, config, request) : cancel); - request.abort(); - request = null; - }; - - _config.cancelToken && _config.cancelToken.subscribe(onCanceled); - if (_config.signal) { - _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); - } - } - - const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_config.url); - - if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_9__["default"].protocols.indexOf(protocol) === -1) { - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Unsupported protocol ' + protocol + ':', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_BAD_REQUEST, config)); - return; - } - - - // Send the request - request.send(requestData || null); - }); -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/axios.js": -/*!*****************************************!*\ - !*** ./node_modules/axios/lib/axios.js ***! - \*****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js"); -/* harmony import */ var _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/Axios.js */ "./node_modules/axios/lib/core/Axios.js"); -/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); -/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); -/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js"); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cancel/CancelToken.js */ "./node_modules/axios/lib/cancel/CancelToken.js"); -/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js"); -/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./env/data.js */ "./node_modules/axios/lib/env/data.js"); -/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/spread.js */ "./node_modules/axios/lib/helpers/spread.js"); -/* harmony import */ var _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/isAxiosError.js */ "./node_modules/axios/lib/helpers/isAxiosError.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js"); -/* harmony import */ var _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers/HttpStatusCode.js */ "./node_modules/axios/lib/helpers/HttpStatusCode.js"); - - - - - - - - - - - - - - - - - - - - -/** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * - * @returns {Axios} A new instance of Axios - */ -function createInstance(defaultConfig) { - const context = new _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"](defaultConfig); - const instance = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.request, context); - - // Copy axios.prototype to instance - _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype, context, {allOwnKeys: true}); - - // Copy context to instance - _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, context, null, {allOwnKeys: true}); - - // Factory for creating new instances - instance.create = function create(instanceConfig) { - return createInstance((0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(defaultConfig, instanceConfig)); - }; - - return instance; -} - -// Create the default instance to be exported -const axios = createInstance(_defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"]); - -// Expose Axios class to allow class inheritance -axios.Axios = _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"]; - -// Expose Cancel & CancelToken -axios.CanceledError = _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__["default"]; -axios.CancelToken = _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__["default"]; -axios.isCancel = _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__["default"]; -axios.VERSION = _env_data_js__WEBPACK_IMPORTED_MODULE_8__.VERSION; -axios.toFormData = _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__["default"]; - -// Expose AxiosError class -axios.AxiosError = _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__["default"]; - -// alias for CanceledError for backward compatibility -axios.Cancel = axios.CanceledError; - -// Expose all/spread -axios.all = function all(promises) { - return Promise.all(promises); -}; - -axios.spread = _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__["default"]; - -// Expose isAxiosError -axios.isAxiosError = _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__["default"]; - -// Expose mergeConfig -axios.mergeConfig = _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"]; - -axios.AxiosHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__["default"]; - -axios.formToJSON = thing => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isHTMLForm(thing) ? new FormData(thing) : thing); - -axios.getAdapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__["default"].getAdapter; - -axios.HttpStatusCode = _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__["default"]; - -axios.default = axios; - -// this module should only have a default export -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (axios); - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/CancelToken.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/cancel/CancelToken.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); - - - - -/** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @param {Function} executor The executor function. - * - * @returns {CancelToken} - */ -class CancelToken { - constructor(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - let resolvePromise; - - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - const token = this; - - // eslint-disable-next-line func-names - this.promise.then(cancel => { - if (!token._listeners) return; - - let i = token._listeners.length; - - while (i-- > 0) { - token._listeners[i](cancel); - } - token._listeners = null; - }); - - // eslint-disable-next-line func-names - this.promise.then = onfulfilled => { - let _resolve; - // eslint-disable-next-line func-names - const promise = new Promise(resolve => { - token.subscribe(resolve); - _resolve = resolve; - }).then(onfulfilled); - - promise.cancel = function reject() { - token.unsubscribe(_resolve); - }; - - return promise; - }; - - executor(function cancel(message, config, request) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](message, config, request); - resolvePromise(token.reason); - }); - } - - /** - * Throws a `CanceledError` if cancellation has been requested. - */ - throwIfRequested() { - if (this.reason) { - throw this.reason; - } - } - - /** - * Subscribe to the cancel signal - */ - - subscribe(listener) { - if (this.reason) { - listener(this.reason); - return; - } - - if (this._listeners) { - this._listeners.push(listener); - } else { - this._listeners = [listener]; - } - } - - /** - * Unsubscribe from the cancel signal - */ - - unsubscribe(listener) { - if (!this._listeners) { - return; - } - const index = this._listeners.indexOf(listener); - if (index !== -1) { - this._listeners.splice(index, 1); - } - } - - toAbortSignal() { - const controller = new AbortController(); - - const abort = (err) => { - controller.abort(err); - }; - - this.subscribe(abort); - - controller.signal.unsubscribe = () => this.unsubscribe(abort); - - return controller.signal; - } - - /** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ - static source() { - let cancel; - const token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token, - cancel - }; - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CancelToken); - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/CanceledError.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/cancel/CanceledError.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - - -/** - * A `CanceledError` is an object that is thrown when an operation is canceled. - * - * @param {string=} message The message. - * @param {Object=} config The config. - * @param {Object=} request The request. - * - * @returns {CanceledError} The created error. - */ -function CanceledError(message, config, request) { - // eslint-disable-next-line no-eq-null,eqeqeq - _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, message == null ? 'canceled' : message, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_CANCELED, config, request); - this.name = 'CanceledError'; -} - -_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].inherits(CanceledError, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"], { - __CANCEL__: true -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CanceledError); - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/isCancel.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/cancel/isCancel.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ isCancel) -/* harmony export */ }); - - -function isCancel(value) { - return !!(value && value.__CANCEL__); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/Axios.js": -/*!**********************************************!*\ - !*** ./node_modules/axios/lib/core/Axios.js ***! - \**********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js"); -/* harmony import */ var _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InterceptorManager.js */ "./node_modules/axios/lib/core/InterceptorManager.js"); -/* harmony import */ var _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dispatchRequest.js */ "./node_modules/axios/lib/core/dispatchRequest.js"); -/* harmony import */ var _mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); -/* harmony import */ var _buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js"); -/* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/validator.js */ "./node_modules/axios/lib/helpers/validator.js"); -/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - - - - - - - - - - - -const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].validators; - -/** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - * - * @return {Axios} A new instance of Axios - */ -class Axios { - constructor(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"](), - response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"]() - }; - } - - /** - * Dispatch a request - * - * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) - * @param {?Object} config - * - * @returns {Promise} The Promise to be fulfilled - */ - async request(configOrUrl, config) { - try { - return await this._request(configOrUrl, config); - } catch (err) { - if (err instanceof Error) { - let dummy; - - Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error()); - - // slice off the Error: ... line - const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; - try { - if (!err.stack) { - err.stack = stack; - // match without the 2 top stack lines - } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) { - err.stack += '\n' + stack - } - } catch (e) { - // ignore the case where "stack" is an un-writable property - } - } - - throw err; - } - } - - _request(configOrUrl, config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof configOrUrl === 'string') { - config = config || {}; - config.url = configOrUrl; - } else { - config = configOrUrl || {}; - } - - config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config); - - const {transitional, paramsSerializer, headers} = config; - - if (transitional !== undefined) { - _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(transitional, { - silentJSONParsing: validators.transitional(validators.boolean), - forcedJSONParsing: validators.transitional(validators.boolean), - clarifyTimeoutError: validators.transitional(validators.boolean) - }, false); - } - - if (paramsSerializer != null) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(paramsSerializer)) { - config.paramsSerializer = { - serialize: paramsSerializer - } - } else { - _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(paramsSerializer, { - encode: validators.function, - serialize: validators.function - }, true); - } - } - - // Set config.method - config.method = (config.method || this.defaults.method || 'get').toLowerCase(); - - // Flatten headers - let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].merge( - headers.common, - headers[config.method] - ); - - headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - (method) => { - delete headers[method]; - } - ); - - config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].concat(contextHeaders, headers); - - // filter out skipped interceptors - const requestInterceptorChain = []; - let synchronousRequestInterceptors = true; - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { - return; - } - - synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - const responseInterceptorChain = []; - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); - }); - - let promise; - let i = 0; - let len; - - if (!synchronousRequestInterceptors) { - const chain = [_dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].bind(this), undefined]; - chain.unshift.apply(chain, requestInterceptorChain); - chain.push.apply(chain, responseInterceptorChain); - len = chain.length; - - promise = Promise.resolve(config); - - while (i < len) { - promise = promise.then(chain[i++], chain[i++]); - } - - return promise; - } - - len = requestInterceptorChain.length; - - let newConfig = config; - - i = 0; - - while (i < len) { - const onFulfilled = requestInterceptorChain[i++]; - const onRejected = requestInterceptorChain[i++]; - try { - newConfig = onFulfilled(newConfig); - } catch (error) { - onRejected.call(this, error); - break; - } - } - - try { - promise = _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].call(this, newConfig); - } catch (error) { - return Promise.reject(error); - } - - i = 0; - len = responseInterceptorChain.length; - - while (i < len) { - promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); - } - - return promise; - } - - getUri(config) { - config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config); - const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__["default"])(config.baseURL, config.url); - return (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(fullPath, config.params, config.paramsSerializer); - } -} - -// Provide aliases for supported request methods -_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, { - method, - url, - data: (config || {}).data - })); - }; -}); - -_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - - function generateHTTPMethod(isForm) { - return function httpMethod(url, data, config) { - return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, { - method, - headers: isForm ? { - 'Content-Type': 'multipart/form-data' - } : {}, - url, - data - })); - }; - } - - Axios.prototype[method] = generateHTTPMethod(); - - Axios.prototype[method + 'Form'] = generateHTTPMethod(true); -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Axios); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/AxiosError.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/core/AxiosError.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [config] The config. - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * - * @returns {Error} The created error. - */ -function AxiosError(message, code, config, request, response) { - Error.call(this); - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = (new Error()).stack; - } - - this.message = message; - this.name = 'AxiosError'; - code && (this.code = code); - config && (this.config = config); - request && (this.request = request); - if (response) { - this.response = response; - this.status = response.status ? response.status : null; - } -} - -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].inherits(AxiosError, Error, { - toJSON: function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(this.config), - code: this.code, - status: this.status - }; - } -}); - -const prototype = AxiosError.prototype; -const descriptors = {}; - -[ - 'ERR_BAD_OPTION_VALUE', - 'ERR_BAD_OPTION', - 'ECONNABORTED', - 'ETIMEDOUT', - 'ERR_NETWORK', - 'ERR_FR_TOO_MANY_REDIRECTS', - 'ERR_DEPRECATED', - 'ERR_BAD_RESPONSE', - 'ERR_BAD_REQUEST', - 'ERR_CANCELED', - 'ERR_NOT_SUPPORT', - 'ERR_INVALID_URL' -// eslint-disable-next-line func-names -].forEach(code => { - descriptors[code] = {value: code}; -}); - -Object.defineProperties(AxiosError, descriptors); -Object.defineProperty(prototype, 'isAxiosError', {value: true}); - -// eslint-disable-next-line func-names -AxiosError.from = (error, code, config, request, response, customProps) => { - const axiosError = Object.create(prototype); - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(error, axiosError, function filter(obj) { - return obj !== Error.prototype; - }, prop => { - return prop !== 'isAxiosError'; - }); - - AxiosError.call(axiosError, error.message, code, config, request, response); - - axiosError.cause = error; - - axiosError.name = error.name; - - customProps && Object.assign(axiosError, customProps); - - return axiosError; -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/AxiosHeaders.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/core/AxiosHeaders.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/parseHeaders.js */ "./node_modules/axios/lib/helpers/parseHeaders.js"); - - - - - -const $internals = Symbol('internals'); - -function normalizeHeader(header) { - return header && String(header).trim().toLowerCase(); -} - -function normalizeValue(value) { - if (value === false || value == null) { - return value; - } - - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : String(value); -} - -function parseTokens(str) { - const tokens = Object.create(null); - const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; - let match; - - while ((match = tokensRE.exec(str))) { - tokens[match[1]] = match[2]; - } - - return tokens; -} - -const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); - -function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(filter)) { - return filter.call(this, value, header); - } - - if (isHeaderNameFilter) { - value = header; - } - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(value)) return; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(filter)) { - return value.indexOf(filter) !== -1; - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(filter)) { - return filter.test(value); - } -} - -function formatHeader(header) { - return header.trim() - .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { - return char.toUpperCase() + str; - }); -} - -function buildAccessors(obj, header) { - const accessorName = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toCamelCase(' ' + header); - - ['get', 'set', 'has'].forEach(methodName => { - Object.defineProperty(obj, methodName + accessorName, { - value: function(arg1, arg2, arg3) { - return this[methodName].call(this, header, arg1, arg2, arg3); - }, - configurable: true - }); - }); -} - -class AxiosHeaders { - constructor(headers) { - headers && this.set(headers); - } - - set(header, valueOrRewrite, rewrite) { - const self = this; - - function setHeader(_value, _header, _rewrite) { - const lHeader = normalizeHeader(_header); - - if (!lHeader) { - throw new Error('header name must be a non-empty string'); - } - - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, lHeader); - - if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { - self[key || _header] = normalizeValue(_value); - } - } - - const setHeaders = (headers, _rewrite) => - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(header) || header instanceof this.constructor) { - setHeaders(header, valueOrRewrite) - } else if(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { - setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"])(header), valueOrRewrite); - } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHeaders(header)) { - for (const [key, value] of header.entries()) { - setHeader(value, key, rewrite); - } - } else { - header != null && setHeader(valueOrRewrite, header, rewrite); - } - - return this; - } - - get(header, parser) { - header = normalizeHeader(header); - - if (header) { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header); - - if (key) { - const value = this[key]; - - if (!parser) { - return value; - } - - if (parser === true) { - return parseTokens(value); - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(parser)) { - return parser.call(this, value, key); - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(parser)) { - return parser.exec(value); - } - - throw new TypeError('parser must be boolean|regexp|function'); - } - } - } - - has(header, matcher) { - header = normalizeHeader(header); - - if (header) { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header); - - return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); - } - - return false; - } - - delete(header, matcher) { - const self = this; - let deleted = false; - - function deleteHeader(_header) { - _header = normalizeHeader(_header); - - if (_header) { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, _header); - - if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { - delete self[key]; - - deleted = true; - } - } - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header)) { - header.forEach(deleteHeader); - } else { - deleteHeader(header); - } - - return deleted; - } - - clear(matcher) { - const keys = Object.keys(this); - let i = keys.length; - let deleted = false; - - while (i--) { - const key = keys[i]; - if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { - delete this[key]; - deleted = true; - } - } - - return deleted; - } - - normalize(format) { - const self = this; - const headers = {}; - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(headers, header); - - if (key) { - self[key] = normalizeValue(value); - delete self[header]; - return; - } - - const normalized = format ? formatHeader(header) : String(header).trim(); - - if (normalized !== header) { - delete self[header]; - } - - self[normalized] = normalizeValue(value); - - headers[normalized] = true; - }); - - return this; - } - - concat(...targets) { - return this.constructor.concat(this, ...targets); - } - - toJSON(asStrings) { - const obj = Object.create(null); - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => { - value != null && value !== false && (obj[header] = asStrings && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.join(', ') : value); - }); - - return obj; - } - - [Symbol.iterator]() { - return Object.entries(this.toJSON())[Symbol.iterator](); - } - - toString() { - return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); - } - - get [Symbol.toStringTag]() { - return 'AxiosHeaders'; - } - - static from(thing) { - return thing instanceof this ? thing : new this(thing); - } - - static concat(first, ...targets) { - const computed = new this(first); - - targets.forEach((target) => computed.set(target)); - - return computed; - } - - static accessor(header) { - const internals = this[$internals] = (this[$internals] = { - accessors: {} - }); - - const accessors = internals.accessors; - const prototype = this.prototype; - - function defineAccessor(_header) { - const lHeader = normalizeHeader(_header); - - if (!accessors[lHeader]) { - buildAccessors(prototype, _header); - accessors[lHeader] = true; - } - } - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); - - return this; - } -} - -AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); - -// reserved names hotfix -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => { - let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` - return { - get: () => value, - set(headerValue) { - this[mapped] = headerValue; - } - } -}); - -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosHeaders); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/InterceptorManager.js": -/*!***********************************************************!*\ - !*** ./node_modules/axios/lib/core/InterceptorManager.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -class InterceptorManager { - constructor() { - this.handlers = []; - } - - /** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ - use(fulfilled, rejected, options) { - this.handlers.push({ - fulfilled, - rejected, - synchronous: options ? options.synchronous : false, - runWhen: options ? options.runWhen : null - }); - return this.handlers.length - 1; - } - - /** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - * - * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise - */ - eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } - } - - /** - * Clear all interceptors from the stack - * - * @returns {void} - */ - clear() { - if (this.handlers) { - this.handlers = []; - } - } - - /** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - * - * @returns {void} - */ - forEach(fn) { - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InterceptorManager); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/buildFullPath.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/core/buildFullPath.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ buildFullPath) -/* harmony export */ }); -/* harmony import */ var _helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/isAbsoluteURL.js */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js"); -/* harmony import */ var _helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/combineURLs.js */ "./node_modules/axios/lib/helpers/combineURLs.js"); - - - - - -/** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * - * @returns {string} The combined full path - */ -function buildFullPath(baseURL, requestedURL) { - if (baseURL && !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL)) { - return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL); - } - return requestedURL; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/dispatchRequest.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/core/dispatchRequest.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ dispatchRequest) -/* harmony export */ }); -/* harmony import */ var _transformData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transformData.js */ "./node_modules/axios/lib/core/transformData.js"); -/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js"); -/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js"); - - - - - - - - - -/** - * Throws a `CanceledError` if cancellation has been requested. - * - * @param {Object} config The config that is to be used for the request - * - * @returns {void} - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } - - if (config.signal && config.signal.aborted) { - throw new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](null, config); - } -} - -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * - * @returns {Promise} The Promise to be fulfilled - */ -function dispatchRequest(config) { - throwIfCancellationRequested(config); - - config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(config.headers); - - // Transform request data - config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( - config, - config.transformRequest - ); - - if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { - config.headers.setContentType('application/x-www-form-urlencoded', false); - } - - const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].adapter); - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( - config, - config.transformResponse, - response - ); - - response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(response.headers); - - return response; - }, function onAdapterRejection(reason) { - if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__["default"])(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( - config, - config.transformResponse, - reason.response - ); - reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(reason.response.headers); - } - } - - return Promise.reject(reason); - }); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/mergeConfig.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/core/mergeConfig.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ mergeConfig) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - - - - - -const headersToObject = (thing) => thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? { ...thing } : thing; - -/** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * - * @returns {Object} New object resulting from merging config2 to config1 - */ -function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - const config = {}; - - function getMergedValue(target, source, caseless) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) { - return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call({caseless}, target, source); - } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) { - return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge({}, source); - } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArray(source)) { - return source.slice(); - } - return source; - } - - // eslint-disable-next-line consistent-return - function mergeDeepProperties(a, b, caseless) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { - return getMergedValue(a, b, caseless); - } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) { - return getMergedValue(undefined, a, caseless); - } - } - - // eslint-disable-next-line consistent-return - function valueFromConfig2(a, b) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { - return getMergedValue(undefined, b); - } - } - - // eslint-disable-next-line consistent-return - function defaultToConfig2(a, b) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { - return getMergedValue(undefined, b); - } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) { - return getMergedValue(undefined, a); - } - } - - // eslint-disable-next-line consistent-return - function mergeDirectKeys(a, b, prop) { - if (prop in config2) { - return getMergedValue(a, b); - } else if (prop in config1) { - return getMergedValue(undefined, a); - } - } - - const mergeMap = { - url: valueFromConfig2, - method: valueFromConfig2, - data: valueFromConfig2, - baseURL: defaultToConfig2, - transformRequest: defaultToConfig2, - transformResponse: defaultToConfig2, - paramsSerializer: defaultToConfig2, - timeout: defaultToConfig2, - timeoutMessage: defaultToConfig2, - withCredentials: defaultToConfig2, - withXSRFToken: defaultToConfig2, - adapter: defaultToConfig2, - responseType: defaultToConfig2, - xsrfCookieName: defaultToConfig2, - xsrfHeaderName: defaultToConfig2, - onUploadProgress: defaultToConfig2, - onDownloadProgress: defaultToConfig2, - decompress: defaultToConfig2, - maxContentLength: defaultToConfig2, - maxBodyLength: defaultToConfig2, - beforeRedirect: defaultToConfig2, - transport: defaultToConfig2, - httpAgent: defaultToConfig2, - httpsAgent: defaultToConfig2, - cancelToken: defaultToConfig2, - socketPath: defaultToConfig2, - responseEncoding: defaultToConfig2, - validateStatus: mergeDirectKeys, - headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true) - }; - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { - const merge = mergeMap[prop] || mergeDeepProperties; - const configValue = merge(config1[prop], config2[prop], prop); - (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); - }); - - return config; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/settle.js": -/*!***********************************************!*\ - !*** ./node_modules/axios/lib/core/settle.js ***! - \***********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ settle) -/* harmony export */ }); -/* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - - - - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - * - * @returns {object} The response. - */ -function settle(resolve, reject, response) { - const validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"]( - 'Request failed with status code ' + response.status, - [_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST, _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], - response.config, - response.request, - response - )); - } -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/transformData.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/core/transformData.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ transformData) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - - - - - - -/** - * Transform the data for a request or a response - * - * @param {Array|Function} fns A single function or Array of functions - * @param {?Object} response The response object - * - * @returns {*} The resulting transformed data - */ -function transformData(fns, response) { - const config = this || _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__["default"]; - const context = response || config; - const headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(context.headers); - let data = context.data; - - _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(fns, function transform(fn) { - data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); - }); - - headers.normalize(); - - return data; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/defaults/index.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/defaults/index.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _transitional_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transitional.js */ "./node_modules/axios/lib/defaults/transitional.js"); -/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -/* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/toURLEncodedForm.js */ "./node_modules/axios/lib/helpers/toURLEncodedForm.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js"); - - - - - - - - - - -/** - * It takes a string, tries to parse it, and if it fails, it returns the stringified version - * of the input - * - * @param {any} rawValue - The value to be stringified. - * @param {Function} parser - A function that parses a string into a JavaScript object. - * @param {Function} encoder - A function that takes a value and returns a string. - * - * @returns {string} A stringified version of the rawValue. - */ -function stringifySafely(rawValue, parser, encoder) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(rawValue)) { - try { - (parser || JSON.parse)(rawValue); - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].trim(rawValue); - } catch (e) { - if (e.name !== 'SyntaxError') { - throw e; - } - } - } - - return (encoder || JSON.stringify)(rawValue); -} - -const defaults = { - - transitional: _transitional_js__WEBPACK_IMPORTED_MODULE_1__["default"], - - adapter: ['xhr', 'http', 'fetch'], - - transformRequest: [function transformRequest(data, headers) { - const contentType = headers.getContentType() || ''; - const hasJSONContentType = contentType.indexOf('application/json') > -1; - const isObjectPayload = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(data); - - if (isObjectPayload && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(data)) { - data = new FormData(data); - } - - const isFormData = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(data); - - if (isFormData) { - return hasJSONContentType ? JSON.stringify((0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__["default"])(data)) : data; - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStream(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFile(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data) - ) { - return data; - } - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBufferView(data)) { - return data.buffer; - } - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(data)) { - headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); - return data.toString(); - } - - let isFileList; - - if (isObjectPayload) { - if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { - return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__["default"])(data, this.formSerializer).toString(); - } - - if ((isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { - const _FormData = this.env && this.env.FormData; - - return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__["default"])( - isFileList ? {'files[]': data} : data, - _FormData && new _FormData(), - this.formSerializer - ); - } - } - - if (isObjectPayload || hasJSONContentType ) { - headers.setContentType('application/json', false); - return stringifySafely(data); - } - - return data; - }], - - transformResponse: [function transformResponse(data) { - const transitional = this.transitional || defaults.transitional; - const forcedJSONParsing = transitional && transitional.forcedJSONParsing; - const JSONRequested = this.responseType === 'json'; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isResponse(data) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)) { - return data; - } - - if (data && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { - const silentJSONParsing = transitional && transitional.silentJSONParsing; - const strictJSONParsing = !silentJSONParsing && JSONRequested; - - try { - return JSON.parse(data); - } catch (e) { - if (strictJSONParsing) { - if (e.name === 'SyntaxError') { - throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].ERR_BAD_RESPONSE, this, null, this.response); - } - throw e; - } - } - } - - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - maxBodyLength: -1, - - env: { - FormData: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.FormData, - Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.Blob - }, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - }, - - headers: { - common: { - 'Accept': 'application/json, text/plain, */*', - 'Content-Type': undefined - } - } -}; - -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { - defaults.headers[method] = {}; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); - - -/***/ }), - -/***/ "./node_modules/axios/lib/defaults/transitional.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/defaults/transitional.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - silentJSONParsing: true, - forcedJSONParsing: true, - clarifyTimeoutError: false -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/env/data.js": -/*!********************************************!*\ - !*** ./node_modules/axios/lib/env/data.js ***! - \********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ VERSION: () => (/* binding */ VERSION) -/* harmony export */ }); -const VERSION = "1.7.7"; - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js": -/*!****************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/AxiosURLSearchParams.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); - - - - -/** - * It encodes a string by replacing all characters that are not in the unreserved set with - * their percent-encoded equivalents - * - * @param {string} str - The string to encode. - * - * @returns {string} The encoded string. - */ -function encode(str) { - const charMap = { - '!': '%21', - "'": '%27', - '(': '%28', - ')': '%29', - '~': '%7E', - '%20': '+', - '%00': '\x00' - }; - return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { - return charMap[match]; - }); -} - -/** - * It takes a params object and converts it to a FormData object - * - * @param {Object} params - The parameters to be converted to a FormData object. - * @param {Object} options - The options object passed to the Axios constructor. - * - * @returns {void} - */ -function AxiosURLSearchParams(params, options) { - this._pairs = []; - - params && (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, this, options); -} - -const prototype = AxiosURLSearchParams.prototype; - -prototype.append = function append(name, value) { - this._pairs.push([name, value]); -}; - -prototype.toString = function toString(encoder) { - const _encode = encoder ? function(value) { - return encoder.call(this, value, encode); - } : encode; - - return this._pairs.map(function each(pair) { - return _encode(pair[0]) + '=' + _encode(pair[1]); - }, '').join('&'); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosURLSearchParams); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/HttpStatusCode.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/HttpStatusCode.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -const HttpStatusCode = { - Continue: 100, - SwitchingProtocols: 101, - Processing: 102, - EarlyHints: 103, - Ok: 200, - Created: 201, - Accepted: 202, - NonAuthoritativeInformation: 203, - NoContent: 204, - ResetContent: 205, - PartialContent: 206, - MultiStatus: 207, - AlreadyReported: 208, - ImUsed: 226, - MultipleChoices: 300, - MovedPermanently: 301, - Found: 302, - SeeOther: 303, - NotModified: 304, - UseProxy: 305, - Unused: 306, - TemporaryRedirect: 307, - PermanentRedirect: 308, - BadRequest: 400, - Unauthorized: 401, - PaymentRequired: 402, - Forbidden: 403, - NotFound: 404, - MethodNotAllowed: 405, - NotAcceptable: 406, - ProxyAuthenticationRequired: 407, - RequestTimeout: 408, - Conflict: 409, - Gone: 410, - LengthRequired: 411, - PreconditionFailed: 412, - PayloadTooLarge: 413, - UriTooLong: 414, - UnsupportedMediaType: 415, - RangeNotSatisfiable: 416, - ExpectationFailed: 417, - ImATeapot: 418, - MisdirectedRequest: 421, - UnprocessableEntity: 422, - Locked: 423, - FailedDependency: 424, - TooEarly: 425, - UpgradeRequired: 426, - PreconditionRequired: 428, - TooManyRequests: 429, - RequestHeaderFieldsTooLarge: 431, - UnavailableForLegalReasons: 451, - InternalServerError: 500, - NotImplemented: 501, - BadGateway: 502, - ServiceUnavailable: 503, - GatewayTimeout: 504, - HttpVersionNotSupported: 505, - VariantAlsoNegotiates: 506, - InsufficientStorage: 507, - LoopDetected: 508, - NotExtended: 510, - NetworkAuthenticationRequired: 511, -}; - -Object.entries(HttpStatusCode).forEach(([key, value]) => { - HttpStatusCode[value] = key; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HttpStatusCode); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/bind.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/helpers/bind.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ bind) -/* harmony export */ }); - - -function bind(fn, thisArg) { - return function wrap() { - return fn.apply(thisArg, arguments); - }; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/buildURL.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/buildURL.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ buildURL) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js"); - - - - - -/** - * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their - * URI encoded counterparts - * - * @param {string} val The value to be encoded. - * - * @returns {string} The encoded value. - */ -function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @param {?object} options - * - * @returns {string} The formatted url - */ -function buildURL(url, params, options) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - const _encode = options && options.encode || encode; - - const serializeFn = options && options.serialize; - - let serializedParams; - - if (serializeFn) { - serializedParams = serializeFn(params, options); - } else { - serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(params) ? - params.toString() : - new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"](params, options).toString(_encode); - } - - if (serializedParams) { - const hashmarkIndex = url.indexOf("#"); - - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/combineURLs.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/combineURLs.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ combineURLs) -/* harmony export */ }); - - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * - * @returns {string} The combined URL - */ -function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/composeSignals.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/composeSignals.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -const composeSignals = (signals, timeout) => { - const {length} = (signals = signals ? signals.filter(Boolean) : []); - - if (timeout || length) { - let controller = new AbortController(); - - let aborted; - - const onabort = function (reason) { - if (!aborted) { - aborted = true; - unsubscribe(); - const err = reason instanceof Error ? reason : this.reason; - controller.abort(err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? err : new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_1__["default"](err instanceof Error ? err.message : err)); - } - } - - let timer = timeout && setTimeout(() => { - timer = null; - onabort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](`timeout ${timeout} of ms exceeded`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ETIMEDOUT)) - }, timeout) - - const unsubscribe = () => { - if (signals) { - timer && clearTimeout(timer); - timer = null; - signals.forEach(signal => { - signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort); - }); - signals = null; - } - } - - signals.forEach((signal) => signal.addEventListener('abort', onabort)); - - const {signal} = controller; - - signal.unsubscribe = () => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(unsubscribe); - - return signal; - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (composeSignals); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/cookies.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/helpers/cookies.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ? - - // Standard browser envs support document.cookie - { - write(name, value, expires, path, domain, secure) { - const cookie = [name + '=' + encodeURIComponent(value)]; - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(path) && cookie.push('path=' + path); - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(domain) && cookie.push('domain=' + domain); - - secure === true && cookie.push('secure'); - - document.cookie = cookie.join('; '); - }, - - read(name) { - const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove(name) { - this.write(name, '', Date.now() - 86400000); - } - } - - : - - // Non-standard browser env (web workers, react-native) lack needed support. - { - write() {}, - read() { - return null; - }, - remove() {} - }); - - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/formDataToJSON.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/formDataToJSON.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -/** - * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] - * - * @param {string} name - The name of the property to get. - * - * @returns An array of strings. - */ -function parsePropPath(name) { - // foo[x][y][z] - // foo.x.y.z - // foo-x-y-z - // foo x y z - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map(match => { - return match[0] === '[]' ? '' : match[1] || match[0]; - }); -} - -/** - * Convert an array to an object. - * - * @param {Array} arr - The array to convert to an object. - * - * @returns An object with the same keys and values as the array. - */ -function arrayToObject(arr) { - const obj = {}; - const keys = Object.keys(arr); - let i; - const len = keys.length; - let key; - for (i = 0; i < len; i++) { - key = keys[i]; - obj[key] = arr[key]; - } - return obj; -} - -/** - * It takes a FormData object and returns a JavaScript object - * - * @param {string} formData The FormData object to convert to JSON. - * - * @returns {Object | null} The converted object. - */ -function formDataToJSON(formData) { - function buildPath(path, value, target, index) { - let name = path[index++]; - - if (name === '__proto__') return true; - - const isNumericKey = Number.isFinite(+name); - const isLast = index >= path.length; - name = !name && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target) ? target.length : name; - - if (isLast) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name)) { - target[name] = [target[name], value]; - } else { - target[name] = value; - } - - return !isNumericKey; - } - - if (!target[name] || !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(target[name])) { - target[name] = []; - } - - const result = buildPath(path, value, target[name], index); - - if (result && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target[name])) { - target[name] = arrayToObject(target[name]); - } - - return !isNumericKey; - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(formData) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(formData.entries)) { - const obj = {}; - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEachEntry(formData, (name, value) => { - buildPath(parsePropPath(name), value, obj, 0); - }); - - return obj; - } - - return null; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (formDataToJSON); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ isAbsoluteURL) -/* harmony export */ }); - - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isAxiosError.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isAxiosError.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ isAxiosError) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -/** - * Determines whether the payload is an error thrown by Axios - * - * @param {*} payload The value to test - * - * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false - */ -function isAxiosError(payload) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(payload) && (payload.isAxiosError === true); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js": -/*!***********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); - - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ? - -// Standard browser envs have full support of the APIs needed to test -// whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - const msie = _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent); - const urlParsingNode = document.createElement('a'); - let originURL; - - /** - * Parse a URL to discover its components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - let href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - const parsed = (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })()); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/null.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/helpers/null.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -// eslint-disable-next-line strict -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (null); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/parseHeaders.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -// RawAxiosHeaders whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toObjectSet([ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]); - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} rawHeaders Headers needing to be parsed - * - * @returns {Object} Headers parsed into an object - */ -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rawHeaders => { - const parsed = {}; - let key; - let val; - let i; - - rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { - i = line.indexOf(':'); - key = line.substring(0, i).trim().toLowerCase(); - val = line.substring(i + 1).trim(); - - if (!key || (parsed[key] && ignoreDuplicateOf[key])) { - return; - } - - if (key === 'set-cookie') { - if (parsed[key]) { - parsed[key].push(val); - } else { - parsed[key] = [val]; - } - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - }); - - return parsed; -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/parseProtocol.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/parseProtocol.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ parseProtocol) -/* harmony export */ }); - - -function parseProtocol(url) { - const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); - return match && match[1] || ''; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/progressEventReducer.js": -/*!****************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/progressEventReducer.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ asyncDecorator: () => (/* binding */ asyncDecorator), -/* harmony export */ progressEventDecorator: () => (/* binding */ progressEventDecorator), -/* harmony export */ progressEventReducer: () => (/* binding */ progressEventReducer) -/* harmony export */ }); -/* harmony import */ var _speedometer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./speedometer.js */ "./node_modules/axios/lib/helpers/speedometer.js"); -/* harmony import */ var _throttle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./throttle.js */ "./node_modules/axios/lib/helpers/throttle.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -const progressEventReducer = (listener, isDownloadStream, freq = 3) => { - let bytesNotified = 0; - const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250); - - return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e => { - const loaded = e.loaded; - const total = e.lengthComputable ? e.total : undefined; - const progressBytes = loaded - bytesNotified; - const rate = _speedometer(progressBytes); - const inRange = loaded <= total; - - bytesNotified = loaded; - - const data = { - loaded, - total, - progress: total ? (loaded / total) : undefined, - bytes: progressBytes, - rate: rate ? rate : undefined, - estimated: rate && total && inRange ? (total - loaded) / rate : undefined, - event: e, - lengthComputable: total != null, - [isDownloadStream ? 'download' : 'upload']: true - }; - - listener(data); - }, freq); -} - -const progressEventDecorator = (total, throttled) => { - const lengthComputable = total != null; - - return [(loaded) => throttled[0]({ - lengthComputable, - total, - loaded - }), throttled[1]]; -} - -const asyncDecorator = (fn) => (...args) => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(() => fn(...args)); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/resolveConfig.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/resolveConfig.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./isURLSameOrigin.js */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js"); -/* harmony import */ var _cookies_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cookies.js */ "./node_modules/axios/lib/helpers/cookies.js"); -/* harmony import */ var _core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js"); -/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _buildURL_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js"); - - - - - - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((config) => { - const newConfig = (0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, config); - - let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig; - - newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(headers); - - newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__["default"])(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer); - - // HTTP basic authentication - if (auth) { - headers.set('Authorization', 'Basic ' + - btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')) - ); - } - - let contentType; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_4__["default"].isFormData(data)) { - if (_platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserWebWorkerEnv) { - headers.setContentType(undefined); // Let the browser set it - } else if ((contentType = headers.getContentType()) !== false) { - // fix semicolon duplication issue for ReactNative FormData implementation - const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; - headers.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); - } - } - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - - if (_platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserEnv) { - withXSRFToken && _utils_js__WEBPACK_IMPORTED_MODULE_4__["default"].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); - - if (withXSRFToken || (withXSRFToken !== false && (0,_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_6__["default"])(newConfig.url))) { - // Add xsrf header - const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__WEBPACK_IMPORTED_MODULE_7__["default"].read(xsrfCookieName); - - if (xsrfValue) { - headers.set(xsrfHeaderName, xsrfValue); - } - } - } - - return newConfig; -}); - - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/speedometer.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/speedometer.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/** - * Calculate data maxRate - * @param {Number} [samplesCount= 10] - * @param {Number} [min= 1000] - * @returns {Function} - */ -function speedometer(samplesCount, min) { - samplesCount = samplesCount || 10; - const bytes = new Array(samplesCount); - const timestamps = new Array(samplesCount); - let head = 0; - let tail = 0; - let firstSampleTS; - - min = min !== undefined ? min : 1000; - - return function push(chunkLength) { - const now = Date.now(); - - const startedAt = timestamps[tail]; - - if (!firstSampleTS) { - firstSampleTS = now; - } - - bytes[head] = chunkLength; - timestamps[head] = now; - - let i = tail; - let bytesCount = 0; - - while (i !== head) { - bytesCount += bytes[i++]; - i = i % samplesCount; - } - - head = (head + 1) % samplesCount; - - if (head === tail) { - tail = (tail + 1) % samplesCount; - } - - if (now - firstSampleTS < min) { - return; - } - - const passed = startedAt && now - startedAt; - - return passed ? Math.round(bytesCount * 1000 / passed) : undefined; - }; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (speedometer); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/spread.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/helpers/spread.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ spread) -/* harmony export */ }); - - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * - * @returns {Function} - */ -function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/throttle.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/throttle.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Throttle decorator - * @param {Function} fn - * @param {Number} freq - * @return {Function} - */ -function throttle(fn, freq) { - let timestamp = 0; - let threshold = 1000 / freq; - let lastArgs; - let timer; - - const invoke = (args, now = Date.now()) => { - timestamp = now; - lastArgs = null; - if (timer) { - clearTimeout(timer); - timer = null; - } - fn.apply(null, args); - } - - const throttled = (...args) => { - const now = Date.now(); - const passed = now - timestamp; - if ( passed >= threshold) { - invoke(args, now); - } else { - lastArgs = args; - if (!timer) { - timer = setTimeout(() => { - timer = null; - invoke(lastArgs) - }, threshold - passed); - } - } - } - - const flush = () => lastArgs && invoke(lastArgs); - - return [throttled, flush]; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (throttle); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/toFormData.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/toFormData.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/node/classes/FormData.js */ "./node_modules/axios/lib/helpers/null.js"); - - - - -// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored - - -/** - * Determines if the given thing is a array or js object. - * - * @param {string} thing - The object or array to be visited. - * - * @returns {boolean} - */ -function isVisitable(thing) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(thing) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(thing); -} - -/** - * It removes the brackets from the end of a string - * - * @param {string} key - The key of the parameter. - * - * @returns {string} the key without the brackets. - */ -function removeBrackets(key) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]') ? key.slice(0, -2) : key; -} - -/** - * It takes a path, a key, and a boolean, and returns a string - * - * @param {string} path - The path to the current key. - * @param {string} key - The key of the current object being iterated over. - * @param {string} dots - If true, the key will be rendered with dots instead of brackets. - * - * @returns {string} The path to the current key. - */ -function renderKey(path, key, dots) { - if (!path) return key; - return path.concat(key).map(function each(token, i) { - // eslint-disable-next-line no-param-reassign - token = removeBrackets(token); - return !dots && i ? '[' + token + ']' : token; - }).join(dots ? '.' : ''); -} - -/** - * If the array is an array and none of its elements are visitable, then it's a flat array. - * - * @param {Array} arr - The array to check - * - * @returns {boolean} - */ -function isFlatArray(arr) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(arr) && !arr.some(isVisitable); -} - -const predicates = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"], {}, null, function filter(prop) { - return /^is[A-Z]/.test(prop); -}); - -/** - * Convert a data object to FormData - * - * @param {Object} obj - * @param {?Object} [formData] - * @param {?Object} [options] - * @param {Function} [options.visitor] - * @param {Boolean} [options.metaTokens = true] - * @param {Boolean} [options.dots = false] - * @param {?Boolean} [options.indexes = false] - * - * @returns {Object} - **/ - -/** - * It converts an object into a FormData object - * - * @param {Object} obj - The object to convert to form data. - * @param {string} formData - The FormData object to append to. - * @param {Object} options - * - * @returns - */ -function toFormData(obj, formData, options) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) { - throw new TypeError('target must be an object'); - } - - // eslint-disable-next-line no-param-reassign - formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"] || FormData)(); - - // eslint-disable-next-line no-param-reassign - options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(options, { - metaTokens: true, - dots: false, - indexes: false - }, false, function defined(option, source) { - // eslint-disable-next-line no-eq-null,eqeqeq - return !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(source[option]); - }); - - const metaTokens = options.metaTokens; - // eslint-disable-next-line no-use-before-define - const visitor = options.visitor || defaultVisitor; - const dots = options.dots; - const indexes = options.indexes; - const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; - const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData); - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) { - throw new TypeError('visitor must be a function'); - } - - function convertValue(value) { - if (value === null) return ''; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isDate(value)) { - return value.toISOString(); - } - - if (!useBlob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(value)) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Blob is not supported. Use a Buffer instead.'); - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isTypedArray(value)) { - return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); - } - - return value; - } - - /** - * Default visitor. - * - * @param {*} value - * @param {String|Number} key - * @param {Array} path - * @this {FormData} - * - * @returns {boolean} return true to visit the each prop of the value recursively - */ - function defaultVisitor(value, key, path) { - let arr = value; - - if (value && !path && typeof value === 'object') { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '{}')) { - // eslint-disable-next-line no-param-reassign - key = metaTokens ? key : key.slice(0, -2); - // eslint-disable-next-line no-param-reassign - value = JSON.stringify(value); - } else if ( - (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) && isFlatArray(value)) || - ((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value)) - )) { - // eslint-disable-next-line no-param-reassign - key = removeBrackets(key); - - arr.forEach(function each(el, index) { - !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && formData.append( - // eslint-disable-next-line no-nested-ternary - indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), - convertValue(el) - ); - }); - return false; - } - } - - if (isVisitable(value)) { - return true; - } - - formData.append(renderKey(path, key, dots), convertValue(value)); - - return false; - } - - const stack = []; - - const exposedHelpers = Object.assign(predicates, { - defaultVisitor, - convertValue, - isVisitable - }); - - function build(value, path) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value)) return; - - if (stack.indexOf(value) !== -1) { - throw Error('Circular reference detected in ' + path.join('.')); - } - - stack.push(value); - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(value, function each(el, key) { - const result = !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && visitor.call( - formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(key) ? key.trim() : key, path, exposedHelpers - ); - - if (result === true) { - build(el, path ? path.concat(key) : [key]); - } - }); - - stack.pop(); - } - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) { - throw new TypeError('data must be an object'); - } - - build(obj); - - return formData; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toFormData); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/toURLEncodedForm.js": -/*!************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/toURLEncodedForm.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ toURLEncodedForm) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); - - - - - - -function toURLEncodedForm(data, options) { - return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].classes.URLSearchParams(), Object.assign({ - visitor: function(value, key, path, helpers) { - if (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isBuffer(value)) { - this.append(key, value.toString('base64')); - return false; - } - - return helpers.defaultVisitor.apply(this, arguments); - } - }, options)); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/trackStream.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/trackStream.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ readBytes: () => (/* binding */ readBytes), -/* harmony export */ streamChunk: () => (/* binding */ streamChunk), -/* harmony export */ trackStream: () => (/* binding */ trackStream) -/* harmony export */ }); - -const streamChunk = function* (chunk, chunkSize) { - let len = chunk.byteLength; - - if (!chunkSize || len < chunkSize) { - yield chunk; - return; - } - - let pos = 0; - let end; - - while (pos < len) { - end = pos + chunkSize; - yield chunk.slice(pos, end); - pos = end; - } -} - -const readBytes = async function* (iterable, chunkSize) { - for await (const chunk of readStream(iterable)) { - yield* streamChunk(chunk, chunkSize); - } -} - -const readStream = async function* (stream) { - if (stream[Symbol.asyncIterator]) { - yield* stream; - return; - } - - const reader = stream.getReader(); - try { - for (;;) { - const {done, value} = await reader.read(); - if (done) { - break; - } - yield value; - } - } finally { - await reader.cancel(); - } -} - -const trackStream = (stream, chunkSize, onProgress, onFinish) => { - const iterator = readBytes(stream, chunkSize); - - let bytes = 0; - let done; - let _onFinish = (e) => { - if (!done) { - done = true; - onFinish && onFinish(e); - } - } - - return new ReadableStream({ - async pull(controller) { - try { - const {done, value} = await iterator.next(); - - if (done) { - _onFinish(); - controller.close(); - return; - } - - let len = value.byteLength; - if (onProgress) { - let loadedBytes = bytes += len; - onProgress(loadedBytes); - } - controller.enqueue(new Uint8Array(value)); - } catch (err) { - _onFinish(err); - throw err; - } - }, - cancel(reason) { - _onFinish(reason); - return iterator.return(); - } - }, { - highWaterMark: 2 - }) -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/validator.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/validator.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../env/data.js */ "./node_modules/axios/lib/env/data.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - - - - - -const validators = {}; - -// eslint-disable-next-line func-names -['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { - validators[type] = function validator(thing) { - return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; - }; -}); - -const deprecatedWarnings = {}; - -/** - * Transitional option validator - * - * @param {function|boolean?} validator - set to false if the transitional option has been removed - * @param {string?} version - deprecated version / removed since version - * @param {string?} message - some message with additional info - * - * @returns {function} - */ -validators.transitional = function transitional(validator, version, message) { - function formatMessage(opt, desc) { - return '[Axios v' + _env_data_js__WEBPACK_IMPORTED_MODULE_0__.VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); - } - - // eslint-disable-next-line func-names - return (value, opt, opts) => { - if (validator === false) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]( - formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), - _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_DEPRECATED - ); - } - - if (version && !deprecatedWarnings[opt]) { - deprecatedWarnings[opt] = true; - // eslint-disable-next-line no-console - console.warn( - formatMessage( - opt, - ' has been deprecated since v' + version + ' and will be removed in the near future' - ) - ); - } - - return validator ? validator(value, opt, opts) : true; - }; -}; - -/** - * Assert object's properties type - * - * @param {object} options - * @param {object} schema - * @param {boolean?} allowUnknown - * - * @returns {object} - */ - -function assertOptions(options, schema, allowUnknown) { - if (typeof options !== 'object') { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('options must be an object', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE); - } - const keys = Object.keys(options); - let i = keys.length; - while (i-- > 0) { - const opt = keys[i]; - const validator = schema[opt]; - if (validator) { - const value = options[opt]; - const result = value === undefined || validator(value, opt, options); - if (result !== true) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('option ' + opt + ' must be ' + result, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE); - } - continue; - } - if (allowUnknown !== true) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('Unknown option ' + opt, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION); - } - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - assertOptions, - validators -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/classes/Blob.js": -/*!*****************************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/classes/Blob.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof Blob !== 'undefined' ? Blob : null); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/classes/FormData.js": -/*!*********************************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/classes/FormData.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof FormData !== 'undefined' ? FormData : null); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js": -/*!****************************************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js ***! - \****************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/index.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"); -/* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/FormData.js */ "./node_modules/axios/lib/platform/browser/classes/FormData.js"); -/* harmony import */ var _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./classes/Blob.js */ "./node_modules/axios/lib/platform/browser/classes/Blob.js"); - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - isBrowser: true, - classes: { - URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"], - FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"], - Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"] - }, - protocols: ['http', 'https', 'file', 'blob', 'url', 'data'] -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/common/utils.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/platform/common/utils.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ hasBrowserEnv: () => (/* binding */ hasBrowserEnv), -/* harmony export */ hasStandardBrowserEnv: () => (/* binding */ hasStandardBrowserEnv), -/* harmony export */ hasStandardBrowserWebWorkerEnv: () => (/* binding */ hasStandardBrowserWebWorkerEnv), -/* harmony export */ navigator: () => (/* binding */ _navigator), -/* harmony export */ origin: () => (/* binding */ origin) -/* harmony export */ }); -const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; - -const _navigator = typeof navigator === 'object' && navigator || undefined; - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - * - * @returns {boolean} - */ -const hasStandardBrowserEnv = hasBrowserEnv && - (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); - -/** - * Determine if we're running in a standard browser webWorker environment - * - * Although the `isStandardBrowserEnv` method indicates that - * `allows axios to run in a web worker`, the WebWorker will still be - * filtered out due to its judgment standard - * `typeof window !== 'undefined' && typeof document !== 'undefined'`. - * This leads to a problem when axios post `FormData` in webWorker - */ -const hasStandardBrowserWebWorkerEnv = (() => { - return ( - typeof WorkerGlobalScope !== 'undefined' && - // eslint-disable-next-line no-undef - self instanceof WorkerGlobalScope && - typeof self.importScripts === 'function' - ); -})(); - -const origin = hasBrowserEnv && window.location.href || 'http://localhost'; - - - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/index.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/platform/index.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _node_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node/index.js */ "./node_modules/axios/lib/platform/browser/index.js"); -/* harmony import */ var _common_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/utils.js */ "./node_modules/axios/lib/platform/common/utils.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - ..._common_utils_js__WEBPACK_IMPORTED_MODULE_0__, - ..._node_index_js__WEBPACK_IMPORTED_MODULE_1__["default"] -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/utils.js": -/*!*****************************************!*\ - !*** ./node_modules/axios/lib/utils.js ***! - \*****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js"); - - - - -// utils is a library of generic helper functions non-specific to axios - -const {toString} = Object.prototype; -const {getPrototypeOf} = Object; - -const kindOf = (cache => thing => { - const str = toString.call(thing); - return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); -})(Object.create(null)); - -const kindOfTest = (type) => { - type = type.toLowerCase(); - return (thing) => kindOf(thing) === type -} - -const typeOfTest = type => thing => typeof thing === type; - -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * - * @returns {boolean} True if value is an Array, otherwise false - */ -const {isArray} = Array; - -/** - * Determine if a value is undefined - * - * @param {*} val The value to test - * - * @returns {boolean} True if the value is undefined, otherwise false - */ -const isUndefined = typeOfTest('undefined'); - -/** - * Determine if a value is a Buffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Buffer, otherwise false - */ -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); -} - -/** - * Determine if a value is an ArrayBuffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -const isArrayBuffer = kindOfTest('ArrayBuffer'); - - -/** - * Determine if a value is a view on an ArrayBuffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - let result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); - } - return result; -} - -/** - * Determine if a value is a String - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a String, otherwise false - */ -const isString = typeOfTest('string'); - -/** - * Determine if a value is a Function - * - * @param {*} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -const isFunction = typeOfTest('function'); - -/** - * Determine if a value is a Number - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Number, otherwise false - */ -const isNumber = typeOfTest('number'); - -/** - * Determine if a value is an Object - * - * @param {*} thing The value to test - * - * @returns {boolean} True if value is an Object, otherwise false - */ -const isObject = (thing) => thing !== null && typeof thing === 'object'; - -/** - * Determine if a value is a Boolean - * - * @param {*} thing The value to test - * @returns {boolean} True if value is a Boolean, otherwise false - */ -const isBoolean = thing => thing === true || thing === false; - -/** - * Determine if a value is a plain Object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a plain Object, otherwise false - */ -const isPlainObject = (val) => { - if (kindOf(val) !== 'object') { - return false; - } - - const prototype = getPrototypeOf(val); - return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); -} - -/** - * Determine if a value is a Date - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Date, otherwise false - */ -const isDate = kindOfTest('Date'); - -/** - * Determine if a value is a File - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a File, otherwise false - */ -const isFile = kindOfTest('File'); - -/** - * Determine if a value is a Blob - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Blob, otherwise false - */ -const isBlob = kindOfTest('Blob'); - -/** - * Determine if a value is a FileList - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a File, otherwise false - */ -const isFileList = kindOfTest('FileList'); - -/** - * Determine if a value is a Stream - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Stream, otherwise false - */ -const isStream = (val) => isObject(val) && isFunction(val.pipe); - -/** - * Determine if a value is a FormData - * - * @param {*} thing The value to test - * - * @returns {boolean} True if value is an FormData, otherwise false - */ -const isFormData = (thing) => { - let kind; - return thing && ( - (typeof FormData === 'function' && thing instanceof FormData) || ( - isFunction(thing.append) && ( - (kind = kindOf(thing)) === 'formdata' || - // detect form-data instance - (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') - ) - ) - ) -} - -/** - * Determine if a value is a URLSearchParams object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -const isURLSearchParams = kindOfTest('URLSearchParams'); - -const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest); - -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * - * @returns {String} The String freed of excess whitespace - */ -const trim = (str) => str.trim ? - str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - * - * @param {Boolean} [allOwnKeys = false] - * @returns {any} - */ -function forEach(obj, fn, {allOwnKeys = false} = {}) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - let i; - let l; - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); - const len = keys.length; - let key; - - for (i = 0; i < len; i++) { - key = keys[i]; - fn.call(null, obj[key], key, obj); - } - } -} - -function findKey(obj, key) { - key = key.toLowerCase(); - const keys = Object.keys(obj); - let i = keys.length; - let _key; - while (i-- > 0) { - _key = keys[i]; - if (key === _key.toLowerCase()) { - return _key; - } - } - return null; -} - -const _global = (() => { - /*eslint no-undef:0*/ - if (typeof globalThis !== "undefined") return globalThis; - return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global) -})(); - -const isContextDefined = (context) => !isUndefined(context) && context !== _global; - -/** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - const {caseless} = isContextDefined(this) && this || {}; - const result = {}; - const assignValue = (val, key) => { - const targetKey = caseless && findKey(result, key) || key; - if (isPlainObject(result[targetKey]) && isPlainObject(val)) { - result[targetKey] = merge(result[targetKey], val); - } else if (isPlainObject(val)) { - result[targetKey] = merge({}, val); - } else if (isArray(val)) { - result[targetKey] = val.slice(); - } else { - result[targetKey] = val; - } - } - - for (let i = 0, l = arguments.length; i < l; i++) { - arguments[i] && forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * - * @param {Boolean} [allOwnKeys] - * @returns {Object} The resulting value of object a - */ -const extend = (a, b, thisArg, {allOwnKeys}= {}) => { - forEach(b, (val, key) => { - if (thisArg && isFunction(val)) { - a[key] = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__["default"])(val, thisArg); - } else { - a[key] = val; - } - }, {allOwnKeys}); - return a; -} - -/** - * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - * - * @param {string} content with BOM - * - * @returns {string} content value without BOM - */ -const stripBOM = (content) => { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -} - -/** - * Inherit the prototype methods from one constructor into another - * @param {function} constructor - * @param {function} superConstructor - * @param {object} [props] - * @param {object} [descriptors] - * - * @returns {void} - */ -const inherits = (constructor, superConstructor, props, descriptors) => { - constructor.prototype = Object.create(superConstructor.prototype, descriptors); - constructor.prototype.constructor = constructor; - Object.defineProperty(constructor, 'super', { - value: superConstructor.prototype - }); - props && Object.assign(constructor.prototype, props); -} - -/** - * Resolve object with deep prototype chain to a flat object - * @param {Object} sourceObj source object - * @param {Object} [destObj] - * @param {Function|Boolean} [filter] - * @param {Function} [propFilter] - * - * @returns {Object} - */ -const toFlatObject = (sourceObj, destObj, filter, propFilter) => { - let props; - let i; - let prop; - const merged = {}; - - destObj = destObj || {}; - // eslint-disable-next-line no-eq-null,eqeqeq - if (sourceObj == null) return destObj; - - do { - props = Object.getOwnPropertyNames(sourceObj); - i = props.length; - while (i-- > 0) { - prop = props[i]; - if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { - destObj[prop] = sourceObj[prop]; - merged[prop] = true; - } - } - sourceObj = filter !== false && getPrototypeOf(sourceObj); - } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); - - return destObj; -} - -/** - * Determines whether a string ends with the characters of a specified string - * - * @param {String} str - * @param {String} searchString - * @param {Number} [position= 0] - * - * @returns {boolean} - */ -const endsWith = (str, searchString, position) => { - str = String(str); - if (position === undefined || position > str.length) { - position = str.length; - } - position -= searchString.length; - const lastIndex = str.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; -} - - -/** - * Returns new array from array like object or null if failed - * - * @param {*} [thing] - * - * @returns {?Array} - */ -const toArray = (thing) => { - if (!thing) return null; - if (isArray(thing)) return thing; - let i = thing.length; - if (!isNumber(i)) return null; - const arr = new Array(i); - while (i-- > 0) { - arr[i] = thing[i]; - } - return arr; -} - -/** - * Checking if the Uint8Array exists and if it does, it returns a function that checks if the - * thing passed in is an instance of Uint8Array - * - * @param {TypedArray} - * - * @returns {Array} - */ -// eslint-disable-next-line func-names -const isTypedArray = (TypedArray => { - // eslint-disable-next-line func-names - return thing => { - return TypedArray && thing instanceof TypedArray; - }; -})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); - -/** - * For each entry in the object, call the function with the key and value. - * - * @param {Object} obj - The object to iterate over. - * @param {Function} fn - The function to call for each entry. - * - * @returns {void} - */ -const forEachEntry = (obj, fn) => { - const generator = obj && obj[Symbol.iterator]; - - const iterator = generator.call(obj); - - let result; - - while ((result = iterator.next()) && !result.done) { - const pair = result.value; - fn.call(obj, pair[0], pair[1]); - } -} - -/** - * It takes a regular expression and a string, and returns an array of all the matches - * - * @param {string} regExp - The regular expression to match against. - * @param {string} str - The string to search. - * - * @returns {Array} - */ -const matchAll = (regExp, str) => { - let matches; - const arr = []; - - while ((matches = regExp.exec(str)) !== null) { - arr.push(matches); - } - - return arr; -} - -/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ -const isHTMLForm = kindOfTest('HTMLFormElement'); - -const toCamelCase = str => { - return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, - function replacer(m, p1, p2) { - return p1.toUpperCase() + p2; - } - ); -}; - -/* Creating a function that will check if an object has a property. */ -const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); - -/** - * Determine if a value is a RegExp object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a RegExp object, otherwise false - */ -const isRegExp = kindOfTest('RegExp'); - -const reduceDescriptors = (obj, reducer) => { - const descriptors = Object.getOwnPropertyDescriptors(obj); - const reducedDescriptors = {}; - - forEach(descriptors, (descriptor, name) => { - let ret; - if ((ret = reducer(descriptor, name, obj)) !== false) { - reducedDescriptors[name] = ret || descriptor; - } - }); - - Object.defineProperties(obj, reducedDescriptors); -} - -/** - * Makes all methods read-only - * @param {Object} obj - */ - -const freezeMethods = (obj) => { - reduceDescriptors(obj, (descriptor, name) => { - // skip restricted props in strict mode - if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { - return false; - } - - const value = obj[name]; - - if (!isFunction(value)) return; - - descriptor.enumerable = false; - - if ('writable' in descriptor) { - descriptor.writable = false; - return; - } - - if (!descriptor.set) { - descriptor.set = () => { - throw Error('Can not rewrite read-only method \'' + name + '\''); - }; - } - }); -} - -const toObjectSet = (arrayOrString, delimiter) => { - const obj = {}; - - const define = (arr) => { - arr.forEach(value => { - obj[value] = true; - }); - } - - isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); - - return obj; -} - -const noop = () => {} - -const toFiniteNumber = (value, defaultValue) => { - return value != null && Number.isFinite(value = +value) ? value : defaultValue; -} - -const ALPHA = 'abcdefghijklmnopqrstuvwxyz' - -const DIGIT = '0123456789'; - -const ALPHABET = { - DIGIT, - ALPHA, - ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT -} - -const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str = ''; - const {length} = alphabet; - while (size--) { - str += alphabet[Math.random() * length|0] - } - - return str; -} - -/** - * If the thing is a FormData object, return true, otherwise return false. - * - * @param {unknown} thing - The thing to check. - * - * @returns {boolean} - */ -function isSpecCompliantForm(thing) { - return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]); -} - -const toJSONObject = (obj) => { - const stack = new Array(10); - - const visit = (source, i) => { - - if (isObject(source)) { - if (stack.indexOf(source) >= 0) { - return; - } - - if(!('toJSON' in source)) { - stack[i] = source; - const target = isArray(source) ? [] : {}; - - forEach(source, (value, key) => { - const reducedValue = visit(value, i + 1); - !isUndefined(reducedValue) && (target[key] = reducedValue); - }); - - stack[i] = undefined; - - return target; - } - } - - return source; - } - - return visit(obj, 0); -} - -const isAsyncFn = kindOfTest('AsyncFunction'); - -const isThenable = (thing) => - thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); - -// original code -// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 - -const _setImmediate = ((setImmediateSupported, postMessageSupported) => { - if (setImmediateSupported) { - return setImmediate; - } - - return postMessageSupported ? ((token, callbacks) => { - _global.addEventListener("message", ({source, data}) => { - if (source === _global && data === token) { - callbacks.length && callbacks.shift()(); - } - }, false); - - return (cb) => { - callbacks.push(cb); - _global.postMessage(token, "*"); - } - })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); -})( - typeof setImmediate === 'function', - isFunction(_global.postMessage) -); - -const asap = typeof queueMicrotask !== 'undefined' ? - queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate); - -// ********************* - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - isArray, - isArrayBuffer, - isBuffer, - isFormData, - isArrayBufferView, - isString, - isNumber, - isBoolean, - isObject, - isPlainObject, - isReadableStream, - isRequest, - isResponse, - isHeaders, - isUndefined, - isDate, - isFile, - isBlob, - isRegExp, - isFunction, - isStream, - isURLSearchParams, - isTypedArray, - isFileList, - forEach, - merge, - extend, - trim, - stripBOM, - inherits, - toFlatObject, - kindOf, - kindOfTest, - endsWith, - toArray, - forEachEntry, - matchAll, - isHTMLForm, - hasOwnProperty, - hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection - reduceDescriptors, - freezeMethods, - toObjectSet, - toCamelCase, - noop, - toFiniteNumber, - findKey, - global: _global, - isContextDefined, - ALPHABET, - generateString, - isSpecCompliantForm, - toJSONObject, - isAsyncFn, - isThenable, - setImmediate: _setImmediate, - asap -}); - - -/***/ }), - -/***/ "./node_modules/react-intersection-observer/dist/index.mjs": -/*!*****************************************************************!*\ - !*** ./node_modules/react-intersection-observer/dist/index.mjs ***! - \*****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ InView: () => (/* binding */ InView), -/* harmony export */ defaultFallbackInView: () => (/* binding */ defaultFallbackInView), -/* harmony export */ observe: () => (/* binding */ observe), -/* harmony export */ useInView: () => (/* binding */ useInView) -/* harmony export */ }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); -"use client"; -var __defProp = Object.defineProperty; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); - -// src/InView.tsx - - -// src/observe.ts -var observerMap = /* @__PURE__ */ new Map(); -var RootIds = /* @__PURE__ */ new WeakMap(); -var rootId = 0; -var unsupportedValue = void 0; -function defaultFallbackInView(inView) { - unsupportedValue = inView; -} -function getRootId(root) { - if (!root) return "0"; - if (RootIds.has(root)) return RootIds.get(root); - rootId += 1; - RootIds.set(root, rootId.toString()); - return RootIds.get(root); -} -function optionsToId(options) { - return Object.keys(options).sort().filter( - (key) => options[key] !== void 0 - ).map((key) => { - return `${key}_${key === "root" ? getRootId(options.root) : options[key]}`; - }).toString(); -} -function createObserver(options) { - const id = optionsToId(options); - let instance = observerMap.get(id); - if (!instance) { - const elements = /* @__PURE__ */ new Map(); - let thresholds; - const observer = new IntersectionObserver((entries) => { - entries.forEach((entry) => { - var _a; - const inView = entry.isIntersecting && thresholds.some((threshold) => entry.intersectionRatio >= threshold); - if (options.trackVisibility && typeof entry.isVisible === "undefined") { - entry.isVisible = inView; - } - (_a = elements.get(entry.target)) == null ? void 0 : _a.forEach((callback) => { - callback(inView, entry); - }); - }); - }, options); - thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]); - instance = { - id, - observer, - elements - }; - observerMap.set(id, instance); - } - return instance; -} -function observe(element, callback, options = {}, fallbackInView = unsupportedValue) { - if (typeof window.IntersectionObserver === "undefined" && fallbackInView !== void 0) { - const bounds = element.getBoundingClientRect(); - callback(fallbackInView, { - isIntersecting: fallbackInView, - target: element, - intersectionRatio: typeof options.threshold === "number" ? options.threshold : 0, - time: 0, - boundingClientRect: bounds, - intersectionRect: bounds, - rootBounds: bounds - }); - return () => { - }; - } - const { id, observer, elements } = createObserver(options); - const callbacks = elements.get(element) || []; - if (!elements.has(element)) { - elements.set(element, callbacks); - } - callbacks.push(callback); - observer.observe(element); - return function unobserve() { - callbacks.splice(callbacks.indexOf(callback), 1); - if (callbacks.length === 0) { - elements.delete(element); - observer.unobserve(element); - } - if (elements.size === 0) { - observer.disconnect(); - observerMap.delete(id); - } - }; -} - -// src/InView.tsx -function isPlainChildren(props) { - return typeof props.children !== "function"; -} -var InView = class extends react__WEBPACK_IMPORTED_MODULE_0__.Component { - constructor(props) { - super(props); - __publicField(this, "node", null); - __publicField(this, "_unobserveCb", null); - __publicField(this, "handleNode", (node) => { - if (this.node) { - this.unobserve(); - if (!node && !this.props.triggerOnce && !this.props.skip) { - this.setState({ inView: !!this.props.initialInView, entry: void 0 }); - } - } - this.node = node ? node : null; - this.observeNode(); - }); - __publicField(this, "handleChange", (inView, entry) => { - if (inView && this.props.triggerOnce) { - this.unobserve(); - } - if (!isPlainChildren(this.props)) { - this.setState({ inView, entry }); - } - if (this.props.onChange) { - this.props.onChange(inView, entry); - } - }); - this.state = { - inView: !!props.initialInView, - entry: void 0 - }; - } - componentDidMount() { - this.unobserve(); - this.observeNode(); - } - componentDidUpdate(prevProps) { - if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) { - this.unobserve(); - this.observeNode(); - } - } - componentWillUnmount() { - this.unobserve(); - } - observeNode() { - if (!this.node || this.props.skip) return; - const { - threshold, - root, - rootMargin, - trackVisibility, - delay, - fallbackInView - } = this.props; - this._unobserveCb = observe( - this.node, - this.handleChange, - { - threshold, - root, - rootMargin, - // @ts-ignore - trackVisibility, - // @ts-ignore - delay - }, - fallbackInView - ); - } - unobserve() { - if (this._unobserveCb) { - this._unobserveCb(); - this._unobserveCb = null; - } - } - render() { - const { children } = this.props; - if (typeof children === "function") { - const { inView, entry } = this.state; - return children({ inView, entry, ref: this.handleNode }); - } - const { - as, - triggerOnce, - threshold, - root, - rootMargin, - onChange, - skip, - trackVisibility, - delay, - initialInView, - fallbackInView, - ...props - } = this.props; - return react__WEBPACK_IMPORTED_MODULE_0__.createElement( - as || "div", - { ref: this.handleNode, ...props }, - children - ); - } -}; - -// src/useInView.tsx - -function useInView({ - threshold, - delay, - trackVisibility, - rootMargin, - root, - triggerOnce, - skip, - initialInView, - fallbackInView, - onChange -} = {}) { - var _a; - const [ref, setRef] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); - const callback = react__WEBPACK_IMPORTED_MODULE_0__.useRef(); - const [state, setState] = react__WEBPACK_IMPORTED_MODULE_0__.useState({ - inView: !!initialInView, - entry: void 0 - }); - callback.current = onChange; - react__WEBPACK_IMPORTED_MODULE_0__.useEffect( - () => { - if (skip || !ref) return; - let unobserve; - unobserve = observe( - ref, - (inView, entry) => { - setState({ - inView, - entry - }); - if (callback.current) callback.current(inView, entry); - if (entry.isIntersecting && triggerOnce && unobserve) { - unobserve(); - unobserve = void 0; - } - }, - { - root, - rootMargin, - threshold, - // @ts-ignore - trackVisibility, - // @ts-ignore - delay - }, - fallbackInView - ); - return () => { - if (unobserve) { - unobserve(); - } - }; - }, - // We break the rule here, because we aren't including the actual `threshold` variable - // eslint-disable-next-line react-hooks/exhaustive-deps - [ - // If the threshold is an array, convert it to a string, so it won't change between renders. - Array.isArray(threshold) ? threshold.toString() : threshold, - ref, - root, - rootMargin, - triggerOnce, - skip, - trackVisibility, - fallbackInView, - delay - ] - ); - const entryTarget = (_a = state.entry) == null ? void 0 : _a.target; - const previousEntryTarget = react__WEBPACK_IMPORTED_MODULE_0__.useRef(); - if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) { - previousEntryTarget.current = entryTarget; - setState({ - inView: !!initialInView, - entry: void 0 - }); - } - const result = [setRef, state.inView, state.entry]; - result.ref = result[0]; - result.inView = result[1]; - result.entry = result[2]; - return result; -} - -//# sourceMappingURL=index.mjs.map - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = __webpack_modules__; -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/chunk loaded */ -/******/ (() => { -/******/ var deferred = []; -/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { -/******/ if(chunkIds) { -/******/ priority = priority || 0; -/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; -/******/ deferred[i] = [chunkIds, fn, priority]; -/******/ return; -/******/ } -/******/ var notFulfilled = Infinity; -/******/ for (var i = 0; i < deferred.length; i++) { -/******/ var chunkIds = deferred[i][0]; -/******/ var fn = deferred[i][1]; -/******/ var priority = deferred[i][2]; -/******/ var fulfilled = true; -/******/ for (var j = 0; j < chunkIds.length; j++) { -/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { -/******/ chunkIds.splice(j--, 1); -/******/ } else { -/******/ fulfilled = false; -/******/ if(priority < notFulfilled) notFulfilled = priority; -/******/ } -/******/ } -/******/ if(fulfilled) { -/******/ deferred.splice(i--, 1) -/******/ var r = fn(); -/******/ if (r !== undefined) result = r; -/******/ } -/******/ } -/******/ return result; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/compat get default export */ -/******/ (() => { -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = (module) => { -/******/ var getter = module && module.__esModule ? -/******/ () => (module['default']) : -/******/ () => (module); -/******/ __webpack_require__.d(getter, { a: getter }); -/******/ return getter; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/global */ -/******/ (() => { -/******/ __webpack_require__.g = (function() { -/******/ if (typeof globalThis === 'object') return globalThis; -/******/ try { -/******/ return this || new Function('return this')(); -/******/ } catch (e) { -/******/ if (typeof window === 'object') return window; -/******/ } -/******/ })(); -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/publicPath */ -/******/ (() => { -/******/ var scriptUrl; -/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; -/******/ var document = __webpack_require__.g.document; -/******/ if (!scriptUrl && document) { -/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') -/******/ scriptUrl = document.currentScript.src; -/******/ if (!scriptUrl) { -/******/ var scripts = document.getElementsByTagName("script"); -/******/ if(scripts.length) { -/******/ var i = scripts.length - 1; -/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; -/******/ } -/******/ } -/******/ } -/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration -/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. -/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); -/******/ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); -/******/ __webpack_require__.p = scriptUrl; -/******/ })(); -/******/ -/******/ /* webpack/runtime/jsonp chunk loading */ -/******/ (() => { -/******/ // no baseURI -/******/ -/******/ // object to store loaded and loading chunks -/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched -/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded -/******/ var installedChunks = { -/******/ "instant-images": 0, -/******/ "./style-instant-images": 0 -/******/ }; -/******/ -/******/ // no chunk on demand loading -/******/ -/******/ // no prefetching -/******/ -/******/ // no preloaded -/******/ -/******/ // no HMR -/******/ -/******/ // no HMR manifest -/******/ -/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); -/******/ -/******/ // install a JSONP callback for chunk loading -/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { -/******/ var chunkIds = data[0]; -/******/ var moreModules = data[1]; -/******/ var runtime = data[2]; -/******/ // add "moreModules" to the modules object, -/******/ // then flag all "chunkIds" as loaded and fire callback -/******/ var moduleId, chunkId, i = 0; -/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { -/******/ for(moduleId in moreModules) { -/******/ if(__webpack_require__.o(moreModules, moduleId)) { -/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; -/******/ } -/******/ } -/******/ if(runtime) var result = runtime(__webpack_require__); -/******/ } -/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); -/******/ for(;i < chunkIds.length; i++) { -/******/ chunkId = chunkIds[i]; -/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { -/******/ installedChunks[chunkId][0](); -/******/ } -/******/ installedChunks[chunkId] = 0; -/******/ } -/******/ return __webpack_require__.O(result); -/******/ } -/******/ -/******/ var chunkLoadingGlobal = self["webpackChunkinstant_images"] = self["webpackChunkinstant_images"] || []; -/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); -/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); -/******/ })(); -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module depends on other loaded chunks and execution need to be delayed -/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["./style-instant-images"], () => (__webpack_require__("./src/js/index.js"))) -/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); -/******/ -/******/ })() -; -//# sourceMappingURL=instant-images.js.map \ No newline at end of file +(()=>{var e,t={8670:(e,t,n)=>{"use strict";var r={};n.r(r),n.d(r,{hasBrowserEnv:()=>pe,hasStandardBrowserEnv:()=>ve,hasStandardBrowserWebWorkerEnv:()=>ge,navigator:()=>me,origin:()=>ye});const i=window.wp.element;function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:a}=Object.prototype,{getPrototypeOf:s}=Object,c=(l=Object.create(null),e=>{const t=a.call(e);return l[t]||(l[t]=t.slice(8,-1).toLowerCase())});var l;const u=e=>(e=e.toLowerCase(),t=>c(t)===e),f=e=>t=>typeof t===e,{isArray:h}=Array,d=f("undefined"),p=u("ArrayBuffer"),m=f("string"),v=f("function"),g=f("number"),y=e=>null!==e&&"object"==typeof e,b=e=>{if("object"!==c(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},_=u("Date"),w=u("File"),E=u("Blob"),R=u("FileList"),S=u("URLSearchParams"),[x,k,O,C]=["ReadableStream","Request","Response","Headers"].map(u);function A(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),h(e))for(r=0,i=e.length;r0;)if(r=n[i],t===r.toLowerCase())return r;return null}const L="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,N=e=>!d(e)&&e!==L,j=(T="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>T&&e instanceof T);var T;const P=u("HTMLFormElement"),z=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),I=u("RegExp"),M=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};A(n,((n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)})),Object.defineProperties(e,r)},D="abcdefghijklmnopqrstuvwxyz",F="0123456789",H={DIGIT:F,ALPHA:D,ALPHA_DIGIT:D+D.toUpperCase()+F},W=u("AsyncFunction"),U=(q="function"==typeof setImmediate,V=v(L.postMessage),q?setImmediate:V?(G=`axios@${Math.random()}`,Y=[],L.addEventListener("message",(({source:e,data:t})=>{e===L&&t===G&&Y.length&&Y.shift()()}),!1),e=>{Y.push(e),L.postMessage(G,"*")}):e=>setTimeout(e));var q,V,G,Y;const J="undefined"!=typeof queueMicrotask?queueMicrotask.bind(L):"undefined"!=typeof process&&process.nextTick||U,K={isArray:h,isArrayBuffer:p,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&v(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||v(e.append)&&("formdata"===(t=c(e))||"object"===t&&v(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&p(e.buffer),t},isString:m,isNumber:g,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:b,isReadableStream:x,isRequest:k,isResponse:O,isHeaders:C,isUndefined:d,isDate:_,isFile:w,isBlob:E,isRegExp:I,isFunction:v,isStream:e=>y(e)&&v(e.pipe),isURLSearchParams:S,isTypedArray:j,isFileList:R,forEach:A,merge:function e(){const{caseless:t}=N(this)&&this||{},n={},r=(r,i)=>{const o=t&&B(n,i)||i;b(n[o])&&b(r)?n[o]=e(n[o],r):b(r)?n[o]=e({},r):h(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e(A(t,((t,r)=>{n&&v(t)?e[r]=o(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,o,a;const c={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:u,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(h(e))return e;let t=e.length;if(!g(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:P,hasOwnProperty:z,hasOwnProp:z,reduceDescriptors:M,freezeMethods:e=>{M(e,((t,n)=>{if(v(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];v(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return h(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:B,global:L,isContextDefined:N,ALPHABET:H,generateString:(e=16,t=H.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&v(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=h(e)?[]:{};return A(e,((e,t)=>{const o=n(e,r+1);!d(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:W,isThenable:e=>e&&(y(e)||v(e))&&v(e.then)&&v(e.catch),setImmediate:U,asap:J};function $(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}K.inherits($,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});const X=$.prototype,Z={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Z[e]={value:e}})),Object.defineProperties($,Z),Object.defineProperty(X,"isAxiosError",{value:!0}),$.from=(e,t,n,r,i,o)=>{const a=Object.create(X);return K.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),$.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const Q=$;function ee(e){return K.isPlainObject(e)||K.isArray(e)}function te(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function ne(e,t,n){return e?e.concat(t).map((function(e,t){return e=te(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const re=K.toFlatObject(K,{},null,(function(e){return/^is[A-Z]/.test(e)})),ie=function(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!K.isUndefined(t[e])}))).metaTokens,i=n.visitor||l,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(K.isDate(e))return e.toISOString();if(!s&&K.isBlob(e))throw new Q("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(e)||K.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let s=e;if(e&&!i&&"object"==typeof e)if(K.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(K.isArray(e)&&function(e){return K.isArray(e)&&!e.some(ee)}(e)||(K.isFileList(e)||K.endsWith(n,"[]"))&&(s=K.toArray(e)))return n=te(n),s.forEach((function(e,r){!K.isUndefined(e)&&null!==e&&t.append(!0===a?ne([n],r,o):null===a?n:n+"[]",c(e))})),!1;return!!ee(e)||(t.append(ne(i,n,o),c(e)),!1)}const u=[],f=Object.assign(re,{defaultVisitor:l,convertValue:c,isVisitable:ee});if(!K.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!K.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),K.forEach(n,(function(n,o){!0===(!(K.isUndefined(n)||null===n)&&i.call(t,n,K.isString(o)?o.trim():o,r,f))&&e(n,r?r.concat(o):[o])})),u.pop()}}(e),t};function oe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ae(e,t){this._pairs=[],e&&ie(e,this,t)}const se=ae.prototype;se.append=function(e,t){this._pairs.push([e,t])},se.toString=function(e){const t=e?function(t){return e.call(this,t,oe)}:oe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ce=ae;function le(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ue(e,t,n){if(!t)return e;const r=n&&n.encode||le,i=n&&n.serialize;let o;if(o=i?i(t,n):K.isURLSearchParams(t)?t.toString():new ce(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const fe=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){K.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},he={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},de={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ce,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},pe="undefined"!=typeof window&&"undefined"!=typeof document,me="object"==typeof navigator&&navigator||void 0,ve=pe&&(!me||["ReactNative","NativeScript","NS"].indexOf(me.product)<0),ge="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ye=pe&&window.location.href||"http://localhost",be={...r,...de},_e=function(e){function t(e,n,r,i){let o=e[i++];if("__proto__"===o)return!0;const a=Number.isFinite(+o),s=i>=e.length;return o=!o&&K.isArray(r)?r.length:o,s?(K.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):(r[o]&&K.isObject(r[o])||(r[o]=[]),t(e,n,r[o],i)&&K.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r{t(function(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},we={transitional:he,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=K.isObject(e);if(i&&K.isHTMLForm(e)&&(e=new FormData(e)),K.isFormData(e))return r?JSON.stringify(_e(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e)||K.isReadableStream(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ie(e,new be.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return be.isNode&&K.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=K.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ie(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e){if(K.isString(e))try{return(0,JSON.parse)(e),K.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||we.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(K.isResponse(e)||K.isReadableStream(e))return e;if(e&&K.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Q.from(e,Q.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:be.classes.FormData,Blob:be.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],(e=>{we.headers[e]={}}));const Ee=we,Re=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Se=Symbol("internals");function xe(e){return e&&String(e).trim().toLowerCase()}function ke(e){return!1===e||null==e?e:K.isArray(e)?e.map(ke):String(e)}function Oe(e,t,n,r,i){return K.isFunction(r)?r.call(this,t,n):(i&&(t=n),K.isString(t)?K.isString(r)?-1!==t.indexOf(r):K.isRegExp(r)?r.test(t):void 0:void 0)}class Ce{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=xe(t);if(!i)throw new Error("header name must be a non-empty string");const o=K.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=ke(e))}const o=(e,t)=>K.forEach(e,((e,n)=>i(e,n,t)));if(K.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(K.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&Re[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(K.isHeaders(e))for(const[t,r]of e.entries())i(r,t,n);else null!=e&&i(t,e,n);return this}get(e,t){if(e=xe(e)){const n=K.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(K.isFunction(t))return t.call(this,e,n);if(K.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=xe(e)){const n=K.findKey(this,e);return!(!n||void 0===this[n]||t&&!Oe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=xe(e)){const i=K.findKey(n,e);!i||t&&!Oe(0,n[i],i,t)||(delete n[i],r=!0)}}return K.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!Oe(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return K.forEach(this,((r,i)=>{const o=K.findKey(n,i);if(o)return t[o]=ke(r),void delete t[i];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();a!==i&&delete t[i],t[a]=ke(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return K.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&K.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Se]=this[Se]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=xe(e);t[r]||(function(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return K.isArray(e)?e.forEach(r):r(e),this}}Ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(Ce.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),K.freezeMethods(Ce);const Ae=Ce;function Be(e,t){const n=this||Ee,r=t||n,i=Ae.from(r.headers);let o=r.data;return K.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function Le(e){return!(!e||!e.__CANCEL__)}function Ne(e,t,n){Q.call(this,null==e?"canceled":e,Q.ERR_CANCELED,t,n),this.name="CanceledError"}K.inherits(Ne,Q,{__CANCEL__:!0});const je=Ne;function Te(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Q("Request failed with status code "+n.status,[Q.ERR_BAD_REQUEST,Q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Pe=(e,t,n=3)=>{let r=0;const i=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),l=r[a];i||(i=c),n[o]=s,r[o]=c;let u=a,f=0;for(;u!==o;)f+=n[u++],u%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-i{i=o,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-i;s>=o?a(e,t):(n=e,r||(r=setTimeout((()=>{r=null,a(n)}),o-s)))},()=>n&&a(n)]}((n=>{const o=n.loaded,a=n.lengthComputable?n.total:void 0,s=o-r,c=i(s);r=o,e({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&o<=a?(a-o)/c:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},ze=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ie=e=>(...t)=>K.asap((()=>e(...t))),Me=be.hasStandardBrowserEnv?function(){const e=be.navigator&&/(msie|trident)/i.test(be.navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=K.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},De=be.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];K.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),K.isString(r)&&a.push("path="+r),K.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Fe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const He=e=>e instanceof Ae?{...e}:e;function We(e,t){t=t||{};const n={};function r(e,t,n){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:n},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function i(e,t,n){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!K.isUndefined(t))return r(void 0,t)}function a(e,t){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>i(He(e),He(t),!0)};return K.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=c[r]||i,a=o(e[r],t[r],r);K.isUndefined(a)&&o!==s||(n[r]=a)})),n}const Ue=e=>{const t=We({},e);let n,{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:c}=t;if(t.headers=s=Ae.from(s),t.url=ue(Fe(t.baseURL,t.url),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),K.isFormData(r))if(be.hasStandardBrowserEnv||be.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(be.hasStandardBrowserEnv&&(i&&K.isFunction(i)&&(i=i(t)),i||!1!==i&&Me(t.url))){const e=o&&a&&De.read(a);e&&s.set(o,e)}return t},qe="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Ue(e);let i=r.data;const o=Ae.from(r.headers).normalize();let a,s,c,l,u,{responseType:f,onUploadProgress:h,onDownloadProgress:d}=r;function p(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function v(){if(!m)return;const r=Ae.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Te((function(e){t(e),p()}),(function(e){n(e),p()}),{data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=v:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(v)},m.onabort=function(){m&&(n(new Q("Request aborted",Q.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new Q("Network Error",Q.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||he;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Q(t,i.clarifyTimeoutError?Q.ETIMEDOUT:Q.ECONNABORTED,e,m)),m=null},void 0===i&&o.setContentType(null),"setRequestHeader"in m&&K.forEach(o.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),K.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),f&&"json"!==f&&(m.responseType=r.responseType),d&&([c,u]=Pe(d,!0),m.addEventListener("progress",c)),h&&m.upload&&([s,l]=Pe(h),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new je(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);g&&-1===be.protocols.indexOf(g)?n(new Q("Unsupported protocol "+g+":",Q.ERR_BAD_REQUEST,e)):m.send(i||null)}))},Ve=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Q?t:new je(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,i(new Q(`timeout ${t} of ms exceeded`,Q.ETIMEDOUT))}),t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)})),e=null)};e.forEach((e=>e.addEventListener("abort",i)));const{signal:s}=r;return s.unsubscribe=()=>K.asap(a),s}},Ge=function*(e,t){let n=e.byteLength;if(!t||n{const i=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*Ge(n,t)}(e,t);let o,a=0,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return s(),void e.close();let o=r.byteLength;if(n){let e=a+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),i.return())},{highWaterMark:2})},Je="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ke=Je&&"function"==typeof ReadableStream,$e=Je&&("function"==typeof TextEncoder?(Xe=new TextEncoder,e=>Xe.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Xe;const Ze=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Qe=Ke&&Ze((()=>{let e=!1;const t=new Request(be.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),et=Ke&&Ze((()=>K.isReadableStream(new Response("").body))),tt={stream:et&&(e=>e.body)};var nt;Je&&(nt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!tt[e]&&(tt[e]=K.isFunction(nt[e])?t=>t[e]():(t,n)=>{throw new Q(`Response type '${e}' is not supported`,Q.ERR_NOT_SUPPORT,n)})})));const rt={http:null,xhr:qe,fetch:Je&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:l,headers:u,withCredentials:f="same-origin",fetchOptions:h}=Ue(e);l=l?(l+"").toLowerCase():"text";let d,p=Ve([i,o&&o.toAbortSignal()],a);const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let v;try{if(c&&Qe&&"get"!==n&&"head"!==n&&0!==(v=await(async(e,t)=>{const n=K.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(K.isBlob(e))return e.size;if(K.isSpecCompliantForm(e)){const t=new Request(be.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return K.isArrayBufferView(e)||K.isArrayBuffer(e)?e.byteLength:(K.isURLSearchParams(e)&&(e+=""),K.isString(e)?(await $e(e)).byteLength:void 0)})(t):n})(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(K.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=ze(v,Pe(Ie(c)));r=Ye(n.body,65536,e,t)}}K.isString(f)||(f=f?"include":"omit");const i="credentials"in Request.prototype;d=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:i?f:void 0});let o=await fetch(d);const a=et&&("stream"===l||"response"===l);if(et&&(s||a&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=K.toFiniteNumber(o.headers.get("content-length")),[n,r]=s&&ze(t,Pe(Ie(s),!0))||[];o=new Response(Ye(o.body,65536,n,(()=>{r&&r(),m&&m()})),e)}l=l||"text";let g=await tt[K.findKey(tt,l)||"text"](o,e);return!a&&m&&m(),await new Promise(((t,n)=>{Te(t,n,{data:g,headers:Ae.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:d})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Q("Network Error",Q.ERR_NETWORK,e,d),{cause:t.cause||t});throw Q.from(t,t&&t.code,e,d)}})};K.forEach(rt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const it=e=>`- ${e}`,ot=e=>K.isFunction(e)||null===e||!1===e,at=e=>{e=K.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(it).join("\n"):" "+it(e[0]):"as no adapter specified";throw new Q("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function st(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new je(null,e)}function ct(e){return st(e),e.headers=Ae.from(e.headers),e.data=Be.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),at(e.adapter||Ee.adapter)(e).then((function(t){return st(e),t.data=Be.call(e,e.transformResponse,t),t.headers=Ae.from(t.headers),t}),(function(t){return Le(t)||(st(e),t&&t.response&&(t.response.data=Be.call(e,e.transformResponse,t.response),t.response.headers=Ae.from(t.response.headers))),Promise.reject(t)}))}const lt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{lt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const ut={};lt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new Q(r(i," has been removed"+(t?" in "+t:"")),Q.ERR_DEPRECATED);return t&&!ut[i]&&(ut[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};const ft={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Q("options must be an object",Q.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const t=e[o],n=void 0===t||a(t,o,e);if(!0!==n)throw new Q("option "+o+" must be "+n,Q.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Q("Unknown option "+o,Q.ERR_BAD_OPTION)}},validators:lt},ht=ft.validators;class dt{constructor(e){this.defaults=e,this.interceptors={request:new fe,response:new fe}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=We(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&ft.assertOptions(n,{silentJSONParsing:ht.transitional(ht.boolean),forcedJSONParsing:ht.transitional(ht.boolean),clarifyTimeoutError:ht.transitional(ht.boolean)},!1),null!=r&&(K.isFunction(r)?t.paramsSerializer={serialize:r}:ft.assertOptions(r,{encode:ht.function,serialize:ht.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&K.merge(i.common,i[t.method]);i&&K.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Ae.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,f=0;if(!s){const e=[ct.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);f{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new je(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new mt((function(t){e=t})),cancel:e}}}const vt=mt,gt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(gt).forEach((([e,t])=>{gt[t]=e}));const yt=gt,bt=function e(t){const n=new pt(t),r=o(pt.prototype.request,n);return K.extend(r,pt.prototype,n,{allOwnKeys:!0}),K.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(We(t,n))},r}(Ee);bt.Axios=pt,bt.CanceledError=je,bt.CancelToken=vt,bt.isCancel=Le,bt.VERSION="1.7.7",bt.toFormData=ie,bt.AxiosError=Q,bt.Cancel=bt.CanceledError,bt.all=function(e){return Promise.all(e)},bt.spread=function(e){return function(t){return e.apply(null,t)}},bt.isAxiosError=function(e){return K.isObject(e)&&!0===e.isAxiosError},bt.mergeConfig=We,bt.AxiosHeaders=Ae,bt.formToJSON=e=>_e(K.isHTMLForm(e)?new FormData(e):e),bt.getAdapter=at,bt.HttpStatusCode=yt,bt.default=bt;const _t=bt;var wt=n(6942),Et=n.n(wt),Rt=n(6994),St=n.n(Rt);const xt=window.React;Object.defineProperty;var kt=new Map,Ot=new WeakMap,Ct=0;function At(e,t,n={},r=undefined){if(void 0===window.IntersectionObserver&&void 0!==r){const i=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}const{id:i,observer:o,elements:a}=function(e){const t=function(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(n=e.root,n?(Ot.has(n)||(Ct+=1,Ot.set(n,Ct.toString())),Ot.get(n)):"0"):e[t]}`;var n})).toString()}(e);let n=kt.get(t);if(!n){const r=new Map;let i;const o=new IntersectionObserver((t=>{t.forEach((t=>{var n;const o=t.isIntersecting&&i.some((e=>t.intersectionRatio>=e));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=r.get(t.target))||n.forEach((e=>{e(o,t)}))}))}),e);i=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},kt.set(t,n)}return n}(n),s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),o.observe(e),function(){s.splice(s.indexOf(t),1),0===s.length&&(a.delete(e),o.unobserve(e)),0===a.size&&(o.disconnect(),kt.delete(i))}}function Bt({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:i,triggerOnce:o,skip:a,initialInView:s,fallbackInView:c,onChange:l}={}){var u;const[f,h]=xt.useState(null),d=xt.useRef(),[p,m]=xt.useState({inView:!!s,entry:void 0});d.current=l,xt.useEffect((()=>{if(a||!f)return;let s;return s=At(f,((e,t)=>{m({inView:e,entry:t}),d.current&&d.current(e,t),t.isIntersecting&&o&&s&&(s(),s=void 0)}),{root:i,rootMargin:r,threshold:e,trackVisibility:n,delay:t},c),()=>{s&&s()}}),[Array.isArray(e)?e.toString():e,f,i,r,o,a,n,c,t]);const v=null==(u=p.entry)?void 0:u.target,g=xt.useRef();f||!v||o||a||g.current===v||(g.current=v,m({inView:!!s,entry:void 0}));const y=[h,p.inView,p.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}xt.Component;var Lt=(0,i.createContext)();function Nt(e){var t=e.value,n=e.children;return React.createElement(Lt.Provider,{value:t},n)}function jt(){return(0,i.useContext)(Lt)}function Tt(e){return e&&Pt[e.toLowerCase()].icon?Pt[e.toLowerCase()].icon():null}var Pt={proxy:"https://proxy.getinstantimages.com/api/",testmode:!1,defaults:{provider:"unsplash",order:"latest",arr_key:"results"},providers:["Unsplash","Openverse","Pixabay","Pexels","Giphy"],unsplash:{name:"Unsplash",requires_key:!0,new:!1,api_var:"client_id",collections_api:"https://api.unsplash.com/collections/",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M10 9V0H22V9H10ZM22 14H32V32H0V14H10V23H22V14Z",fill:"black"}))}},pixabay:{name:"Pixabay",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("g",{clipPath:"url(#clip0_307_143)"},React.createElement("path",{d:"M0 0V32H32V0H0Z",fill:"#48A947"}),React.createElement("path",{d:"M6.83734 22.3147V28C5.93067 28.0427 5.02401 28.032 4.11734 27.9787C4.09601 27.7014 4.06401 27.4667 4.06401 27.2427C4.06401 23.2427 4.05334 19.2534 4.06401 15.2534C4.07467 12.032 5.97334 9.32269 8.85334 8.37335C13.1307 6.95469 17.4507 10.048 17.8453 14.3894C18.144 17.6534 16.4267 20.5547 13.568 21.7814C12.6507 22.176 11.6907 22.304 10.7093 22.304C9.45067 22.3147 8.21334 22.3147 6.83734 22.3147ZM6.84801 19.4454C8.24534 19.4454 9.54667 19.424 10.848 19.4454C13.1627 19.488 14.816 17.76 15.104 15.712C15.424 13.3654 13.7813 11.2107 11.4453 10.88H11.4347C9.25867 10.592 7.06134 12.2774 6.88001 14.528C6.74134 16.128 6.84801 17.728 6.84801 19.4454Z",fill:"#F9FBF9"}),React.createElement("path",{d:"M25.4827 14.9334L30.656 22.2081H27.3067L23.4667 16.9494C22.0694 18.6881 20.9067 20.4907 19.584 22.2081H16.2454L21.408 14.9334L16.8107 8.04272H20.16L23.4454 12.9494L26.7307 8.04272H30.0694L25.4827 14.9334Z",fill:"#FAFCFA"}),React.createElement("path",{d:"M6.848 19.4453C6.848 17.7279 6.74134 16.1173 6.86934 14.5386C7.05067 12.2879 9.248 10.6026 11.424 10.8906C13.7707 11.2106 15.4133 13.3653 15.0933 15.7119C14.816 17.7599 13.152 19.4879 10.8373 19.4453C9.54667 19.4239 8.24534 19.4453 6.848 19.4453Z",fill:"#4AA949"})),React.createElement("defs",null,React.createElement("clipPath",{id:"clip0_307_143"},React.createElement("rect",{width:"32",height:"32",fill:"white"}))))}},pexels:{name:"Pexels",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32px",height:"32px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M2 0h28a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2z",fill:"#05A081"}),React.createElement("path",{d:"M13 21h3.863v-3.752h1.167a3.124 3.124 0 1 0 0-6.248H13v10zm5.863 2H11V9h7.03a5.124 5.124 0 0 1 .833 10.18V23z",fill:"#fff"}))}},openverse:{name:"Openverse",requires_key:!1,new:!1,api_var:"key",key:"",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M25.8578 14.32C29.6708 14.32 32.7618 11.1144 32.7618 7.16C32.7618 3.20564 29.6708 0 25.8578 0C22.0448 0 18.9539 3.20564 18.9539 7.16C18.9539 11.1144 22.0448 14.32 25.8578 14.32Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 7.16C0.761841 11.1 3.84742 14.32 7.66584 14.32V0C3.84742 0 0.761841 3.2 0.761841 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 7.16C9.85791 11.1 12.9435 14.32 16.7619 14.32V0C12.9628 0 9.85791 3.2 9.85791 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M25.8578 31.9399C29.6708 31.9399 32.7618 28.7343 32.7618 24.78C32.7618 20.8256 29.6708 17.62 25.8578 17.62C22.0448 17.62 18.9539 20.8256 18.9539 24.78C18.9539 28.7343 22.0448 31.9399 25.8578 31.9399Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 24.7801C9.85791 28.72 12.9435 31.9401 16.7619 31.9401V17.64C12.9628 17.64 9.85791 20.84 9.85791 24.7801Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 24.84C0.761841 28.8 3.84742 32 7.66584 32V17.7C3.84742 17.7 0.761841 20.9 0.761841 24.84Z",fill:"#000000"}))}},giphy:{name:"Giphy",requires_key:!0,new:!0,api_var:"key",icon:function(){return React.createElement("svg",{height:"35",width:"32",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 35"},React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("path",{d:"M4 4h20v27H4z",fill:"#000"}),React.createElement("g",null,React.createElement("path",{d:"M0 3h4v29H0z",fill:"#04ff8e"}),React.createElement("path",{d:"M24 11h4v21h-4z",fill:"#8e2eff"}),React.createElement("path",{d:"M0 31h28v4H0z",fill:"#00c5ff"}),React.createElement("path",{d:"M0 0h16v4H0z",fill:"#fff152"}),React.createElement("path",{d:"M24 8V4h-4V0h-4v12h12V8",fill:"#ff5b5b"}),React.createElement("path",{d:"M24 16v-4h4",fill:"#551c99"})),React.createElement("path",{d:"M16 0v4h-4",fill:"#999131"})))}}};const zt=window.wp.i18n;var It=[{label:(0,zt.__)("WordPress","instant-images"),value:"wordpress"},{label:(0,zt.__)("Flickr","instant-images"),value:"flickr"},{label:(0,zt.__)("Nasa","instant-images"),value:"nasa"},{label:(0,zt.__)("SpaceX","instant-images"),value:"spacex"},{label:(0,zt.__)("Wikimedia","instant-images"),value:"wikimedia"}],Mt=[{label:(0,zt.__)("Square","instant-images"),value:"square"},{label:(0,zt.__)("Tall","instant-images"),value:"tall"},{label:(0,zt.__)("Wide","instant-images"),value:"wide"}],Dt=[{label:(0,zt.__)("Red","instant-images"),value:"red"},{label:(0,zt.__)("Orange","instant-images"),value:"orange"},{label:(0,zt.__)("Yellow","instant-images"),value:"yellow"},{label:(0,zt.__)("Green","instant-images"),value:"green"},{label:(0,zt.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,zt.__)("Blue","instant-images"),value:"blue"},{label:(0,zt.__)("Violet","instant-images"),value:"violet"},{label:(0,zt.__)("Pink","instant-images"),value:"pink"},{label:(0,zt.__)("Brown","instant-images"),value:"brown"},{label:(0,zt.__)("Black","instant-images"),value:"black"},{label:(0,zt.__)("Gray","instant-images"),value:"gray"},{label:(0,zt.__)("White","instant-images"),value:"white"}],Ft=[{label:(0,zt.__)("Landscape","instant-images"),value:"landscape"},{label:(0,zt.__)("Portrait","instant-images"),value:"portrait"},{label:(0,zt.__)("Square","instant-images"),value:"squarish"}],Ht=[{label:(0,zt.__)("Grayscale","instant-images"),value:"grayscale"},{label:(0,zt.__)("Red","instant-images"),value:"red"},{label:(0,zt.__)("Orange","instant-images"),value:"orange"},{label:(0,zt.__)("Yellow","instant-images"),value:"yellow"},{label:(0,zt.__)("Green","instant-images"),value:"green"},{label:(0,zt.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,zt.__)("Blue","instant-images"),value:"blue"},{label:(0,zt.__)("Lilac","instant-images"),value:"lilac"},{label:(0,zt.__)("Pink","instant-images"),value:"pink"},{label:(0,zt.__)("White","instant-images"),value:"white"},{label:(0,zt.__)("Gray","instant-images"),value:"gray"},{label:(0,zt.__)("Black","instant-images"),value:"black"},{label:(0,zt.__)("Brown","instant-images"),value:"brown"},{label:(0,zt.__)("Transparent","instant-images"),value:"transparent"}],Wt=[{label:(0,zt.__)("Backgrounds","instant-images"),value:"backgrounds"},{label:(0,zt.__)("Fashion","instant-images"),value:"fashion"},{label:(0,zt.__)("Nature","instant-images"),value:"nature"},{label:(0,zt.__)("Science","instant-images"),value:"science"},{label:(0,zt.__)("Education","instant-images"),value:"education"},{label:(0,zt.__)("Feelings","instant-images"),value:"feelings"},{label:(0,zt.__)("Health","instant-images"),value:"health"},{label:(0,zt.__)("People","instant-images"),value:"people"},{label:(0,zt.__)("Religion","instant-images"),value:"religion"},{label:(0,zt.__)("Places","instant-images"),value:"places"},{label:(0,zt.__)("Animals","instant-images"),value:"animals"},{label:(0,zt.__)("Industry","instant-images"),value:"industry"},{label:(0,zt.__)("Computer","instant-images"),value:"computer"},{label:(0,zt.__)("Food","instant-images"),value:"food"},{label:(0,zt.__)("Sports","instant-images"),value:"sports"},{label:(0,zt.__)("Food","instant-images"),value:"food"},{label:(0,zt.__)("Transportation","instant-images"),value:"transportation"},{label:(0,zt.__)("Travel","instant-images"),value:"travel"},{label:(0,zt.__)("Buildings","instant-images"),value:"buildings"},{label:(0,zt.__)("Business","instant-images"),value:"business"},{label:(0,zt.__)("Music","instant-images"),value:"music"}],Ut=[{label:(0,zt.__)("Horizontal","instant-images"),value:"horizontal"},{label:(0,zt.__)("Vertical","instant-images"),value:"vertical"}],qt=[{label:(0,zt.__)("Photo","instant-images"),value:"photo"},{label:(0,zt.__)("Illustration","instant-images"),value:"illustration"},{label:(0,zt.__)("Vector","instant-images"),value:"vector"}],Vt=[{label:(0,zt.__)("Black & White","instant-images"),value:"black_and_white"},{label:(0,zt.__)("Black","instant-images"),value:"black"},{label:(0,zt.__)("White","instant-images"),value:"white"},{label:(0,zt.__)("Yellow","instant-images"),value:"yellow"},{label:(0,zt.__)("Green","instant-images"),value:"green"},{label:(0,zt.__)("Orange","instant-images"),value:"orange"},{label:(0,zt.__)("Red","instant-images"),value:"red"},{label:(0,zt.__)("Purple","instant-images"),value:"purple"},{label:(0,zt.__)("Magenta","instant-images"),value:"magenta"},{label:(0,zt.__)("Teal","instant-images"),value:"teal"},{label:(0,zt.__)("Blue","instant-images"),value:"blue"}],Gt=[{label:(0,zt.__)("Landscape","instant-images"),value:"landscape"},{label:(0,zt.__)("Portrait","instant-images"),value:"portrait"},{label:(0,zt.__)("Square","instant-images"),value:"squarish"}];function Yt(e){return function(e){if(Array.isArray(e))return Jt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Jt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n-1&&parseInt(n)<2&&alert(instant_img_localize.api_ratelimit_msg)}}function gn(e){return e.charAt(0).toUpperCase()+e.slice(1)}var yn="";function bn(e){var t=e.currentTarget,n=t.getBoundingClientRect(),r=Math.round(n.left),i=Math.round(n.top),o=t.closest("#photo-listing").querySelector("#tooltip");o.classList.remove("over"),t.classList.contains("tooltip--above")?o.classList.add("above"):o.classList.remove("above"),yn=setInterval((function(){clearInterval(yn),o.innerHTML=t.dataset.title,r=r-o.offsetWidth+t.offsetWidth+5,o.style.left="".concat(r,"px"),o.style.top="".concat(i,"px"),setTimeout((function(){o.classList.add("over")}),25)}),750)}function wn(e){clearInterval(yn),e.currentTarget.closest("#photo-listing").querySelector("#tooltip").classList.remove("over")}function En(e){e&&window&&window.open(e,"_blank")}function Rn(){var e=instant_img_localize;switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:200){case 400:case 401:return e.api_invalid_msg;case 403:return e.api_invalid_403_msg;case 404:return e.api_invalid_404_msg;case 429:return e.api_ratelimit_msg;case 500:case 503:return e.api_invalid_500_msg;case 501:return e.api_invalid_501_msg}}function Sn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=instant_img_localize,r=Rn(t);switch(t){case 400:case 401:case 500:case 429:console.warn("[".concat(n.instant_images," - ").concat(t," Error] ").concat(gn(e),": ").concat(r))}}function xn(e){return e&&e[Pt.defaults.arr_key]||[]}function kn(e){return void 0===e.total||null===e.total?0:e.total}function On(e){if(!e||Pt.testmode)return!1;var t=sessionStorage.getItem(mn(e));if(!t)return!1;var n=JSON.parse(t),r=n.expires,i=void 0===r?0:r,o=n.error;if(void 0!==o&&o)return!1;var a=Date.now()>i;return a&&An(e),!(!n||a)&&n}function Cn(e,t){if(!e||!t||null!=t&&t.error)return!1;t.expires=Date.now()+72e5,sessionStorage.setItem(mn(e),JSON.stringify(t))}function An(e){if(!e)return!1;sessionStorage.removeItem(mn(e))}function Bn(e){return Bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bn(e)}function Ln(){Ln=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new B(r||[]);return i(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",d="suspendedYield",p="executing",m="completed",v={};function g(){}function y(){}function b(){}var _={};l(_,a,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(L([])));E&&E!==n&&r.call(E,a)&&(_=E);var R=b.prototype=g.prototype=Object.create(_);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(i,o,a,s){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==Bn(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function k(t,n,r){var i=h;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=O(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?m:d,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=m,r.method="throw",r.arg=l.arg)}}}function O(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Nn(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function jn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Tn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=1?null:React.createElement("div",{className:"instant-images-no-results"},React.createElement("div",null,React.createElement("h3",null,instant_img_localize.no_results," "),React.createElement("p",null,instant_img_localize.no_results_desc," ")))}const qn=n.p+"images/giphy-powered.9748c37d.png";var Vn=Pt.providers;function Gn(e){var t=e.switchProvider,n=jt().provider;return React.createElement(i.Fragment,null,!(null==Vn||!Vn.length)&&React.createElement("nav",{className:"provider-nav"},Vn.map((function(e,r){return React.createElement("div",{key:"provider-".concat(r)},React.createElement("button",{onClick:function(){return t(e.toLowerCase())},className:n===e.toLowerCase()?"provider-nav--btn active":"provider-nav--btn"},Tt(e),React.createElement("span",null,e),Pt[e.toLowerCase()].new&&React.createElement("span",{className:"provider-nav--new"},instant_img_localize.new)))})),"giphy"===n?React.createElement("div",{className:"giphy-powered"},React.createElement("a",{href:"https://giphy.com",target:"_blank",rel:"noreferrer"},React.createElement("img",{src:qn,alt:"Powered by Giphy"}))):null))}function Yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=200&&t.status<400&&JSON.parse(t.response).success||o(!1)},t.onerror=function(e){console.warn(e),o(!1)}}),[]),React.createElement(i.Fragment,null,r?null:React.createElement("div",{className:"error-messaging"},React.createElement("strong",null,instant_img_localize.error_restapi),instant_img_localize.error_restapi_desc))}const Kn=window.wp.blocks,$n=window.wp.data;function Xn(e,t){var n=e.id,r=void 0===n?null:n,i=e.url,o=void 0===i?null:i,a=e.caption,s=void 0===a?"":a,c=e.alt,l=void 0===c?"":c;if(o&&r){var u=(0,Kn.createBlock)("core/image",{id:r,url:o,caption:s,alt:l});t?(0,$n.dispatch)("core/block-editor").replaceBlock(t,u):(0,$n.dispatch)("core/block-editor").insertBlocks(u)}}function Zn(e){return Zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zn(e)}function Qn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function er(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&React.createElement("img",{className:"user-wrap--photo",src:B,alt:""}),A)),React.createElement("div",{className:"photo-options"},f&&!X?React.createElement(i.Fragment,null,React.createElement("button",{type:"button",className:"set-featured fade","data-title":instant_img_localize.set_as_featured,onMouseEnter:function(e){return bn(e)},onMouseLeave:function(e){return wn(e)},onClick:function(e){return function(e){wn(e),te.current&&(ie=!0,te.current.click())}(e)}},React.createElement("i",{className:"fa fa-picture-o","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.set_as_featured)),React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(e){return bn(e)},onMouseLeave:function(e){return wn(e)},onClick:function(e){return ae(e)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post))):null,!!s&&React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(e){return bn(e)},onMouseLeave:function(e){return wn(e)},onClick:function(e){return ae(e)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post)),X?React.createElement("button",{onClick:function(){X&&(window.location=X)},className:"edit-photo-admin fade","data-title":instant_img_localize.edit_upload,onMouseEnter:function(e){return bn(e)},onMouseLeave:function(e){return wn(e)}},React.createElement("i",{className:"fa fa-pencil","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_upload)):React.createElement("button",{onClick:function(e){return function(e){e.preventDefault(),wn(e);var t=document.querySelectorAll(".edit-screen.editing");t&&t.forEach((function(e){e.classList.remove("editing")})),ne.current.classList.add("editing"),setTimeout((function(){ne.current.focus({preventScroll:!0})}),150)}(e)},className:"edit-photo fade","data-title":instant_img_localize.edit_details,onMouseEnter:function(e){return bn(e)},onMouseLeave:function(e){return wn(e)}},React.createElement("i",{className:"fa fa-cog","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_details)))),React.createElement("div",{className:"photo-meta"},E?React.createElement("span",{className:"likes tooltip--above","data-title":E+" "+j,onMouseEnter:function(e){return bn(e)},onMouseLeave:function(e){return wn(e)}},React.createElement("i",{className:"fa fa-heart heart-like","aria-hidden":"true"})," ",E):null,React.createElement("a",{className:"tooltip--above",href:m,"data-title":"".concat(instant_img_localize.open_external," ").concat(gn(o)),onMouseEnter:function(e){return bn(e)},onMouseLeave:function(e){return wn(e)},rel:"noopener noreferrer",target:"_blank"},React.createElement("i",{className:"fa fa-external-link","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},"".concat(instant_img_localize.open_external," ").concat(gn(o)))))),React.createElement("div",{className:"edit-screen",tabIndex:"0",ref:ne},React.createElement("div",{className:"edit-screen--title"},React.createElement("div",null,React.createElement("p",{className:"heading"},instant_img_localize.edit_details),R&&R.length>0&&React.createElement("p",{className:"dimensions"},R)),React.createElement("div",{className:"preview",style:{backgroundImage:"url(".concat(k,")")}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_filename,":"),React.createElement("input",{type:"text",name:"filename","data-original":p,placeholder:W.filename,value:W.filename,onChange:function(e){return le(e)}}),React.createElement("em",null,".",w)),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_title,":"),React.createElement("input",{type:"text",name:"title","data-original":v,placeholder:v,value:W.title||"",onChange:function(e){return le(e)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_alt,":"),React.createElement("input",{type:"text",name:"alt","data-original":g,value:W.alt||"",onChange:function(e){return le(e)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_caption,":"),React.createElement("textarea",{rows:"4",name:"caption","data-original":F,onChange:function(e){return le(e)},value:W.caption||"",ref:re})),D?React.createElement("div",{className:"add-attribution-row"},React.createElement("button",{onClick:function(e){return function(e){e.preventDefault(),re.current.value=D,U(er(er({},W),{},{caption:D}))}(e)},type:"button"},instant_img_localize.attribution)):null,React.createElement("div",{className:"edit-screen--controls"},React.createElement("button",{type:"button",className:"button button-secondary",onClick:function(e){return U({filename:p,title:v,alt:g,caption:F}),ne.current.classList.remove("editing"),void te.current.focus({preventScrol:!0})}},instant_img_localize.cancel)," "," ",React.createElement("button",{type:"button",className:"button button-primary",onClick:function(){return ne.current.classList.remove("editing"),void te.current.click()}},s?instant_img_localize.insert_into_post:instant_img_localize.upload_now))),React.createElement("div",{className:"photo-status"})))}function or(e){var t=e.result.data,n=void 0===t?null:t,r=(null==n?void 0:n.url)||"",o=(null==n?void 0:n.title)||"",a=(null==n?void 0:n.description)||"",s=(null==n?void 0:n.avatar)||"",c=n.image,l=void 0===c?null:c,u=l.src,f=void 0===u?null:u,h=l.alt,d=void 0===h?null:h,p=(0,i.useRef)(),m=(0,i.useRef)();return React.createElement(i.Fragment,null,l&&r?React.createElement("article",{className:"photo feature",title:a,ref:p,onClick:function(){return m.current.click()}},React.createElement("div",{className:"photo--wrap"},React.createElement("span",{className:"flag",title:instant_img_localize.advertisement},instant_img_localize.ad),React.createElement("div",{className:"img-wrap"},React.createElement("a",{className:"loaded",href:r,target:"_blank",ref:m,rel:"noreferrer"},React.createElement("img",{src:f,alt:d}))),React.createElement("div",{className:"feature-title"},s&&React.createElement("img",{src:s,alt:o}),React.createElement("span",null,o)))):null)}function ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n-1&&t.splice(n,1),t.length>=10&&(t.length=10),t.unshift(e),localStorage.setItem(mr,JSON.stringify(t))}else localStorage.setItem(mr,JSON.stringify([e]))}}(r),v(gr())))}(e)},autoComplete:"off"},React.createElement("label",{htmlFor:"search-input",className:"offscreen"},instant_img_localize.search_label),React.createElement("div",{ref:_},React.createElement("input",{ref:t,type:"text",id:"search-input",placeholder:instant_img_localize.search,disabled:f,onChange:function(e){return c&&d(e.target.value)},onFocus:function(){return b(!0)}}),c&&((null==m?void 0:m.length)||(null==h?void 0:h.length))?React.createElement(Sr,{show:y,history:m,setHistory:v,setSearchValue:function(e){var n=null==t?void 0:t.current;n.value=e,null==w||w.current.click(),n.focus()},container:_}):null,!a&&React.createElement(Rr,{show:y})),React.createElement("button",{type:"submit",disabled:f,ref:w},React.createElement("i",{className:"fa fa-search"}),React.createElement("span",{className:"offscreen"},instant_img_localize.search)),React.createElement(xr,{show:y})))}));function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function jr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tr(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==h[0]&&h[0],!z){e.next=3;break}return e.abrupt("return",!1);case 3:if(n||""===(null==he||null===(t=he.current)||void 0===t?void 0:t.value)){e.next=7;break}if(!m||!g){e.next=7;break}return xe(he.current.value),e.abrupt("return");case 7:if(T(!0),d=void 0,(null==he||null===(d=he.current)||void 0===d?void 0:d.value)&&(he.current.value=""),K(b),Z([]),Ne(),Ur=1,r=on(S,re),i=fn("photos",r),!(o=On(i))){e.next=18;break}Oe(xn(o),!1,null),e.next=37;break;case 18:return e.next=20,fetch(i);case 20:return s=e.sent,c=s.status,vn(s.headers),e.prev=23,e.next=26,s.json();case 26:l=e.sent,u=l.error,f=void 0===u?null:u,Oe(xn(l),!1,f),Cn(i,l),e.next=37;break;case 32:e.prev=32,e.t0=e.catch(23),Sn(a,c),T(!1),An(i);case 37:setTimeout((function(){T(!1)}),250);case 38:case"end":return e.stop()}var d}),e,null,[[23,32]])}))),Ee.apply(this,arguments)}function Re(){return Se.apply(this,arguments)}function Se(){return(Se=Mr(Nr().mark((function e(){var t,n,r,i,o,s,c,l,u,f,h,d;return Nr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(B&&!j&&!z&&!D){e.next=2;break}return e.abrupt("return");case 2:if(I(!0),Ur=parseInt(Ur)+1,t=null!=J&&J.active&&null!=J&&J.term?{term:J.term}:{},n=null!=J&&J.active?"search":"photos",r=null!=J&&J.active?ae:re,i=Tr(Tr(Tr({},{page:Ur}),t),r),o=on(S,i),s=fn(n,o),!(c=On(s))){e.next=15;break}Oe(xn(c),!0,null),e.next=34;break;case 15:return e.next=17,fetch(s);case 17:return l=e.sent,u=l.status,vn(l.headers),e.prev=20,e.next=23,l.json();case 23:f=e.sent,h=f.error,d=void 0===h?null:h,Oe(xn(f),!0,d),Cn(s,f),e.next=34;break;case 29:e.prev=29,e.t0=e.catch(20),Sn(a,u),I(!1),An(s);case 34:case"end":return e.stop()}}),e,null,[[20,29]])})))).apply(this,arguments)}function xe(_x){return ke.apply(this,arguments)}function ke(){return(ke=Mr(Nr().mark((function e(t){var n,r,i,o,s,c,l,u,f,h,d;return Nr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(T(!0),Ne(),Ur=1,n="id:"===t.substring(0,3)?"id":"term",r="id"===n?{id:t.replace("id:","").replace(/\s+/,"")}:{term:t},i=Tr(Tr(Tr({},{page:Ur}),r),ae),o=on(S,i),s=fn("search",o),!(c=On(s))){e.next=14;break}Oe(xn(c),!1,null),K({active:!0,term:t,type:n,results:kn(c)}),e.next=35;break;case 14:return e.next=16,fetch(s);case 16:return l=e.sent,u=l.status,vn(l.headers),e.prev=19,e.next=22,l.json();case 22:f=e.sent,h=f.error,d=void 0===h?null:h,Oe(xn(f),!1,d),K({active:!0,term:t,type:n,results:kn(f)}),Cn(s,f),e.next=35;break;case 29:e.prev=29,e.t0=e.catch(19),F(!0),T(!1),Sn(a,u),An(s);case 35:he.current.classList.remove(y);case 36:case"end":return e.stop()}}),e,null,[[19,29]])})))).apply(this,arguments)}function Oe(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;e=null==t?void 0:t.length,F(0===parseInt(e)||void 0===e),E(n?function(e){return[].concat(zr(e),zr(t))}:t),U(r)}function Ce(e,t){var n=Tr({},re);n[e]&&"#"===t||""===t||"all"===t?delete n[e]:n[e]=t,ie(Tr({},n))}function Ae(e){return Be.apply(this,arguments)}function Be(){return(Be=Mr(Nr().mark((function e(t){var n,r;return Nr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S!==t){e.next=2;break}return e.abrupt("return");case 2:if(T(!0),U(!1),G(!1),ye.classList.remove("overflow-hidden"),!Pt[t].requires_key||O.includes(t)){e.next=27;break}return e.prev=7,e.next=10,fetch(hn(t));case 10:if(n=e.sent,r=n.status,vn(n.headers),200===r){e.next=18;break}return G(t),U(!0),ye.classList.add("overflow-hidden"),e.abrupt("return");case 18:200===r&&C((function(e){return[].concat(zr(e),[t])})),e.next=27;break;case 21:return e.prev=21,e.t0=e.catch(7),G(t),ye.classList.add("overflow-hidden"),U(!0),e.abrupt("return");case 27:setTimeout((function(){te($t[t].filters),x(t)}),250);case 28:case"end":return e.stop()}}),e,null,[[7,21]])})))).apply(this,arguments)}function Le(){return Le=Mr(Nr().mark((function e(t){var n;return Nr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&!((null==t?void 0:t.length)<3)){e.next=2;break}return e.abrupt("return");case 2:return n=instant_img_localize.root+"instant-images-extended/suggestions/?term=".concat(t),e.next=5,_t.get(n).then((function(e){Z(e.data)})).catch((function(e){console.warn(e)}));case 5:case"end":return e.stop()}}),e)}))),Le.apply(this,arguments)}function Ne(){pe&&null!=fe&&fe.current&&(null==fe||fe.current.scroll({top:0,left:0,behavior:"smooth"}))}function je(e){if("Escape"===e.key){var t=fe.current.querySelectorAll(".edit-screen.editing");t&&zr(t).forEach((function(e){null==e||e.classList.remove("editing")}))}}return(0,i.useEffect)((function(){null!=J&&J.active||se({})}),[J]),(0,i.useEffect)((function(){B&&null!=J&&J.active&&xe(null==J?void 0:J.term)}),[ae]),(0,i.useEffect)((function(){B&&we()}),[re]),(0,i.useEffect)((function(){te($t[S].filters),ie({})}),[S]),(0,i.useEffect)((function(){Re()}),[ue]),(0,i.useEffect)((function(){Wr(fe.current,(function(){ve||(de.current=new(St())(fe.current,{itemSelector:".photo"}),fe.current.querySelectorAll(".photo").forEach((function(e){e.classList.add("in-view")}))),setTimeout((function(){T(!1),I(!1),B||L(!0)}),250)}))}),[w]),(0,i.useEffect)((function(){return T(!1),_e.classList.add("loaded"),ve&&we(),document.addEventListener("keydown",je,!1),function(){document.removeEventListener("keydown",je,!1)}}),[]),React.createElement(i.Fragment,null,React.createElement(Nt,{value:{provider:S,wpBlock:pe,mediaModal:ge,blockSidebar:me,clientId:h,search:J,apiError:W,getPhotos:we,searchHandler:function(e){e.preventDefault();var t=he.current.value;t.length>2?(he.current.classList.add(y),xe(t)):he.current.focus()},filterSearch:function(e,t){var n=Tr({},ae);n[e]&&"#"===t||""===t||"all"===t?delete n[e]:n[e]=t,se(Tr({},n))},suggestions:X,getSuggestions:function(e){return Le.apply(this,arguments)}}},pe?React.createElement(Qt,{switchProvider:Ae}):React.createElement(React.Fragment,null,React.createElement(Gn,{switchProvider:Ae}),React.createElement(Er,null)),React.createElement(Jn,null),React.createElement("div",{className:"control-nav"},React.createElement("div",{className:Et()("control-nav--filters-wrap",W||null!=J&&J.active?"inactive":null)},ee&&null!==(n=Object.entries(ee))&&void 0!==n&&n.length?React.createElement("div",{className:"control-nav--filters"},Object.entries(ee).map((function(e,t){var n=Dr(e,2),r=n[0],i=n[1];return React.createElement(Hn,{key:"".concat(S,"-").concat(t,"-").concat(r),data:i,filterKey:r,handler:Ce})}))):null),React.createElement(Cr,{ref:he})),React.createElement("div",{id:"photo-listing",className:j?"loading":null},React.createElement(Br,null),pe?React.createElement(hr,{ref:fe,data:w,done:D,loadMorePhotos:Re}):React.createElement(sr,{ref:fe,data:w}),React.createElement(Un,{total:null==J?void 0:J.results,is_search:null==J?void 0:J.active}),React.createElement(Wn,{ref:le,loadMorePhotos:Re,loading:z,done:D}),React.createElement(Pn,{provider:V,callback:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&x(e),G(!1),T(!1),U(!1),ye.classList.remove("overflow-hidden")}}),React.createElement(zn,null),React.createElement(dr,null))))}function Vr(e){return Vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vr(e)}function Gr(){Gr=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new B(r||[]);return i(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",d="suspendedYield",p="executing",m="completed",v={};function g(){}function y(){}function b(){}var _={};l(_,a,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(L([])));E&&E!==n&&r.call(E,a)&&(_=E);var R=b.prototype=g.prototype=Object.create(_);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(i,o,a,s){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==Vr(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function k(t,n,r){var i=h;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=O(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?m:d,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=m,r.method="throw",r.arg=l.arg)}}}function O(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Yr(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function Jr(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Yr(o,r,i,a,s,"next",e)}function s(e){Yr(o,r,i,a,s,"throw",e)}a(void 0)}))}}var Kr=instant_img_localize&&instant_img_localize.default_provider?instant_img_localize.default_provider:Pt.defaults.provider;function $r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pt.defaults.provider,t=fn("photos",on(e));function n(){return(n=Jr(Gr().mark((function n(){var r,o,a,s,c,l,u;return Gr().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(r=document.getElementById("app"))){n.next=25;break}if(!(o=On(t))){n.next=7;break}i.createRoot?(0,i.createRoot)(r).render(React.createElement(qr,{editor:"classic",data:o,container:r,provider:e,api_error:null})):(0,i.render)(React.createElement(qr,{editor:"classic",data:o,container:r,provider:e,api_error:null}),r),n.next=25;break;case 7:return n.next=9,fetch(t);case 9:return a=n.sent,s=a.status,vn(a.headers),n.prev=12,n.next=15,a.json();case 15:c=n.sent,l=c.error,u=void 0===l?null:l,i.createRoot?(0,i.createRoot)(r).render(React.createElement(qr,{editor:"classic",data:c,container:r,provider:e,api_error:u})):(0,i.render)(React.createElement(qr,{editor:"classic",data:c,container:r,provider:e,api_error:u}),r),Cn(t,c),n.next=25;break;case 21:n.prev=21,n.t0=n.catch(12),Sn(e,s),An(t);case 25:case"end":return n.stop()}}),n,null,[[12,21]])})))).apply(this,arguments)}!function(){n.apply(this,arguments)}()}Jr(Gr().mark((function e(){return Gr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:$r(Kr);case 1:case"end":return e.stop()}}),e)})))()},955:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],a=[],s=[],c=[],l=[],u=[],f=[],h=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var m=e[n],v=e[m],g=e[v],y=257*e[p]^16843008*p;a[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,c[n]=y<<8|y>>>24,l[n]=y,y=16843009*g^65537*v^257*m^16843008*n,u[p]=y<<24|y>>>8,f[p]=y<<16|y>>>16,h[p]=y<<8|y>>>24,d[p]=y,n?(n=m^e[e[e[g^m]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a6&&a%n==4&&(l=i[l>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l]):(l=i[(l=l<<8|l>>>24)>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l],l^=p[a/n|0]<<24),o[a]=o[a-n]^l);for(var s=this._invKeySchedule=[],c=0;c>>24]]^f[i[l>>>16&255]]^h[i[l>>>8&255]]^d[i[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,l,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,f,h,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,a,s){for(var c=this._nRounds,l=e[t]^n[0],u=e[t+1]^n[1],f=e[t+2]^n[2],h=e[t+3]^n[3],d=4,p=1;p>>24]^i[u>>>16&255]^o[f>>>8&255]^a[255&h]^n[d++],v=r[u>>>24]^i[f>>>16&255]^o[h>>>8&255]^a[255&l]^n[d++],g=r[f>>>24]^i[h>>>16&255]^o[l>>>8&255]^a[255&u]^n[d++],y=r[h>>>24]^i[l>>>16&255]^o[u>>>8&255]^a[255&f]^n[d++];l=m,u=v,f=g,h=y}m=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^n[d++],v=(s[u>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&l])^n[d++],g=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^n[d++],y=(s[h>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&f])^n[d++],e[t]=m,e[t+1]=v,e[t+2]=g,e[t+3]=y},keySize:8});e.AES=t._createHelper(m)}(),r.AES)},3128:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.BlockCipher,n=e.algo;const i=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function c(e,t){let n=t>>24&255,r=t>>16&255,i=t>>8&255,o=255&t,a=e.sbox[0][n]+e.sbox[1][r];return a^=e.sbox[2][i],a+=e.sbox[3][o],a}function l(e,t,n){let r,o=t,a=n;for(let t=0;t=n&&(r=0);let i=0,s=0,c=0;for(let t=0;t<18;t+=2)c=l(e,i,s),i=c.left,s=c.right,e.pbox[t]=i,e.pbox[t+1]=s;for(let t=0;t<4;t++)for(let n=0;n<256;n+=2)c=l(e,i,s),i=c.left,s=c.right,e.sbox[t][n]=i,e.sbox[t][n+1]=s}(s,t,n)}},encryptBlock:function(e,t){var n=l(s,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},decryptBlock:function(e,t){var n=function(e,t,n){let r,i=t,o=n;for(let t=17;t>1;--t)i^=e.pbox[t],o=c(e,i)^o,r=i,i=o,o=r;return r=i,i=o,o=r,o^=e.pbox[1],i^=e.pbox[0],{left:i,right:o}}(s,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=t._createHelper(u)}(),r.Blowfish)},7165:function(e,t,n){var r,i,o,a,s,c,l,u,f,h,d,p,m,v,g,y,b,_,w;e.exports=(r=n(9021),n(9506),void(r.lib.Cipher||(i=r,o=i.lib,a=o.Base,s=o.WordArray,c=o.BufferedBlockAlgorithm,l=i.enc,l.Utf8,u=l.Base64,f=i.algo.EvpKDF,h=o.Cipher=c.extend({cfg:a.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){c.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?w:b}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),o.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),d=i.mode={},p=o.BlockCipherMode=a.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),m=d.CBC=function(){var e=p.extend();function t(e,t,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},o.BlockCipher=h.extend({cfg:h.cfg.extend({mode:m,padding:v}),reset:function(){var e;h.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),g=o.CipherParams=a.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),y=(i.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?s.create([1398893684,1701076831]).concat(n).concat(t):t).toString(u)},parse:function(e){var t,n=u.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=s.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:t})}},b=o.SerializableCipher=a.extend({cfg:a.extend({format:y}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),a=i.cfg;return g.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=(i.kdf={}).OpenSSL={execute:function(e,t,n,r,i){if(r||(r=s.random(8)),i)o=f.create({keySize:t+n,hasher:i}).compute(e,r);else var o=f.create({keySize:t+n}).compute(e,r);var a=s.create(o.words.slice(t),4*n);return o.sigBytes=4*t,g.create({key:o,iv:a,salt:r})}},w=o.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:_}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=i.iv;var o=b.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=i.iv,b.decrypt.call(this,e,t,i.key,r)}}))))},9021:function(e,t,n){var r;e.exports=(r=r||function(e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),"undefined"!=typeof self&&self.crypto&&(t=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(t=globalThis.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&void 0!==n.g&&n.g.crypto&&(t=n.g.crypto),!t)try{t=n(477)}catch(e){}var r=function(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},a=o.lib={},s=a.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new c.init(n,t/2)}},f=l.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new c.init(n,t)}},h=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},d=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),l=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,u=e.min(4*l,o);if(l){for(var f=0;f>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var c=r.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i>>6-a%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return o.create(r,i)}(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},r.enc.Base64)},4725:function(e,t,n){var r,i,o;e.exports=(r=n(9021),o=(i=r).lib.WordArray,i.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var n=e.words,r=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,c=0;c<4&&a+.75*c>>6*(3-c)&63));var l=i.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("")},parse:function(e,t){void 0===t&&(t=!0);var n=e.length,r=t?this._safe_map:this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var a=0;a>>6-a%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return o.create(r,i)}(e,n,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},r.enc.Base64url)},5503:function(e,t,n){var r;e.exports=(r=n(9021),function(){var e=r,t=e.lib.WordArray,n=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var n=e.length,r=[],i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(r,2*n)}},n.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var n=e.length,r=[],o=0;o>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(r,2*n)}}}(),r.enc.Utf16)},9506:function(e,t,n){var r,i,o,a,s,c,l,u;e.exports=(u=n(9021),n(5471),n(1025),o=(i=(r=u).lib).Base,a=i.WordArray,c=(s=r.algo).MD5,l=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,i=r.hasher.create(),o=a.create(),s=o.words,c=r.keySize,l=r.iterations;s.lengthr&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),s=i.words,c=a.words,l=0;l>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)};n.prototype=e}}(),r.lib.WordArray)},4636:function(e,t,n){var r;e.exports=(r=n(9021),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var c=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],c=e[t+1],d=e[t+2],p=e[t+3],m=e[t+4],v=e[t+5],g=e[t+6],y=e[t+7],b=e[t+8],_=e[t+9],w=e[t+10],E=e[t+11],R=e[t+12],S=e[t+13],x=e[t+14],k=e[t+15],O=o[0],C=o[1],A=o[2],B=o[3];O=l(O,C,A,B,a,7,s[0]),B=l(B,O,C,A,c,12,s[1]),A=l(A,B,O,C,d,17,s[2]),C=l(C,A,B,O,p,22,s[3]),O=l(O,C,A,B,m,7,s[4]),B=l(B,O,C,A,v,12,s[5]),A=l(A,B,O,C,g,17,s[6]),C=l(C,A,B,O,y,22,s[7]),O=l(O,C,A,B,b,7,s[8]),B=l(B,O,C,A,_,12,s[9]),A=l(A,B,O,C,w,17,s[10]),C=l(C,A,B,O,E,22,s[11]),O=l(O,C,A,B,R,7,s[12]),B=l(B,O,C,A,S,12,s[13]),A=l(A,B,O,C,x,17,s[14]),O=u(O,C=l(C,A,B,O,k,22,s[15]),A,B,c,5,s[16]),B=u(B,O,C,A,g,9,s[17]),A=u(A,B,O,C,E,14,s[18]),C=u(C,A,B,O,a,20,s[19]),O=u(O,C,A,B,v,5,s[20]),B=u(B,O,C,A,w,9,s[21]),A=u(A,B,O,C,k,14,s[22]),C=u(C,A,B,O,m,20,s[23]),O=u(O,C,A,B,_,5,s[24]),B=u(B,O,C,A,x,9,s[25]),A=u(A,B,O,C,p,14,s[26]),C=u(C,A,B,O,b,20,s[27]),O=u(O,C,A,B,S,5,s[28]),B=u(B,O,C,A,d,9,s[29]),A=u(A,B,O,C,y,14,s[30]),O=f(O,C=u(C,A,B,O,R,20,s[31]),A,B,v,4,s[32]),B=f(B,O,C,A,b,11,s[33]),A=f(A,B,O,C,E,16,s[34]),C=f(C,A,B,O,x,23,s[35]),O=f(O,C,A,B,c,4,s[36]),B=f(B,O,C,A,m,11,s[37]),A=f(A,B,O,C,y,16,s[38]),C=f(C,A,B,O,w,23,s[39]),O=f(O,C,A,B,S,4,s[40]),B=f(B,O,C,A,a,11,s[41]),A=f(A,B,O,C,p,16,s[42]),C=f(C,A,B,O,g,23,s[43]),O=f(O,C,A,B,_,4,s[44]),B=f(B,O,C,A,R,11,s[45]),A=f(A,B,O,C,k,16,s[46]),O=h(O,C=f(C,A,B,O,d,23,s[47]),A,B,a,6,s[48]),B=h(B,O,C,A,y,10,s[49]),A=h(A,B,O,C,x,15,s[50]),C=h(C,A,B,O,v,21,s[51]),O=h(O,C,A,B,R,6,s[52]),B=h(B,O,C,A,p,10,s[53]),A=h(A,B,O,C,w,15,s[54]),C=h(C,A,B,O,c,21,s[55]),O=h(O,C,A,B,b,6,s[56]),B=h(B,O,C,A,k,10,s[57]),A=h(A,B,O,C,g,15,s[58]),C=h(C,A,B,O,S,21,s[59]),O=h(O,C,A,B,m,6,s[60]),B=h(B,O,C,A,E,10,s[61]),A=h(A,B,O,C,d,15,s[62]),C=h(C,A,B,O,_,21,s[63]),o[0]=o[0]+O|0,o[1]=o[1]+C|0,o[2]=o[2]+A|0,o[3]=o[3]+B|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+i+a;return(s<>>32-o)+t}function u(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+i+a;return(s<>>32-o)+t}function f(e,t,n,r,i,o,a){var s=e+(t^n^r)+i+a;return(s<>>32-o)+t}function h(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+i+a;return(s<>>32-o)+t}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)}(Math),r.MD5)},2169:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();function t(e,t,n,r){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var a=0;a>24))e+=1<<24;else{var t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}return e}var n=e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(a);var s=a.slice(0);r.encryptBlock(s,0);for(var c=0;c>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Ansix923)},4905:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)},482:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)},8124:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},2155:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},r.pad.ZeroPadding)},19:function(e,t,n){var r,i,o,a,s,c,l,u,f;e.exports=(f=n(9021),n(3009),n(1025),o=(i=(r=f).lib).Base,a=i.WordArray,c=(s=r.algo).SHA256,l=s.HMAC,u=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=l.create(n.hasher,e),i=a.create(),o=a.create([1]),s=i.words,c=o.words,u=n.keySize,f=n.iterations;s.length>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=l>>>16|4294901760&u,h=u<<16|65535&l;for(r[0]^=l,r[1]^=f,r[2]^=u,r[3]^=h,r[4]^=l,r[5]^=f,r[6]^=u,r[7]^=h,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)},6298:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)c.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var o=t.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=l>>>16|4294901760&u,h=u<<16|65535&l;for(i[0]^=l,i[1]^=f,i[2]^=u,i[3]^=h,i[4]^=l,i[5]^=f,i[6]^=u,i[7]^=h,n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)},7193:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var a=i%n,s=t[a>>>2]>>>24-a%4*8&255;o=(o+r[i]+s)%256;var c=r[i];r[i]=r[o],r[o]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}e.RC4=t._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),r.RC4)},8056:function(e,t,n){var r;e.exports=(r=n(9021),function(){var e=r,t=e.lib,n=t.WordArray,i=t.Hasher,o=e.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),f=n.create([1352829926,1548603684,1836072691,2053994217,0]),h=o.RIPEMD160=i.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,h,b,_,w,E,R,S,x,k,O,C=this._hash.words,A=u.words,B=f.words,L=a.words,N=s.words,j=c.words,T=l.words;for(E=o=C[0],R=h=C[1],S=b=C[2],x=_=C[3],k=w=C[4],n=0;n<80;n+=1)O=o+e[t+L[n]]|0,O+=n<16?d(h,b,_)+A[0]:n<32?p(h,b,_)+A[1]:n<48?m(h,b,_)+A[2]:n<64?v(h,b,_)+A[3]:g(h,b,_)+A[4],O=(O=y(O|=0,j[n]))+w|0,o=w,w=_,_=y(b,10),b=h,h=O,O=E+e[t+N[n]]|0,O+=n<16?g(R,S,x)+B[0]:n<32?v(R,S,x)+B[1]:n<48?m(R,S,x)+B[2]:n<64?p(R,S,x)+B[3]:d(R,S,x)+B[4],O=(O=y(O|=0,T[n]))+k|0,E=k,k=x,x=y(S,10),S=R,R=O;O=C[1]+b+x|0,C[1]=C[2]+_+k|0,C[2]=C[3]+w+E|0,C[3]=C[4]+o+R|0,C[4]=C[0]+h+S|0,C[0]=O},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,n){return e^t^n}function p(e,t,n){return e&t|~e&n}function m(e,t,n){return(e|~t)^n}function v(e,t,n){return e&n|t&~n}function g(e,t,n){return e^(t|~n)}function y(e,t){return e<>>32-t}e.RIPEMD160=i._createHelper(h),e.HmacRIPEMD160=i._createHmacHelper(h)}(Math),r.RIPEMD160)},5471:function(e,t,n){var r,i,o,a,s,c,l,u;e.exports=(i=(r=u=n(9021)).lib,o=i.WordArray,a=i.Hasher,s=r.algo,c=[],l=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=0;l<80;l++){if(l<16)c[l]=0|e[t+l];else{var u=c[l-3]^c[l-8]^c[l-14]^c[l-16];c[l]=u<<1|u>>>31}var f=(r<<5|r>>>27)+s+c[l];f+=l<20?1518500249+(i&o|~i&a):l<40?1859775393+(i^o^a):l<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=a._createHelper(l),r.HmacSHA1=a._createHmacHelper(l),u.SHA1)},6308:function(e,t,n){var r,i,o,a,s,c;e.exports=(c=n(9021),n(3009),i=(r=c).lib.WordArray,o=r.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),r.SHA224=a._createHelper(s),r.HmacSHA224=a._createHmacHelper(s),c.SHA224)},3009:function(e,t,n){var r;e.exports=(r=n(9021),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[],c=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=n(e.pow(r,.5))),c[i]=n(e.pow(r,1/3)),i++),r++}();var l=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=0;d<64;d++){if(d<16)l[d]=0|e[t+d];else{var p=l[d-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=l[d-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;l[d]=m+l[d-7]+g+l[d-16]}var y=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),_=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&f)+c[d]+l[d];h=f,f=u,u=s,s=a+_|0,a=o,o=i,i=r,r=_+(b+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+f|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),r.SHA256)},5953:function(e,t,n){var r;e.exports=(r=n(9021),n(3240),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.x64.Word,s=t.algo,c=[],l=[],u=[];!function(){for(var e=1,t=0,n=0;n<24;n++){c[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)l[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,f=0,h=0;h<7;h++){if(1&i){var d=(1<>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(C=n[i]).high^=a,C.low^=o}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var d=0,p=0,m=0;m<5;m++)d^=(C=n[h+5*m]).high,p^=C.low;var v=f[h];v.high=d,v.low=p}for(h=0;h<5;h++){var g=f[(h+4)%5],y=f[(h+1)%5],b=y.high,_=y.low;for(d=g.high^(b<<1|_>>>31),p=g.low^(_<<1|b>>>31),m=0;m<5;m++)(C=n[h+5*m]).high^=d,C.low^=p}for(var w=1;w<25;w++){var E=(C=n[w]).high,R=C.low,S=c[w];S<32?(d=E<>>32-S,p=R<>>32-S):(d=R<>>64-S,p=E<>>64-S);var x=f[l[w]];x.high=d,x.low=p}var k=f[0],O=n[0];for(k.high=O.high,k.low=O.low,h=0;h<5;h++)for(m=0;m<5;m++){var C=n[w=h+5*m],A=f[w],B=f[(h+1)%5+5*m],L=f[(h+2)%5+5*m];C.high=A.high^~B.high&L.high,C.low=A.low^~B.low&L.low}C=n[0];var N=u[s];C.high^=N.high,C.low^=N.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,c=s/8,l=[],u=0;u>>24)|4278255360&(h<<24|h>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),l.push(d),l.push(h)}return new i.init(l,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=o._createHelper(h),t.HmacSHA3=o._createHmacHelper(h)}(Math),r.SHA3)},9557:function(e,t,n){var r,i,o,a,s,c,l,u;e.exports=(u=n(9021),n(3240),n(1380),i=(r=u).x64,o=i.Word,a=i.WordArray,s=r.algo,c=s.SHA512,l=s.SHA384=c.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var e=c._doFinalize.call(this);return e.sigBytes-=16,e}}),r.SHA384=c._createHelper(l),r.HmacSHA384=c._createHmacHelper(l),u.SHA384)},1380:function(e,t,n){var r;e.exports=(r=n(9021),n(3240),function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],l=[];!function(){for(var e=0;e<80;e++)l[e]=s()}();var u=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=r.high,p=r.low,m=i.high,v=i.low,g=o.high,y=o.low,b=a.high,_=a.low,w=s.high,E=s.low,R=u.high,S=u.low,x=f.high,k=f.low,O=h.high,C=h.low,A=d,B=p,L=m,N=v,j=g,T=y,P=b,z=_,I=w,M=E,D=R,F=S,H=x,W=k,U=O,q=C,V=0;V<80;V++){var G,Y,J=l[V];if(V<16)Y=J.high=0|e[t+2*V],G=J.low=0|e[t+2*V+1];else{var K=l[V-15],$=K.high,X=K.low,Z=($>>>1|X<<31)^($>>>8|X<<24)^$>>>7,Q=(X>>>1|$<<31)^(X>>>8|$<<24)^(X>>>7|$<<25),ee=l[V-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=l[V-7],ae=oe.high,se=oe.low,ce=l[V-16],le=ce.high,ue=ce.low;Y=(Y=(Y=Z+ae+((G=Q+se)>>>0>>0?1:0))+re+((G+=ie)>>>0>>0?1:0))+le+((G+=ue)>>>0>>0?1:0),J.high=Y,J.low=G}var fe,he=I&D^~I&H,de=M&F^~M&W,pe=A&L^A&j^L&j,me=B&N^B&T^N&T,ve=(A>>>28|B<<4)^(A<<30|B>>>2)^(A<<25|B>>>7),ge=(B>>>28|A<<4)^(B<<30|A>>>2)^(B<<25|A>>>7),ye=(I>>>14|M<<18)^(I>>>18|M<<14)^(I<<23|M>>>9),be=(M>>>14|I<<18)^(M>>>18|I<<14)^(M<<23|I>>>9),_e=c[V],we=_e.high,Ee=_e.low,Re=U+ye+((fe=q+be)>>>0>>0?1:0),Se=ge+me;U=H,q=W,H=D,W=F,D=I,F=M,I=P+(Re=(Re=(Re=Re+he+((fe+=de)>>>0>>0?1:0))+we+((fe+=Ee)>>>0>>0?1:0))+Y+((fe+=G)>>>0>>0?1:0))+((M=z+fe|0)>>>0>>0?1:0)|0,P=j,z=T,j=L,T=N,L=A,N=B,A=Re+(ve+pe+(Se>>>0>>0?1:0))+((B=fe+Se|0)>>>0>>0?1:0)|0}p=r.low=p+B,r.high=d+A+(p>>>0>>0?1:0),v=i.low=v+N,i.high=m+L+(v>>>0>>0?1:0),y=o.low=y+T,o.high=g+j+(y>>>0>>0?1:0),_=a.low=_+z,a.high=b+P+(_>>>0>>0?1:0),E=s.low=E+M,s.high=w+I+(E>>>0>>0?1:0),S=u.low=S+F,u.high=R+D+(S>>>0>>0?1:0),k=f.low=k+W,f.high=x+H+(k>>>0>>0?1:0),C=h.low=C+q,h.high=O+U+(C>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(u),e.HmacSHA512=t._createHmacHelper(u)}(),r.SHA512)},7628:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=a[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var l=i[o]=[],u=c[o];for(n=0;n<24;n++)l[n/6|0]|=t[(s[n]-1+u)%28]<<31-n%6,l[4+(n/6|0)]|=t[28+(s[n+24]-1+u)%28]<<31-n%6;for(l[0]=l[0]<<1|l[0]>>>31,n=1;n<7;n++)l[n]=l[n]>>>4*(n-1)+3;l[7]=l[7]<<5|l[7]>>>27}var f=this._invSubKeys=[];for(n=0;n<16;n++)f[n]=i[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,a=this._rBlock,s=0,c=0;c<8;c++)s|=l[c][((a^i[c])&u[c])>>>0];this._lBlock=a,this._rBlock=o^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,h.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=f.createEncryptor(n.create(t)),this._des2=f.createEncryptor(n.create(r)),this._des3=f.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),r.TripleDES)},3240:function(e,t,n){var r,i,o,a,s,c;e.exports=(r=n(9021),o=(i=r).lib,a=o.Base,s=o.WordArray,(c=i.x64={}).Word=a.extend({init:function(e,t){this.high=e,this.low=t}}),c.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r{var r,i;!function(o,a){"use strict";void 0===(i="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=i)}(window,(function(){"use strict";var e=function(){var e=window.Element.prototype;if(e.matches)return"matches";if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],n=0;n{var r,i;!function(o){r=[n(9786)],i=function(e){return function(e,t){"use strict";var n={extend:function(e,t){for(var n in t)e[n]=t[n];return e},modulo:function(e,t){return(e%t+t)%t}},r=Array.prototype.slice;n.makeArray=function(e){return Array.isArray(e)?e:null==e?[]:"object"==typeof e&&"number"==typeof e.length?r.call(e):[e]},n.removeFrom=function(e,t){var n=e.indexOf(t);-1!=n&&e.splice(n,1)},n.getParent=function(e,n){for(;e.parentNode&&e!=document.body;)if(e=e.parentNode,t(e,n))return e},n.getQueryElement=function(e){return"string"==typeof e?document.querySelector(e):e},n.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},n.filterFindElements=function(e,r){e=n.makeArray(e);var i=[];return e.forEach((function(e){if(e instanceof HTMLElement)if(r){t(e,r)&&i.push(e);for(var n=e.querySelectorAll(r),o=0;o{var r,i;window,void 0===(i="function"==typeof(r=function(){"use strict";function e(e){var t=parseFloat(e);return-1==e.indexOf("%")&&!isNaN(t)&&t}var t="undefined"==typeof console?function(){}:function(e){console.error(e)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],r=n.length;function i(e){var n=getComputedStyle(e);return n||t("Style returned "+n+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),n}var o,a=!1;function s(t){if(function(){if(!a){a=!0;var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(t);var r=i(t);o=200==Math.round(e(r.width)),s.isBoxSizeOuter=o,n.removeChild(t)}}(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var c=i(t);if("none"==c.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t{setTimeout((()=>{this.progress(e,t,n)}))};this.images.forEach((function(t){t.once("progress",e),t.check()}))},i.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&r&&r.log(`progress: ${n}`,e,t)},i.prototype.complete=function(){let e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){let e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},s.prototype=Object.create(t.prototype),s.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},s.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},s.prototype.confirm=function(e,t){this.isLoaded=e;let{parentNode:n}=this.img,r="PICTURE"===n.nodeName?n:this.img;this.emitEvent("progress",[this,r,t])},s.prototype.handleEvent=function(e){let t="on"+e.type;this[t]&&this[t](e)},s.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},s.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},s.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype=Object.create(s.prototype),c.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},c.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},i.makeJQueryPlugin=function(t){(t=t||e.jQuery)&&(n=t,n.fn.imagesLoaded=function(e,t){return new i(this,e,t).jqDeferred.promise(n(this))})},i.makeJQueryPlugin(),i}))},6994:(e,t,n)=>{var r,i,o;window,i=[n(2831),n(1485)],void 0===(o="function"==typeof(r=function(e,t){"use strict";var n=e.create("masonry");n.compatOptions.fitWidth="isFitWidth";var r=n.prototype;return r._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var e=0;e1&&n+e>this.cols?0:n;var r=t.size.outerWidth&&t.size.outerHeight;return this.horizontalColIndex=r?n+e:this.horizontalColIndex,{col:n,y:this._getColGroupY(n,e)}},r._manageStamp=function(e){var n=t(e),r=this._getElementOffset(e),i=this._getOption("originLeft")?r.left:r.right,o=i+n.outerWidth,a=Math.floor(i/this.columnWidth);a=Math.max(0,a);var s=Math.floor(o/this.columnWidth);s-=o%this.columnWidth?0:1,s=Math.min(this.cols-1,s);for(var c=(this._getOption("originTop")?r.top:r.bottom)+n.outerHeight,l=a;l<=s;l++)this.colYs[l]=Math.max(c,this.colYs[l])},r._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var e={height:this.maxY};return this._getOption("fitWidth")&&(e.width=this._getContainerFitWidth()),e},r._getContainerFitWidth=function(){for(var e=0,t=this.cols;--t&&0===this.colYs[t];)e++;return(this.cols-e)*this.columnWidth-this.gutter},r.needsResizeLayout=function(){var e=this.containerWidth;return this.getContainerWidth(),e!=this.containerWidth},n})?r.apply(t,i):r)||(e.exports=o)},3169:(e,t,n)=>{var r,i,o;window,i=[n(7738),n(1485)],void 0===(o="function"==typeof(r=function(e,t){"use strict";var n=document.documentElement.style,r="string"==typeof n.transition?"transition":"WebkitTransition",i="string"==typeof n.transform?"transform":"WebkitTransform",o={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],a={transform:i,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"};function s(e,t){e&&(this.element=e,this.layout=t,this.position={x:0,y:0},this._create())}var c=s.prototype=Object.create(e.prototype);c.constructor=s,c._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},c.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.getSize=function(){this.size=t(this.element)},c.css=function(e){var t=this.element.style;for(var n in e)t[a[n]||n]=e[n]},c.getPosition=function(){var e=getComputedStyle(this.element),t=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),r=e[t?"left":"right"],i=e[n?"top":"bottom"],o=parseFloat(r),a=parseFloat(i),s=this.layout.size;-1!=r.indexOf("%")&&(o=o/100*s.width),-1!=i.indexOf("%")&&(a=a/100*s.height),o=isNaN(o)?0:o,a=isNaN(a)?0:a,o-=t?s.paddingLeft:s.paddingRight,a-=n?s.paddingTop:s.paddingBottom,this.position.x=o,this.position.y=a},c.layoutPosition=function(){var e=this.layout.size,t={},n=this.layout._getOption("originLeft"),r=this.layout._getOption("originTop"),i=n?"paddingLeft":"paddingRight",o=n?"left":"right",a=n?"right":"left",s=this.position.x+e[i];t[o]=this.getXValue(s),t[a]="";var c=r?"paddingTop":"paddingBottom",l=r?"top":"bottom",u=r?"bottom":"top",f=this.position.y+e[c];t[l]=this.getYValue(f),t[u]="",this.css(t),this.emitEvent("layout",[this])},c.getXValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!t?e/this.layout.size.width*100+"%":e+"px"},c.getYValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&t?e/this.layout.size.height*100+"%":e+"px"},c._transitionTo=function(e,t){this.getPosition();var n=this.position.x,r=this.position.y,i=e==this.position.x&&t==this.position.y;if(this.setPosition(e,t),!i||this.isTransitioning){var o=e-n,a=t-r,s={};s.transform=this.getTranslate(o,a),this.transition({to:s,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},c.getTranslate=function(e,t){return"translate3d("+(e=this.layout._getOption("originLeft")?e:-e)+"px, "+(t=this.layout._getOption("originTop")?t:-t)+"px, 0)"},c.goTo=function(e,t){this.setPosition(e,t),this.layoutPosition()},c.moveTo=c._transitionTo,c.setPosition=function(e,t){this.position.x=parseFloat(e),this.position.y=parseFloat(t)},c._nonTransition=function(e){for(var t in this.css(e.to),e.isCleaning&&this._removeStyles(e.to),e.onTransitionEnd)e.onTransitionEnd[t].call(this)},c.transition=function(e){if(parseFloat(this.layout.options.transitionDuration)){var t=this._transn;for(var n in e.onTransitionEnd)t.onEnd[n]=e.onTransitionEnd[n];for(n in e.to)t.ingProperties[n]=!0,e.isCleaning&&(t.clean[n]=!0);e.from&&(this.css(e.from),this.element.offsetHeight),this.enableTransition(e.to),this.css(e.to),this.isTransitioning=!0}else this._nonTransition(e)};var l="opacity,"+i.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}));c.enableTransition=function(){if(!this.isTransitioning){var e=this.layout.options.transitionDuration;e="number"==typeof e?e+"ms":e,this.css({transitionProperty:l,transitionDuration:e,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(o,this,!1)}},c.onwebkitTransitionEnd=function(e){this.ontransitionend(e)},c.onotransitionend=function(e){this.ontransitionend(e)};var u={"-webkit-transform":"transform"};c.ontransitionend=function(e){if(e.target===this.element){var t=this._transn,n=u[e.propertyName]||e.propertyName;delete t.ingProperties[n],function(e){for(var t in e)return!1;return!0}(t.ingProperties)&&this.disableTransition(),n in t.clean&&(this.element.style[e.propertyName]="",delete t.clean[n]),n in t.onEnd&&(t.onEnd[n].call(this),delete t.onEnd[n]),this.emitEvent("transitionEnd",[this])}},c.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},c._removeStyles=function(e){var t={};for(var n in e)t[n]="";this.css(t)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return c.removeTransitionStyles=function(){this.css(f)},c.stagger=function(e){e=isNaN(e)?0:e,this.staggerDelay=e+"ms"},c.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},c.remove=function(){r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",(function(){this.removeElem()})),this.hide()):this.removeElem()},c.reveal=function(){delete this.isHidden,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:e.hiddenStyle,to:e.visibleStyle,isCleaning:!0,onTransitionEnd:t})},c.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},c.getHideRevealTransitionEndProperty=function(e){var t=this.layout.options[e];if(t.opacity)return"opacity";for(var n in t)return n},c.hide=function(){this.isHidden=!0,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:e.visibleStyle,to:e.hiddenStyle,isCleaning:!0,onTransitionEnd:t})},c.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},c.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},s})?r.apply(t,i):r)||(e.exports=o)},7738:function(e,t,n){var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},r=n[e]=n[e]||[];return-1==r.indexOf(t)&&r.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var r=n.indexOf(t);return-1!=r&&n.splice(r,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var r=this._onceEvents&&this._onceEvents[e],i=0;i{var r,i;!function(o){"use strict";r=[n(7738),n(1485),n(977),n(3169)],i=function(e,t,n,r){return function(e,t,n,r,i){var o=e.console,a=e.jQuery,s=function(){},c=0,l={};function u(e,t){var n=r.getQueryElement(e);if(n){this.element=n,a&&(this.$element=a(this.element)),this.options=r.extend({},this.constructor.defaults),this.option(t);var i=++c;this.element.outlayerGUID=i,l[i]=this,this._create(),this._getOption("initLayout")&&this.layout()}else o&&o.error("Bad element for "+this.constructor.namespace+": "+(n||e))}u.namespace="outlayer",u.Item=i,u.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=u.prototype;function h(e){function t(){e.apply(this,arguments)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t}r.extend(f,t.prototype),f.option=function(e){r.extend(this.options,e)},f._getOption=function(e){var t=this.constructor.compatOptions[e];return t&&void 0!==this.options[t]?this.options[t]:this.options[e]},u.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),r.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(e){for(var t=this._filterFindItemElements(e),n=this.constructor.Item,r=[],i=0;i{},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t{if(!n){var a=1/0;for(u=0;u=o)&&Object.keys(r.O).every((e=>r.O[e](n[c])))?n.splice(c--,1):(s=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,i,o]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=n[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={985:0,576:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var i,o,a=n[0],s=n[1],c=n[2],l=0;if(a.some((t=>0!==e[t]))){for(i in s)r.o(s,i)&&(r.m[i]=s[i]);if(c)var u=c(r)}for(t&&t(n);lr(8670)));i=r.O(i)})(); \ No newline at end of file diff --git a/build/media-modal/index.asset.php b/build/media-modal/index.asset.php index 475c8e0..738df90 100644 --- a/build/media-modal/index.asset.php +++ b/build/media-modal/index.asset.php @@ -1 +1 @@ - array('react', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '6638faceaa1ccf347f2e'); + array('react', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'a1cc5640051093efdb8e'); diff --git a/build/media-modal/index.js b/build/media-modal/index.js index 38177e8..cb7d5a4 100644 --- a/build/media-modal/index.js +++ b/build/media-modal/index.js @@ -1,21103 +1 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ "./src/js/common/pluginProvider.js": -/*!*****************************************!*\ - !*** ./src/js/common/pluginProvider.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ PluginProvider: () => (/* binding */ PluginProvider), -/* harmony export */ usePluginContext: () => (/* binding */ usePluginContext) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); - - -// Create Context object. -var PluginContext = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createContext)(); - -// Export Provider. -function PluginProvider(props) { - var value = props.value, - children = props.children; - return /*#__PURE__*/React.createElement(PluginContext.Provider, { - value: value - }, children); -} - -// Export useContext Hook. -function usePluginContext() { - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useContext)(PluginContext); -} - -/***/ }), - -/***/ "./src/js/components/APILightbox.js": -/*!******************************************!*\ - !*** ./src/js/components/APILightbox.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ APILightbox) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _functions_buildURL__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../functions/buildURL */ "./src/js/functions/buildURL.js"); -/* harmony import */ var _functions_consoleStatus__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../functions/consoleStatus */ "./src/js/functions/consoleStatus.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _functions_updatePluginSetting__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../functions/updatePluginSetting */ "./src/js/functions/updatePluginSetting.js"); -/* harmony import */ var _ProviderIcons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ProviderIcons */ "./src/js/components/ProviderIcons.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } -function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - -/** - * Render the APILightbox component. - * Note: Component is display when switching providers and the API is invalid. - * - * @param {Object} props The component props. - * @return {JSX.Element} The APILightbox component. - */ -function APILightbox(props) { - var provider = props.provider, - callback = props.callback; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('invalid'), - _useState2 = _slicedToArray(_useState, 2), - apiStatus = _useState2[0], - setAPIStatus = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(''), - _useState4 = _slicedToArray(_useState3, 2), - response = _useState4[0], - setResponse = _useState4[1]; - var lightbox = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var inputRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var submitRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var api_key = instant_img_localize["".concat(provider, "_app_id")]; - var title = apiStatus === 'invalid' ? instant_img_localize.api_key_invalid : ''; - - /** - * Handler for the form submission. - * - * @param {Event} e The form event. - */ - function handleSubmit(_x) { - return _handleSubmit.apply(this, arguments); - } - /** - * Close the lightbox - */ - function _handleSubmit() { - _handleSubmit = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) { - var _inputRef$current; - var key, data, ok, status, headers; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - e.preventDefault(); - setAPIStatus('loading'); - - // Get API key value. - key = inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value; // Set API key to localized variable. - instant_img_localize["".concat(provider, "_app_id")] = key; - - // Update plugin settings via REST API. - (0,_functions_updatePluginSetting__WEBPACK_IMPORTED_MODULE_5__["default"])("".concat(provider, "_api"), key); - _context.prev = 5; - _context.next = 8; - return fetch((0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_2__.buildTestURL)(provider)); - case 8: - data = _context.sent; - // Handle response. - ok = data.ok, status = data.status, headers = data.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_4__.checkRateLimit)(headers); - - // Handle response actions. - if (ok) { - // Success. - setAPIStatus('valid'); - setResponse(instant_img_localize.api_success_msg); - setTimeout(function () { - setResponse(''); - setAPIStatus('invalid'); - callback(provider); - }, 1000); - } else { - setAPIStatus('invalid'); // Error/Invalid. - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_3__["default"])(provider, status); // Render console warning. - - if (status === 400 || status === 401) { - setResponse(instant_img_localize.api_invalid_msg); // Unsplash/Pixabay incorrect API key. - } - if (status === 429) { - setResponse(instant_img_localize.api_ratelimit_msg); // Pixabay - too many requests. - } - } - _context.next = 19; - break; - case 14: - _context.prev = 14; - _context.t0 = _context["catch"](5); - setAPIStatus('invalid'); // Error/Invalid. - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_3__["default"])(provider, 500); // Render console warning. - setResponse(instant_img_localize.api_invalid_500_msg); - case 19: - case "end": - return _context.stop(); - } - }, _callee, null, [[5, 14]]); - })); - return _handleSubmit.apply(this, arguments); - } - function closeLightbox() { - if (lightbox !== null && lightbox !== void 0 && lightbox.current) { - lightbox.current.classList.remove('active'); - setTimeout(function () { - callback(); - }, 150); - } - } - - /** - * Close the lightbox with a background click. - * - * @param {Event} e The form event. - */ - function bkgClick(e) { - var target = e.target; - // If clicked element is the background. - if (target === (lightbox === null || lightbox === void 0 ? void 0 : lightbox.current)) { - closeLightbox(); - } - } - - /** - * Escape handler. - * - * @param {Event} e The key press event. - */ - function escFunction(e) { - var key = e.key; - if (key === 'Escape') { - closeLightbox(); - } - } - - /** - * Reset the key to use Instant Images default. - */ - function getDefaultKey() { - inputRef.current.value = ''; - setTimeout(function () { - submitRef.current.click(); - }, 25); - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - var _lightbox$current; - document.addEventListener('keydown', escFunction, false); - lightbox === null || lightbox === void 0 || (_lightbox$current = lightbox.current) === null || _lightbox$current === void 0 || _lightbox$current.classList.add('active'); - return function () { - document.removeEventListener('keydown', escFunction, false); - }; - }, [provider]); //eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, provider ? - /*#__PURE__*/ - // eslint-disable-next-line - React.createElement("div", { - className: "api-lightbox", - ref: lightbox, - onClick: function onClick(e) { - return bkgClick(e); - }, - tabIndex: "-1" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", { - className: "api-lightbox--close", - onClick: function onClick() { - return closeLightbox(); - } - }, "\xD7", /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.btnClose)), /*#__PURE__*/React.createElement("div", { - className: "api-lightbox--details" - }, /*#__PURE__*/React.createElement("h3", null, (0,_ProviderIcons__WEBPACK_IMPORTED_MODULE_6__.getProviderIcon)(provider), provider), /*#__PURE__*/React.createElement("p", null, instant_img_localize["".concat(provider, "_api_desc")]), /*#__PURE__*/React.createElement("p", { - className: "action-controls" - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_4__.gotoURL)(instant_img_localize["".concat(provider, "_api_url")]); - } - }, instant_img_localize.get_api_key), provider !== 'giphy' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, "|"), /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return getDefaultKey(); - } - }, instant_img_localize.use_instant_images_key)) : null)), /*#__PURE__*/React.createElement("form", { - onSubmit: function onSubmit(e) { - return handleSubmit(e); - } - }, /*#__PURE__*/React.createElement("label", { - htmlFor: "key", - className: "offscreen" - }, instant_img_localize.enter_api_key), /*#__PURE__*/React.createElement("div", { - className: "api-lightbox--input-wrap" - }, /*#__PURE__*/React.createElement("span", { - className: apiStatus, - title: title && title - }, apiStatus === 'invalid' && /*#__PURE__*/React.createElement("i", { - className: "fa fa-exclamation-triangle", - "aria-hidden": "true" - }), apiStatus === 'valid' && /*#__PURE__*/React.createElement("i", { - className: "fa fa-check-circle", - "aria-hidden": "true" - }), apiStatus === 'loading' && /*#__PURE__*/React.createElement("i", { - className: "fa fa-spinner fa-spin", - "aria-hidden": "true" - })), /*#__PURE__*/React.createElement("input", { - type: "text", - id: "key", - ref: inputRef, - placeholder: "Enter API Key", - defaultValue: api_key - })), response && /*#__PURE__*/React.createElement("p", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('api-lightbox--response', apiStatus) - }, response), /*#__PURE__*/React.createElement("button", { - type: "submit", - ref: submitRef - }, instant_img_localize.btnVerify))))) : null); -} - -/***/ }), - -/***/ "./src/js/components/ErrorLightbox.js": -/*!********************************************!*\ - !*** ./src/js/components/ErrorLightbox.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ ErrorLightbox) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _functions_getErrorMessage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../functions/getErrorMessage */ "./src/js/functions/getErrorMessage.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _ProviderIcons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ProviderIcons */ "./src/js/components/ProviderIcons.js"); - - - - - - - -/** - * Render the ErrorLightbox component. - * Note: Component is display on initial plugin load if the default provider has an invalid API key. - * - * @return {JSX.Element} The ErrorLightbox component. - */ -function ErrorLightbox() { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider, - apiError = _usePluginContext.apiError; - var lightbox = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var status = apiError !== null && apiError !== void 0 && apiError.status ? apiError.status : null; - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, apiError && status && /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('api-lightbox', 'error-lightbox', 'active'), - ref: lightbox, - tabIndex: "-1" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('api-lightbox--details', 'error-lightbox') - }, /*#__PURE__*/React.createElement("h3", null, (0,_ProviderIcons__WEBPACK_IMPORTED_MODULE_5__.getProviderIcon)(provider), provider), /*#__PURE__*/React.createElement("p", { - className: "callout-warning" - }, status, " ", instant_img_localize.error), /*#__PURE__*/React.createElement("p", null, (0,_functions_getErrorMessage__WEBPACK_IMPORTED_MODULE_3__["default"])(status)), /*#__PURE__*/React.createElement("p", { - className: "more-info" - }, instant_img_localize.api_default_provider), /*#__PURE__*/React.createElement("p", { - className: "action-controls" - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_4__.gotoURL)(instant_img_localize["".concat(provider, "_api_url")]); - } - }, instant_img_localize.get_api_key)))))); -} - -/***/ }), - -/***/ "./src/js/components/Filter.js": -/*!*************************************!*\ - !*** ./src/js/components/Filter.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Filter) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hooks/useArrowControls */ "./src/js/hooks/useArrowControls.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - -/** - * Render the Filter component. - * - * @param {Object} props The component props. - * @param {Object} props.data The filter data. - * @param {string} props.filterKey The filter key. - * @param {Function} props.handler The change/click handler function. - * @return {JSX.Element} The Filter component. - */ -function Filter(props) { - var _data$filters; - var data = props.data, - filterKey = props.filterKey, - handler = props.handler; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider; - var defaultValue = data === null || data === void 0 ? void 0 : data["default"]; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - expanded = _useState2[0], - setExpanded = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultValue), - _useState4 = _slicedToArray(_useState3, 2), - selected = _useState4[0], - setSelected = _useState4[1]; - var dropdown = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var button = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var menu = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var id = "".concat(provider, "-").concat(filterKey); - var isColor = filterKey === 'colors' || filterKey === 'color'; - - // Use up/down arrow keys to navigate dropdown. - (0,_hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_3__.useArrowControls)(expanded, dropdown); - - /** - * Toggle menu open/closed. - * - * @param {Event} event The click event. - */ - function toggleMenu(event) { - event.preventDefault(); - - // If disabled, don't open menu. - var target = event.currentTarget; - if (target.disabled) { - return false; - } - if (expanded) { - setExpanded(false); - document.removeEventListener('click', closeMenuOutside); - } else { - setExpanded(true); - document.addEventListener('click', closeMenuOutside); - } - } - - /** - * Close menu when clicking outside. - * - * @param {Event} event The click event. - */ - function closeMenuOutside(event) { - var _menu$current, _button$current; - if (!(menu !== null && menu !== void 0 && (_menu$current = menu.current) !== null && _menu$current !== void 0 && _menu$current.contains(event.target)) && !(button !== null && button !== void 0 && (_button$current = button.current) !== null && _button$current !== void 0 && _button$current.contains(event.target))) { - setExpanded(false); - document.removeEventListener('click', closeMenuOutside); - } - } - - /** - * Checks for focus outside of component. - * - * @param {Event} event The click event. - */ - function focusOutside(event) { - if (!(dropdown !== null && dropdown !== void 0 && dropdown.current.contains(event.target))) { - closeMenuOutside(event); - } - } - - /** - * Detect esc key press. - * - * @param {Event} event The click event. - */ - function escClick(event) { - if (event.key === 'Escape') { - setExpanded(false); - } - } - - /** - * Click handler for the filter buttons. - * - * @param {string} filter The current filter key. - * @param {string} value The value to filter. - */ - function click(filter, value) { - var newValue = selected !== value ? value : defaultValue; - setSelected(newValue); - handler(filter, newValue); - setTimeout(function () { - var _button$current2; - button === null || button === void 0 || (_button$current2 = button.current) === null || _button$current2 === void 0 || _button$current2.click(); - }, 100); - } - - /** - * Convert a color to a CSS value. - * - * @see https://www.w3schools.com/colors/colors_names.asp - * - * @param {string} color The current color. - * @return {string} The color. - */ - function convertColor(color) { - if (color === 'lilac') { - color = 'DarkViolet'; - } - if (color === 'grayscale' || color === 'black_and_white') { - color = 'LightGray'; - } - return color; - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - // Initiate arrow menus. - // a11yarrows.init(dropdown?.current, { - // selector: "button", - // }); - - // Check for focus outside. - document.addEventListener('keyup', focusOutside); - document.addEventListener('keydown', escClick); - return function () { - document.removeEventListener('keyup', focusOutside); - document.removeEventListener('keydown', escClick); - }; - }, []); // eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement("div", { - className: "filter-dropdown", - id: id, - ref: dropdown - }, /*#__PURE__*/React.createElement("button", { - onClick: toggleMenu, - className: "filter-dropdown--button", - "aria-expanded": expanded ? 'true' : 'false', - ref: button - }, /*#__PURE__*/React.createElement("span", { - className: "filter-dropdown--button-label" - }, data === null || data === void 0 ? void 0 : data.label), /*#__PURE__*/React.createElement("span", { - className: "filter-dropdown--button-selected" - }, selected.replace(/_/g, ' '), /*#__PURE__*/React.createElement("i", { - className: "fa fa-caret-down", - "aria-hidden": "true" - }))), /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('filter-dropdown--menu', expanded ? 'expanded' : null), - "data-key": filterKey, - "aria-hidden": expanded ? 'false' : 'true', - ref: menu - }, (data === null || data === void 0 || (_data$filters = data.filters) === null || _data$filters === void 0 ? void 0 : _data$filters.length) && data.filters.map(function (filter, key) { - var label = filter.label, - value = filter.value; - return /*#__PURE__*/React.createElement("button", { - key: key, - disabled: selected === value, - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('filter-dropdown--item', selected === value ? 'selected' : null), - onClick: function onClick() { - return click(filterKey, value); - } - }, label, value !== 'all' && value !== 'transparent' && isColor ? /*#__PURE__*/React.createElement("span", { - className: "_color", - style: { - color: convertColor(value) - } - }) : null); - }))); -} - -/***/ }), - -/***/ "./src/js/components/Icon.js": -/*!***********************************!*\ - !*** ./src/js/components/Icon.js ***! - \***********************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ IconLogo: () => (/* binding */ IconLogo), -/* harmony export */ IconSVG: () => (/* binding */ IconSVG), -/* harmony export */ "default": () => (/* binding */ Icon) -/* harmony export */ }); -/** - * The Icon component. - * - * @return {JSX.Element} The Icon component. - */ -function Icon() { - return /*#__PURE__*/React.createElement("span", { - className: "instant-images-sidebar-icon" - }, /*#__PURE__*/React.createElement(IconSVG, null)); -} - -/** - * The SVG icon. - * - * @return {JSX.Element} The IconSVG component. - */ -function IconSVG() { - return /*#__PURE__*/React.createElement("svg", { - viewBox: "0 0 31 58", - width: "13px", - height: "24px" - }, /*#__PURE__*/React.createElement("polygon", { - points: "20 0 20 23 31 23 11 58 11 34 0 34 20 0", - fill: "#4a7bc5" - })); -} - -/** - * The SVG Logo. - * - * @return {JSX.Element} The IconLogo component. - */ -function IconLogo() { - return /*#__PURE__*/React.createElement("svg", { - width: "80", - height: "80", - viewBox: "0 0 80 80", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("title", null, "Instant Images Icon"), /*#__PURE__*/React.createElement("path", { - d: "M0 8C0 3.58172 3.58172 0 8 0H72C76.4183 0 80 3.58172 80 8V72C80 76.4183 76.4183 80 72 80H8C3.58172 80 0 76.4183 0 72V8Z", - fill: "#647FE8" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z", - fill: "white" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z", - fill: "white" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z", - fill: "#C7D2FF" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z", - fill: "#C7D2FF" - })); -} - -/***/ }), - -/***/ "./src/js/components/InstantImages.js": -/*!********************************************!*\ - !*** ./src/js/components/InstantImages.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ InstantImages) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! masonry-layout */ "./node_modules/masonry-layout/masonry.js"); -/* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(masonry_layout__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var react_intersection_observer__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! react-intersection-observer */ "./node_modules/react-intersection-observer/dist/index.mjs"); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _constants_filters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../constants/filters */ "./src/js/constants/filters.js"); -/* harmony import */ var _editor_block_components_Header__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../editor/block/components/Header */ "./src/js/editor/block/components/Header.js"); -/* harmony import */ var _functions_buildURL__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../functions/buildURL */ "./src/js/functions/buildURL.js"); -/* harmony import */ var _functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../functions/consoleStatus */ "./src/js/functions/consoleStatus.js"); -/* harmony import */ var _functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../functions/getQueryParams */ "./src/js/functions/getQueryParams.js"); -/* harmony import */ var _functions_getResults__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../functions/getResults */ "./src/js/functions/getResults.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _functions_session__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../functions/session */ "./src/js/functions/session.js"); -/* harmony import */ var _APILightbox__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./APILightbox */ "./src/js/components/APILightbox.js"); -/* harmony import */ var _ErrorLightbox__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ErrorLightbox */ "./src/js/components/ErrorLightbox.js"); -/* harmony import */ var _Filter__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Filter */ "./src/js/components/Filter.js"); -/* harmony import */ var _LoadMore__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./LoadMore */ "./src/js/components/LoadMore.js"); -/* harmony import */ var _NoResults__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./NoResults */ "./src/js/components/NoResults.js"); -/* harmony import */ var _ProviderNav__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./ProviderNav */ "./src/js/components/ProviderNav.js"); -/* harmony import */ var _RestAPIError__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./RestAPIError */ "./src/js/components/RestAPIError.js"); -/* harmony import */ var _Results__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Results */ "./src/js/components/Results.js"); -/* harmony import */ var _ResultsWPBlock__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./ResultsWPBlock */ "./src/js/components/ResultsWPBlock.js"); -/* harmony import */ var _Tooltip__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Tooltip */ "./src/js/components/Tooltip.js"); -/* harmony import */ var _cta_Extended__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./cta/Extended */ "./src/js/components/cta/Extended.js"); -/* harmony import */ var _search_SearchForm__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./search/SearchForm */ "./src/js/components/search/SearchForm.js"); -/* harmony import */ var _search_SearchHeader__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./search/SearchHeader */ "./src/js/components/search/SearchHeader.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } -function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } -function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } -function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - -var imagesLoaded = __webpack_require__(/*! imagesloaded */ "./node_modules/imagesloaded/imagesloaded.js"); -var page = 1; - -/** - * Render the main InstantImages application component. - * - * @param {Object} props The component props. - * @param {string} props.editor Editor type. - * @param {string} props.provider Image provider. - * @param {Array} props.data API results. - * @param {Element} props.container Instant Images container element. - * @param {Object} props.api_error API error object. - * @param {string} props.clientId WP block client ID. - * @return {JSX.Element} InstantImages component. - */ -function InstantImages(props) { - var _instant_img_localize4, _Object$entries; - var _props$editor = props.editor, - editor = _props$editor === void 0 ? 'classic' : _props$editor, - provider = props.provider, - data = props.data, - container = props.container, - _props$api_error = props.api_error, - api_error = _props$api_error === void 0 ? null : _props$api_error, - _props$clientId = props.clientId, - clientId = _props$clientId === void 0 ? null : _props$clientId; - var _instant_img_localize = (_instant_img_localize4 = instant_img_localize) === null || _instant_img_localize4 === void 0 || (_instant_img_localize4 = _instant_img_localize4.addons) === null || _instant_img_localize4 === void 0 ? void 0 : _instant_img_localize4.extended, - _instant_img_localize2 = _instant_img_localize.activated, - extended_activated = _instant_img_localize2 === void 0 ? false : _instant_img_localize2, - _instant_img_localize3 = _instant_img_localize.license, - extended_license = _instant_img_localize3 === void 0 ? false : _instant_img_localize3; - var delay = 250; - var searchClass = 'searching'; - var searchDefaults = { - active: false, - term: '', - type: '', - results: 0 - }; - - // App state. - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(data)), - _useState2 = _slicedToArray(_useState, 2), - results = _useState2[0], - setResults = _useState2[1]; // Image results. - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(provider), - _useState4 = _slicedToArray(_useState3, 2), - activeProvider = _useState4[0], - setActiveProvider = _useState4[1]; // Current provider. - var _useState5 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]), - _useState6 = _slicedToArray(_useState5, 2), - apiTested = _useState6[0], - setAPITested = _useState6[1]; // API key test results. - var _useState7 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState8 = _slicedToArray(_useState7, 2), - mounted = _useState8[0], - setMounted = _useState8[1]; // App mounted state. - var _useState9 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(true), - _useState10 = _slicedToArray(_useState9, 2), - loading = _useState10[0], - setLoading = _useState10[1]; // Loading state - var _useState11 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState12 = _slicedToArray(_useState11, 2), - loadingMore = _useState12[0], - setLoadingMore = _useState12[1]; // Load more state. - var _useState13 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState14 = _slicedToArray(_useState13, 2), - done = _useState14[0], - setDone = _useState14[1]; // Done state. - var _useState15 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(api_error), - _useState16 = _slicedToArray(_useState15, 2), - apiError = _useState16[0], - setAPIError = _useState16[1]; // API Error. - var _useState17 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState18 = _slicedToArray(_useState17, 2), - showAPILightbox = _useState18[0], - setShowAPILightbox = _useState18[1]; // Render API key lightbox. - var _useState19 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(searchDefaults), - _useState20 = _slicedToArray(_useState19, 2), - search = _useState20[0], - setSearch = _useState20[1]; - var _useState21 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]), - _useState22 = _slicedToArray(_useState21, 2), - suggestions = _useState22[0], - setSuggestions = _useState22[1]; - var _useState23 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(_constants_filters__WEBPACK_IMPORTED_MODULE_5__.FILTERS[activeProvider].filters), - _useState24 = _slicedToArray(_useState23, 2), - filterOptions = _useState24[0], - setFilterOptions = _useState24[1]; - var _useState25 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}), - _useState26 = _slicedToArray(_useState25, 2), - filters = _useState26[0], - setFilters = _useState26[1]; - var _useState27 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}), - _useState28 = _slicedToArray(_useState27, 2), - searchFilters = _useState28[0], - setSearchFilters = _useState28[1]; - - // Refs. - var _useInView = (0,react_intersection_observer__WEBPACK_IMPORTED_MODULE_26__.useInView)({ - rootMargin: '0px 0px' - }), - _useInView2 = _slicedToArray(_useInView, 2), - loadMoreRef = _useInView2[0], - inView = _useInView2[1]; - var photosRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var searchInputRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var msnryRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - - // WP Editor props. - var wpBlock = editor === 'block' ? true : false; - var blockSidebar = editor === 'sidebar' ? true : false; - var isBlockEditor = wpBlock || blockSidebar ? true : false; - var mediaModal = editor === 'media-modal' ? true : false; - var body = document.body; - var plugin = isBlockEditor ? container : container.parentNode.parentNode; - var wrapper = isBlockEditor ? container : plugin.querySelector('.instant-images-wrapper'); - - /** - * Get the initial set of photos for the current view (New/Popular/Filters/etc...). - * - * @param {boolean} reset Reset the current view. - * @since 3.0 - */ - function getPhotos() { - return _getPhotos.apply(this, arguments); - } - /** - * Load more photos in infinite scroll style. - * - * @since 3.0 - */ - function _getPhotos() { - _getPhotos = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() { - var _searchInputRef$curre2; - var reset, - params, - url, - sessionData, - response, - status, - headers, - apiResults, - _apiResults$error, - error, - _args = arguments; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - reset = _args.length > 0 && _args[0] !== undefined ? _args[0] : false; - if (!loadingMore) { - _context.next = 3; - break; - } - return _context.abrupt("return", false); - case 3: - if (!(!reset && (searchInputRef === null || searchInputRef === void 0 || (_searchInputRef$curre2 = searchInputRef.current) === null || _searchInputRef$curre2 === void 0 ? void 0 : _searchInputRef$curre2.value) !== '')) { - _context.next = 7; - break; - } - if (!(extended_activated && extended_license)) { - _context.next = 7; - break; - } - doSearch(searchInputRef.current.value); - return _context.abrupt("return"); - case 7: - setLoading(true); // Set loading state. - clearSearch(); // Reset search results. - - resetScrollPosition(); - page = 1; - - // Build URL. - params = (0,_functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__["default"])(activeProvider, filters); - url = (0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__["default"])('photos', params); // Get session storage. - sessionData = (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.getSession)(url); - if (!sessionData) { - _context.next = 18; - break; - } - // Display results from session. - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(sessionData), false, null); - _context.next = 37; - break; - case 18: - _context.next = 20; - return fetch(url); - case 20: - response = _context.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - _context.prev = 23; - _context.next = 26; - return response.json(); - case 26: - apiResults = _context.sent; - _apiResults$error = apiResults.error, error = _apiResults$error === void 0 ? null : _apiResults$error; - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(apiResults), false, error); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.saveSession)(url, apiResults); - _context.next = 37; - break; - case 32: - _context.prev = 32; - _context.t0 = _context["catch"](23); - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__["default"])(provider, status); - setLoading(false); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.deleteSession)(url); - case 37: - // Delay loading animatons for effect. - setTimeout(function () { - setLoading(false); - }, delay); - case 38: - case "end": - return _context.stop(); - } - }, _callee, null, [[23, 32]]); - })); - return _getPhotos.apply(this, arguments); - } - function loadMorePhotos() { - return _loadMorePhotos.apply(this, arguments); - } - /** - * Perform a photo search. - * - * @param {string} term Search term. - * @since 3.0 - */ - function _loadMorePhotos() { - _loadMorePhotos = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { - var searchQuery, type, activeFilters, loadmoreParams, params, url, sessionData, response, status, headers, apiResults, _apiResults$error2, error; - return _regeneratorRuntime().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - if (!(!mounted || loading || loadingMore || done)) { - _context2.next = 2; - break; - } - return _context2.abrupt("return"); - case 2: - setLoadingMore(true); - page = parseInt(page) + 1; - - // Get search query. - searchQuery = search !== null && search !== void 0 && search.active && search !== null && search !== void 0 && search.term ? { - term: search.term - } : {}; // Build URL. - type = search !== null && search !== void 0 && search.active ? 'search' : 'photos'; - activeFilters = search !== null && search !== void 0 && search.active ? searchFilters : filters; - loadmoreParams = _objectSpread(_objectSpread(_objectSpread({}, { - page: page - }), searchQuery), activeFilters); - params = (0,_functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__["default"])(activeProvider, loadmoreParams); - url = (0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__["default"])(type, params); // Get session storage. - sessionData = (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.getSession)(url); - if (!sessionData) { - _context2.next = 15; - break; - } - // Display results from session. - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(sessionData), true, null); - _context2.next = 34; - break; - case 15: - _context2.next = 17; - return fetch(url); - case 17: - response = _context2.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - _context2.prev = 20; - _context2.next = 23; - return response.json(); - case 23: - apiResults = _context2.sent; - _apiResults$error2 = apiResults.error, error = _apiResults$error2 === void 0 ? null : _apiResults$error2; - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(apiResults), true, error); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.saveSession)(url, apiResults); - _context2.next = 34; - break; - case 29: - _context2.prev = 29; - _context2.t0 = _context2["catch"](20); - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__["default"])(provider, status); - setLoadingMore(false); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.deleteSession)(url); - case 34: - case "end": - return _context2.stop(); - } - }, _callee2, null, [[20, 29]]); - })); - return _loadMorePhotos.apply(this, arguments); - } - function doSearch(_x) { - return _doSearch.apply(this, arguments); - } - /** - * Handle the display results. - * - * @param {Array} images Image array. - * @param {boolean} append Append images to existing results display. - * @param {string|null} error Error message. - */ - function _doSearch() { - _doSearch = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(term) { - var searchType, searchQuery, searchParams, params, url, sessionData, response, status, headers, apiResults, _apiResults$error3, error; - return _regeneratorRuntime().wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - setLoading(true); - resetScrollPosition(); - page = 1; // Reset current page num. - searchType = term.substring(0, 3) === 'id:' ? 'id' : 'term'; // Get search query. - searchQuery = searchType === 'id' ? { - id: term.replace('id:', '').replace(/\s+/, '') - } : { - term: term - }; // Build URL. - searchParams = _objectSpread(_objectSpread(_objectSpread({}, { - page: page - }), searchQuery), searchFilters); - params = (0,_functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__["default"])(activeProvider, searchParams); - url = (0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__["default"])('search', params); // Get session storage. - sessionData = (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.getSession)(url); - if (!sessionData) { - _context3.next = 14; - break; - } - // Display results from session. - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(sessionData), false, null); - setSearch({ - active: true, - term: term, - type: searchType, - results: (0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__.getSearchTotal)(sessionData) - }); - _context3.next = 35; - break; - case 14: - _context3.next = 16; - return fetch(url); - case 16: - response = _context3.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - _context3.prev = 19; - _context3.next = 22; - return response.json(); - case 22: - apiResults = _context3.sent; - _apiResults$error3 = apiResults.error, error = _apiResults$error3 === void 0 ? null : _apiResults$error3; - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(apiResults), false, error); - setSearch({ - active: true, - term: term, - type: searchType, - results: (0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__.getSearchTotal)(apiResults) - }); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.saveSession)(url, apiResults); - _context3.next = 35; - break; - case 29: - _context3.prev = 29; - _context3.t0 = _context3["catch"](19); - // Reset all search parameters. - setDone(true); - setLoading(false); - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__["default"])(provider, status); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.deleteSession)(url); - case 35: - searchInputRef.current.classList.remove(searchClass); - case 36: - case "end": - return _context3.stop(); - } - }, _callee3, null, [[19, 29]]); - })); - return _doSearch.apply(this, arguments); - } - function displayResults() { - var images = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - var append = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - var error = arguments.length > 2 ? arguments[2] : undefined; - checkResults(images === null || images === void 0 ? void 0 : images.length); - if (append) { - setResults(function (prevState) { - return [].concat(_toConsumableArray(prevState), _toConsumableArray(images)); - }); // Load more. - } else { - setResults(images); // Standard switch. - } - setAPIError(error); - } - - /** - * Handle the Photo Search. - * - * @param {Event} event The dispatched submit event. - * @since 3.0 - */ - function searchHandler(event) { - event.preventDefault(); - var term = searchInputRef.current.value; - if (term.length > 2) { - searchInputRef.current.classList.add(searchClass); - doSearch(term); - } else { - searchInputRef.current.focus(); - } - } - - /** - * Reset search results, settings and results view. - * - * @since 3.0 - */ - function clearSearch() { - var _searchInputRef$curre; - var term = (searchInputRef === null || searchInputRef === void 0 || (_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 ? void 0 : _searchInputRef$curre.value) || ''; - if (term) { - searchInputRef.current.value = ''; - } - setSearch(searchDefaults); - setSuggestions([]); - } - - /** - * Filter the photo listing. - * - * @param {string} filter The current filter key. - * @param {string} value The value to filter. - */ - function filterPhotos(filter, value) { - var newFilters = _objectSpread({}, filters); - if (newFilters[filter] && value === '#' || value === '' || value === 'all') { - delete newFilters[filter]; - } else { - newFilters[filter] = value; - } - setFilters(_objectSpread({}, newFilters)); - } - - /** - * Filter the search results. - * - * @param {string} filter The current filter key. - * @param {string} value The value to filter. - */ - function filterSearch(filter, value) { - var newSearchFilters = _objectSpread({}, searchFilters); - if (newSearchFilters[filter] && value === '#' || value === '' || value === 'all') { - delete newSearchFilters[filter]; - } else { - newSearchFilters[filter] = value; - } - setSearchFilters(_objectSpread({}, newSearchFilters)); - } - - /** - * Close the API Lightbox. - * - * @param {string} target The target provider to close the lightbox for. - * @since 4.5 - */ - function closeAPILightbox() { - var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - if (target) { - setActiveProvider(target); - } - setShowAPILightbox(false); - setLoading(false); - setAPIError(false); - body.classList.remove('overflow-hidden'); - } - - /** - * Switch API providers. - * - * @param {string} newProvider The provider to switch to. - * @since 4.5 - */ - function switchProvider(_x2) { - return _switchProvider.apply(this, arguments); - } - /** - * Get autocomplete search suggestions. - * - * @param {string} term The search term. - * @return {Array} The autocomplete suggestions. - */ - function _switchProvider() { - _switchProvider = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(newProvider) { - var response, status, headers; - return _regeneratorRuntime().wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - if (!(activeProvider === newProvider)) { - _context4.next = 2; - break; - } - return _context4.abrupt("return"); - case 2: - setLoading(true); - setAPIError(false); - setShowAPILightbox(false); - body.classList.remove('overflow-hidden'); - - // API verification - check API key for provider. - if (!(_constants_API__WEBPACK_IMPORTED_MODULE_4__.API[newProvider].requires_key && !apiTested.includes(newProvider))) { - _context4.next = 27; - break; - } - _context4.prev = 7; - _context4.next = 10; - return fetch((0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__.buildTestURL)(newProvider)); - case 10: - response = _context4.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - if (!(status !== 200)) { - _context4.next = 18; - break; - } - // Catch API errors and 401s. - setShowAPILightbox(newProvider); // Show API Lightbox. - setAPIError(true); - body.classList.add('overflow-hidden'); - return _context4.abrupt("return"); - case 18: - if (status === 200) { - // Valid API key - Add to array of tested providers. - setAPITested(function (prevState) { - return [].concat(_toConsumableArray(prevState), [newProvider]); - }); - } - _context4.next = 27; - break; - case 21: - _context4.prev = 21; - _context4.t0 = _context4["catch"](7); - // Catch all other errors. - setShowAPILightbox(newProvider); // Show API Lightbox. - body.classList.add('overflow-hidden'); - setAPIError(true); - return _context4.abrupt("return"); - case 27: - // Add slight delay for loading effect. - setTimeout(function () { - setFilterOptions(_constants_filters__WEBPACK_IMPORTED_MODULE_5__.FILTERS[newProvider].filters); // Update filter options. - setActiveProvider(newProvider); // Switch the provider. - }, delay); - case 28: - case "end": - return _context4.stop(); - } - }, _callee4, null, [[7, 21]]); - })); - return _switchProvider.apply(this, arguments); - } - function getSuggestions(_x3) { - return _getSuggestions.apply(this, arguments); - } - /** - * Renders the Masonry layout. - * - * @since 3.0 - */ - function _getSuggestions() { - _getSuggestions = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(term) { - var api_url; - return _regeneratorRuntime().wrap(function _callee5$(_context5) { - while (1) switch (_context5.prev = _context5.next) { - case 0: - if (!(!term || (term === null || term === void 0 ? void 0 : term.length) < 3)) { - _context5.next = 2; - break; - } - return _context5.abrupt("return"); - case 2: - // API endpoint URL. - api_url = instant_img_localize.root + "instant-images-extended/suggestions/?term=".concat(term); // Get suggestions. - _context5.next = 5; - return axios__WEBPACK_IMPORTED_MODULE_27__["default"].get(api_url).then(function (res) { - setSuggestions(res.data); - })["catch"](function (error) { - console.warn(error); - }); - case 5: - case "end": - return _context5.stop(); - } - }, _callee5); - })); - return _getSuggestions.apply(this, arguments); - } - function renderLayout() { - imagesLoaded(photosRef.current, function () { - if (!isBlockEditor) { - msnryRef.current = new (masonry_layout__WEBPACK_IMPORTED_MODULE_2___default())(photosRef.current, { - itemSelector: '.photo' - }); - photosRef.current.querySelectorAll('.photo').forEach(function (el) { - el.classList.add('in-view'); - }); - } - setTimeout(function () { - // Delay to allow for rendering and set up. - setLoading(false); - setLoadingMore(false); - if (!mounted) { - setMounted(true); - } - }, delay); - }); - } - - /** - * Reset the scroll position for the WP block only. - */ - function resetScrollPosition() { - if (wpBlock && photosRef !== null && photosRef !== void 0 && photosRef.current) { - photosRef === null || photosRef === void 0 || photosRef.current.scroll({ - top: 0, - left: 0, - behavior: 'smooth' - }); - } - } - - /** - * A checker to determine if there are remaining search results. - * - * @param {number} num Total search results. - * @since 3.0 - */ - function checkResults(num) { - setDone(parseInt(num) === 0 || num === undefined); - } - - /** - * Escape handler to close edit windows on photos. - * - * @param {Event} e The key event. - */ - function escFunction(e) { - var key = e.key; - if (key === 'Escape') { - var editing = photosRef.current.querySelectorAll('.edit-screen.editing'); - if (editing) { - _toConsumableArray(editing).forEach(function (element) { - element === null || element === void 0 || element.classList.remove('editing'); - }); - } - } - } - - /* Search callback. */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (!(search !== null && search !== void 0 && search.active)) { - // Reset search filters when search is false. - setSearchFilters({}); - } - }, [search]); // eslint-disable-line react-hooks/exhaustive-deps - - /* Search filters change callback. */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (mounted && search !== null && search !== void 0 && search.active) { - doSearch(search === null || search === void 0 ? void 0 : search.term); - } - }, [searchFilters]); // eslint-disable-line react-hooks/exhaustive-deps - - // Filters change callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (mounted) { - getPhotos(); - } - }, [filters]); // eslint-disable-line react-hooks/exhaustive-deps - - // Provider change callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - setFilterOptions(_constants_filters__WEBPACK_IMPORTED_MODULE_5__.FILTERS[activeProvider].filters); - setFilters({}); // Trigger filter change. - }, [activeProvider]); // eslint-disable-line react-hooks/exhaustive-deps - - // Scroll in-view callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - // Infinite scrolling. - loadMorePhotos(); - }, [inView]); // eslint-disable-line react-hooks/exhaustive-deps - - // Results callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - renderLayout(); - }, [results]); // eslint-disable-line react-hooks/exhaustive-deps - - // Initial page load. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - setLoading(false); - wrapper.classList.add('loaded'); - - // Block editor, get initial set of photos. - if (isBlockEditor) { - getPhotos(); - } - // Add global escape listener. - document.addEventListener('keydown', escFunction, false); - return function () { - document.removeEventListener('keydown', escFunction, false); - }; - }, []); // eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement(_common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__.PluginProvider, { - value: { - provider: activeProvider, - wpBlock: wpBlock, - mediaModal: mediaModal, - blockSidebar: blockSidebar, - clientId: clientId, - search: search, - apiError: apiError, - getPhotos: getPhotos, - searchHandler: searchHandler, - filterSearch: filterSearch, - suggestions: suggestions, - getSuggestions: getSuggestions - } - }, wpBlock ? /*#__PURE__*/React.createElement(_editor_block_components_Header__WEBPACK_IMPORTED_MODULE_6__["default"], { - switchProvider: switchProvider - }) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_ProviderNav__WEBPACK_IMPORTED_MODULE_18__["default"], { - switchProvider: switchProvider - }), /*#__PURE__*/React.createElement(_cta_Extended__WEBPACK_IMPORTED_MODULE_23__.ExtendedCTA, null)), /*#__PURE__*/React.createElement(_RestAPIError__WEBPACK_IMPORTED_MODULE_19__["default"], null), /*#__PURE__*/React.createElement("div", { - className: "control-nav" - }, /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('control-nav--filters-wrap', apiError || search !== null && search !== void 0 && search.active ? 'inactive' : null) - }, filterOptions && (_Object$entries = Object.entries(filterOptions)) !== null && _Object$entries !== void 0 && _Object$entries.length ? /*#__PURE__*/React.createElement("div", { - className: "control-nav--filters" - }, Object.entries(filterOptions).map(function (_ref, index) { - var _ref2 = _slicedToArray(_ref, 2), - key = _ref2[0], - filter = _ref2[1]; - return /*#__PURE__*/React.createElement(_Filter__WEBPACK_IMPORTED_MODULE_15__["default"], { - key: "".concat(activeProvider, "-").concat(index, "-").concat(key), - data: filter, - filterKey: key, - handler: filterPhotos - }); - })) : null), /*#__PURE__*/React.createElement(_search_SearchForm__WEBPACK_IMPORTED_MODULE_24__["default"], { - ref: searchInputRef - })), /*#__PURE__*/React.createElement("div", { - id: "photo-listing", - className: loading ? 'loading' : null - }, /*#__PURE__*/React.createElement(_search_SearchHeader__WEBPACK_IMPORTED_MODULE_25__["default"], null), wpBlock ? /*#__PURE__*/React.createElement(_ResultsWPBlock__WEBPACK_IMPORTED_MODULE_21__["default"], { - ref: photosRef, - data: results, - done: done, - loadMorePhotos: loadMorePhotos - }) : /*#__PURE__*/React.createElement(_Results__WEBPACK_IMPORTED_MODULE_20__["default"], { - ref: photosRef, - data: results - }), /*#__PURE__*/React.createElement(_NoResults__WEBPACK_IMPORTED_MODULE_17__["default"], { - total: search === null || search === void 0 ? void 0 : search.results, - is_search: search === null || search === void 0 ? void 0 : search.active - }), /*#__PURE__*/React.createElement(_LoadMore__WEBPACK_IMPORTED_MODULE_16__["default"], { - ref: loadMoreRef, - loadMorePhotos: loadMorePhotos, - loading: loadingMore, - done: done - }), /*#__PURE__*/React.createElement(_APILightbox__WEBPACK_IMPORTED_MODULE_13__["default"], { - provider: showAPILightbox, - callback: closeAPILightbox - }), /*#__PURE__*/React.createElement(_ErrorLightbox__WEBPACK_IMPORTED_MODULE_14__["default"], null), /*#__PURE__*/React.createElement(_Tooltip__WEBPACK_IMPORTED_MODULE_22__["default"], null)))); -} - -/***/ }), - -/***/ "./src/js/components/LoadMore.js": -/*!***************************************!*\ - !*** ./src/js/components/LoadMore.js ***! - \***************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); - - - - -/** - * Render the LoadMore component. - * - * @return {JSX.Element} The LoadMore component. - */ -var LoadMore = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var loadMorePhotos = props.loadMorePhotos, - loading = props.loading, - done = props.done; - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('load-more-wrap', loading ? 'loading' : null, done ? 'done' : null), - ref: ref - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button", - onClick: function onClick() { - return loadMorePhotos(); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Load More Images', 'instant-images'))); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LoadMore); - -/***/ }), - -/***/ "./src/js/components/NoResults.js": -/*!****************************************!*\ - !*** ./src/js/components/NoResults.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ NoResults) -/* harmony export */ }); -/** - * Render the NoResults component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The NoResults component. - */ -function NoResults(props) { - var _props$total = props.total, - total = _props$total === void 0 ? 0 : _props$total, - _props$is_search = props.is_search, - is_search = _props$is_search === void 0 ? false : _props$is_search; - if (!is_search || is_search && total >= 1) { - // Bail if not search or search total is greater than 1. - return null; - } - return /*#__PURE__*/React.createElement("div", { - className: "instant-images-no-results" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", null, instant_img_localize.no_results, " "), /*#__PURE__*/React.createElement("p", null, instant_img_localize.no_results_desc, " "))); -} - -/***/ }), - -/***/ "./src/js/components/Photo.js": -/*!************************************!*\ - !*** ./src/js/components/Photo.js ***! - \************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Photo) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _editor_utils_insertImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../editor/utils/insertImage */ "./src/js/editor/utils/insertImage.js"); -/* harmony import */ var _editor_utils_setFeaturedImage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../editor/utils/setFeaturedImage */ "./src/js/editor/utils/setFeaturedImage.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _functions_providers_unsplash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../functions/providers/unsplash */ "./src/js/functions/providers/unsplash.js"); -/* harmony import */ var _functions_generateAttribution__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../functions/generateAttribution */ "./src/js/functions/generateAttribution.js"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - - - - -/** - * Render the Photo component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The Photo component. - */ -function Photo(props) { - var result = props.result, - setInactive = props.setInactive; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider, - _usePluginContext$wpB = _usePluginContext.wpBlock, - wpBlock = _usePluginContext$wpB === void 0 ? false : _usePluginContext$wpB, - _usePluginContext$med = _usePluginContext.mediaModal, - mediaModal = _usePluginContext$med === void 0 ? false : _usePluginContext$med, - _usePluginContext$blo = _usePluginContext.blockSidebar, - blockSidebar = _usePluginContext$blo === void 0 ? false : _usePluginContext$blo, - clientId = _usePluginContext.clientId; - var id = result.id, - filename = result.id, - permalink = result.permalink, - title = result.title, - alt = result.alt, - caption = result.caption, - attribution = result.attribution, - _result$extension = result.extension, - extension = _result$extension === void 0 ? 'jpg' : _result$extension, - likes = result.likes, - dimensions = result.dimensions, - urls = result.urls, - user = result.user; - - // Deconstruct image URLs. - var thumb = urls.thumb, - full = urls.full, - download_url = urls.download_url; - - // Deconstruct user data. - var user_name = user.name, - user_photo = user.photo, - user_url = user.url; - var container = document.querySelector('.instant-img-container'); - var likeDisplay = parseInt(likes) === 1 ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Like', 'instant-images') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Likes', 'instant-images'); - var _instant_img_localize = instant_img_localize, - _instant_img_localize2 = _instant_img_localize.attribution_hook, - attribution_hook = _instant_img_localize2 === void 0 ? false : _instant_img_localize2, - _instant_img_localize3 = _instant_img_localize.auto_attribution, - auto_attribution = _instant_img_localize3 === void 0 ? false : _instant_img_localize3; - - // Get the attribution text. - var imageAttribution = attribution_hook ? (0,_functions_generateAttribution__WEBPACK_IMPORTED_MODULE_7__["default"])(attribution_hook, provider, permalink, user) : attribution; - var imageCaption = auto_attribution === '1' ? imageAttribution : caption; - - // Photo state. - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ - filename: filename, - title: title, - alt: alt, - caption: imageCaption - }), - _useState2 = _slicedToArray(_useState, 2), - imageDetails = _useState2[0], - setImageDetails = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState4 = _slicedToArray(_useState3, 2), - inProgress = _useState4[0], - setInProgress = _useState4[1]; // inProgress state. - var _useState5 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('loaded'), - _useState6 = _slicedToArray(_useState5, 2), - status = _useState6[0], - setStatus = _useState6[1]; // Status state. - var _useState7 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(''), - _useState8 = _slicedToArray(_useState7, 2), - editURL = _useState8[0], - setEditURL = _useState8[1]; // Edit URL state. - - // Refs. - var photo = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var image = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var upload = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var editScreen = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var captionRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - - // Gutenberg. - var setAsFeaturedImage = false; - var insertIntoPost = false; - - /** - * Function to trigger the image download. - * - * @since 4.3 - */ - function download() { - if (inProgress || status === 'success' || status === 'uploaded') { - return false; // Exit if uploading, uploaded or success. - } - var target = upload === null || upload === void 0 ? void 0 : upload.current; - setInProgress(true); - setStatus('uploading'); - if (wpBlock) { - setInactive(true); // Make Instant Images inactive after selecting an image. - } - - // API URL - var api = instant_img_localize.root + 'instant-images/download/'; - - // Data Params - var data = { - provider: provider, - id: target.getAttribute('data-id'), - image_url: target.getAttribute('data-url'), - filename: target.getAttribute('data-id'), - extension: extension, - custom_filename: target.getAttribute('data-filename'), - title: target.getAttribute('data-title'), - alt: target.getAttribute('data-alt'), - caption: target.getAttribute('data-caption'), - parent_id: instant_img_localize.parent_id, - lang: instant_img_localize.lang - }; - - // Config Params - var config = { - credentials: 'same-origin', - headers: { - 'X-WP-Nonce': instant_img_localize.nonce, - 'Content-Type': 'application/json' - } - }; - axios__WEBPACK_IMPORTED_MODULE_9__["default"].post(api, JSON.stringify(data), config).then(function (res) { - var response = res.data; - if (response) { - // Successful response from server - var success = response.success; - var attachment = response.attachment; - var admin_url = response.admin_url; - var msg = response.msg; - if (success) { - var edit_url = "".concat(admin_url, "post.php?post=").concat(attachment.id, "&action=edit"); // Edit URL. - setEditURL(edit_url); - uploadComplete(target, msg, attachment.id); // Success/Upload Complete - - // Trigger a download at Unsplash. - if (provider === 'unsplash' && download_url) { - (0,_functions_providers_unsplash__WEBPACK_IMPORTED_MODULE_6__.unsplashDownload)(download_url); - } - - /** - * Gutenberg options. - */ - - // Set Featured Image via Sidebar. - if (blockSidebar && setAsFeaturedImage) { - (0,_editor_utils_setFeaturedImage__WEBPACK_IMPORTED_MODULE_4__["default"])(attachment); - setAsFeaturedImage = false; - closeMediaModal(); - } - - // Insert Image via Sidebar. - if (blockSidebar && insertIntoPost) { - setTimeout(function () { - // Delay for effect. - (0,_editor_utils_insertImage__WEBPACK_IMPORTED_MODULE_3__["default"])(attachment); - }, 250); - closeMediaModal(); - insertIntoPost = false; - } - - // Insert Image via WP Block. - if (wpBlock && clientId) { - setStatus('uploaded'); - setTimeout(function () { - // Delay for effect. - (0,_editor_utils_insertImage__WEBPACK_IMPORTED_MODULE_3__["default"])(attachment, clientId); - }, 350); - closeMediaModal(); - insertIntoPost = false; - } - - /** - * Media Modal. - * If is media popup, redirect user to media-upload settings. - */ - if (container.dataset.mediaPopup === 'true' && !blockSidebar) { - window.location = 'media-upload.php?type=image&tab=library&attachment_id=' + attachment.id; - } - } else { - // Error - uploadError(target, msg); - } - } else { - // Error - uploadError(target, instant_img_localize.error_upload); - } - })["catch"](function (error) { - console.warn(error); - }); - } - - /** - * Upload complete function. - * - * @param {Element} target Clicked item. - * @param {string} msg Success Msg. - * @param {string} imageID Attachment id. - * @since 3.0 - */ - function uploadComplete(target, msg, imageID) { - if (!(photo !== null && photo !== void 0 && photo.current)) { - return; - } - setImageTitle(target, msg); - setStatus('uploaded'); - setInProgress(false); - - // Remove uploaded status after 3.5 seconds. - setTimeout(function () { - setStatus('success'); - }, 3500); - - // Refresh Media Router/Modal. - refreshMediaModal(imageID); - } - - /** - * Handler to send user to edit photo link after upload. - * - * @since 5.2.0 - */ - function editAfterUpload() { - if (editURL) { - window.location = editURL; - } - } - - /** - * Function used to trigger a download and then set as featured image - * - * @param {Element} e The clicked element. - * @since 4.0 - */ - function setFeaturedImageClick(e) { - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - if (upload.current) { - setAsFeaturedImage = true; - upload.current.click(); - } - } - - /** - * Function used to insert an image directly into the block (Gutenberg) editor. - * - * @param {Element} e The clicked element. - * @since 4.0 - */ - function insertImageIntoPost(e) { - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - if (upload.current) { - insertIntoPost = true; - upload.current.click(); - } - } - - /** - * Refresh Media Modal and select item after it's been uploaded. - * - * @param {string} modalID The media modal ID. - * @since 4.3 - */ - function refreshMediaModal(modalID) { - if (mediaModal && wp.media && wp.media.frame && wp.media.frame.el) { - var mediaModalEl = wp.media.frame.el; - var mediaTab = mediaModalEl.querySelector('#menu-item-browse'); - if (mediaTab) { - // Open the 'Media Library' tab. - mediaTab.click(); - } - - // Delay to allow for tab switching - setTimeout(function () { - if (wp.media.frame.content.get() !== null) { - // Force a refresh of the mdeia modal content. - wp.media.frame.content.get().collection._requery(true); - } - - // Select the attached that was just uploaded. - var selection = wp.media.frame.state().get('selection'); - var selected = parseInt(modalID); - selection.reset(selected ? [wp.media.attachment(selected)] : []); - }, 100); - } - } - - /** - * Function runs when error occurs on upload or resize. - * - * @param {Element} target Current clicked item. - * @param {string} msg Error Msg. - * @since 3.0 - */ - function uploadError(target, msg) { - setImageTitle(target, msg); - setInProgress(false); - setStatus('error'); - setInactive(false); - console.warn(msg); - } - - /** - * Set the title attribute of target. - * - * @param {Element} target Clicked element. - * @param {string} msg Title message from JSON. - * @since 3.0 - */ - function setImageTitle(target, msg) { - target.setAttribute('title', msg); // Remove 'Click to upload...', set new value - } - - /** - * Displays the edit screen. - * - * @param {Element} e The target element. - * @since 3.2 - */ - function showEditScreen(e) { - e.preventDefault(); - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - - // Get all open edit screens and close them. - var openEdits = document.querySelectorAll('.edit-screen.editing'); - if (openEdits) { - openEdits.forEach(function (edit) { - edit.classList.remove('editing'); - }); - } - - // Show edit screen - editScreen.current.classList.add('editing'); - - // Set focus on edit screen - setTimeout(function () { - editScreen.current.focus({ - preventScroll: true - }); - }, 150); - } - - /** - * Handles the change event for the edit screen. - * - * @param {Element} e The target element. - * @since 3.2 - */ - function handleEditChange(e) { - var target = e.target.name; - switch (target) { - case 'filename': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - filename: e.target.value - })); - break; - case 'title': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - title: e.target.value - })); - break; - case 'alt': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - alt: e.target.value - })); - break; - case 'caption': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - caption: e.target.value - })); - break; - } - } - - /** - * Handles the Upload event from the edit screen. - * - * @since 3.2 - */ - function uploadNow() { - editScreen.current.classList.remove('editing'); // Hide edit screen. - upload.current.click(); // Trigger click. - } - - /** - * Cancel event for the edit screen. - * - * @since 3.2 - */ - function cancelEdit() { - // Reset image state. - setImageDetails({ - filename: filename, - title: title, - alt: alt, - caption: imageCaption - }); - - // Hide edit screen - editScreen.current.classList.remove('editing'); - - // Set focus back on photo. - upload.current.focus({ - preventScrol: true - }); - } - - /** - * Close the media modal after an action. - * - * @since 4.3 - */ - function closeMediaModal() { - var mediaModalEl = document.querySelector('.media-modal'); - if (mediaModalEl) { - var closeBtn = mediaModalEl.querySelector('button.media-modal-close'); - if (!closeBtn) { - return false; - } - closeBtn.click(); - } - } - - /** - * Handles adding attribution for images. - * - * @param {Element} e The target element. - * @since 4.5 - */ - function addAttribution(e) { - e.preventDefault(); - captionRef.current.value = imageAttribution; // Set form value. - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - caption: imageAttribution - })); // Set caption state. - } - - /** - * Show a GIF preview image. - * Giphy only. - * - * @param {boolean} show Show a preview. - */ - function showPreview(show) { - if (!provider === 'giphy') { - return; - } - if (show) { - image.current.src = full; - } else { - image.current.src = thumb; - } - } - return /*#__PURE__*/React.createElement("article", { - className: "photo", - ref: photo - }, /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('photo-wrap', "photo-".concat(status)) - }, /*#__PURE__*/React.createElement("div", { - className: "img-wrap" - }, /*#__PURE__*/React.createElement("button", { - className: "photo-upload", - ref: upload, - "data-id": id, - "data-url": full, - "data-filename": imageDetails.filename, - "data-title": imageDetails.title, - "data-alt": imageDetails.alt, - "data-caption": imageDetails.caption, - "aria-label": wpBlock ? instant_img_localize.insert_into_post : instant_img_localize.upload, - onClick: function onClick() { - return download(); - }, - onMouseEnter: function onMouseEnter() { - return showPreview(true); - }, - onMouseLeave: function onMouseLeave() { - return showPreview(false); - } - }, /*#__PURE__*/React.createElement("img", { - src: thumb, - alt: alt, - className: status, - ref: image - })), /*#__PURE__*/React.createElement("div", { - className: "photo-controls" - }, /*#__PURE__*/React.createElement("a", { - target: "_blank", - className: "user fade", - href: user_url, - rel: "noopener noreferrer", - title: "".concat(instant_img_localize.view_all, " @ ").concat(user_name) - }, /*#__PURE__*/React.createElement("div", { - className: "user-wrap" - }, (user_photo === null || user_photo === void 0 ? void 0 : user_photo.length) > 0 && /*#__PURE__*/React.createElement("img", { - className: "user-wrap--photo", - src: user_photo, - alt: "" - }), user_name)), /*#__PURE__*/React.createElement("div", { - className: "photo-options" - }, blockSidebar && !editURL ? /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "set-featured fade", - "data-title": instant_img_localize.set_as_featured, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - onClick: function onClick(e) { - return setFeaturedImageClick(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-picture-o", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.set_as_featured)), /*#__PURE__*/React.createElement("button", { - type: "button", - className: "insert fade", - "data-title": instant_img_localize.insert_into_post, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - onClick: function onClick(e) { - return insertImageIntoPost(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-plus", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.insert_into_post))) : null, !!wpBlock && /*#__PURE__*/React.createElement("button", { - type: "button", - className: "insert fade", - "data-title": instant_img_localize.insert_into_post, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - onClick: function onClick(e) { - return insertImageIntoPost(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-plus", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.insert_into_post)), editURL ? /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return editAfterUpload(); - }, - className: "edit-photo-admin fade", - "data-title": instant_img_localize.edit_upload, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-pencil", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.edit_upload)) : /*#__PURE__*/React.createElement("button", { - onClick: function onClick(e) { - return showEditScreen(e); - }, - className: "edit-photo fade", - "data-title": instant_img_localize.edit_details, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-cog", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.edit_details)))), /*#__PURE__*/React.createElement("div", { - className: "photo-meta" - }, likes ? /*#__PURE__*/React.createElement("span", { - className: "likes tooltip--above", - "data-title": likes + ' ' + likeDisplay, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-heart heart-like", - "aria-hidden": "true" - }), " ", likes) : null, /*#__PURE__*/React.createElement("a", { - className: "tooltip--above", - href: permalink, - "data-title": "".concat(instant_img_localize.open_external, " ").concat((0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.capitalizeFirstLetter)(provider)), - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - rel: "noopener noreferrer", - target: "_blank" - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-external-link", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, "".concat(instant_img_localize.open_external, " ").concat((0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.capitalizeFirstLetter)(provider)))))), /*#__PURE__*/React.createElement("div", { - className: "edit-screen", - tabIndex: "0", - ref: editScreen - }, /*#__PURE__*/React.createElement("div", { - className: "edit-screen--title" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", { - className: "heading" - }, instant_img_localize.edit_details), dimensions && dimensions.length > 0 && /*#__PURE__*/React.createElement("p", { - className: "dimensions" - }, dimensions)), /*#__PURE__*/React.createElement("div", { - className: "preview", - style: { - backgroundImage: "url(".concat(thumb, ")") - } - })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_filename, ":"), /*#__PURE__*/React.createElement("input", { - type: "text", - name: "filename", - "data-original": filename, - placeholder: imageDetails.filename, - value: imageDetails.filename, - onChange: function onChange(e) { - return handleEditChange(e); - } - }), /*#__PURE__*/React.createElement("em", null, ".", extension)), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_title, ":"), /*#__PURE__*/React.createElement("input", { - type: "text", - name: "title", - "data-original": title, - placeholder: title, - value: imageDetails.title || '', - onChange: function onChange(e) { - return handleEditChange(e); - } - })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_alt, ":"), /*#__PURE__*/React.createElement("input", { - type: "text", - name: "alt", - "data-original": alt, - value: imageDetails.alt || '', - onChange: function onChange(e) { - return handleEditChange(e); - } - })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_caption, ":"), /*#__PURE__*/React.createElement("textarea", { - rows: "4", - name: "caption", - "data-original": imageCaption, - onChange: function onChange(e) { - return handleEditChange(e); - }, - value: imageDetails.caption || '', - ref: captionRef - })), imageAttribution ? /*#__PURE__*/React.createElement("div", { - className: "add-attribution-row" - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick(e) { - return addAttribution(e); - }, - type: "button" - }, instant_img_localize.attribution)) : null, /*#__PURE__*/React.createElement("div", { - className: "edit-screen--controls" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button button-secondary", - onClick: function onClick(e) { - return cancelEdit(e); - } - }, instant_img_localize.cancel), ' ', "\xA0", /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button button-primary", - onClick: function onClick() { - return uploadNow(); - } - }, wpBlock ? instant_img_localize.insert_into_post : instant_img_localize.upload_now))), /*#__PURE__*/React.createElement("div", { - className: "photo-status" - }))); -} - -/***/ }), - -/***/ "./src/js/components/ProviderIcons.js": -/*!********************************************!*\ - !*** ./src/js/components/ProviderIcons.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ GiphyIcon: () => (/* binding */ GiphyIcon), -/* harmony export */ OpenverseIcon: () => (/* binding */ OpenverseIcon), -/* harmony export */ PexelsIcon: () => (/* binding */ PexelsIcon), -/* harmony export */ PixabayIcon: () => (/* binding */ PixabayIcon), -/* harmony export */ UnsplashIcon: () => (/* binding */ UnsplashIcon), -/* harmony export */ getProviderIcon: () => (/* binding */ getProviderIcon) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); - - -/** - * Return the provider icon. - * - * @param {string} provider The provider. - * @return {JSX.Element} The provider icon. - */ -function getProviderIcon(provider) { - if (!provider) { - return null; - } - return _constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider.toLowerCase()].icon ? _constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider.toLowerCase()].icon() : null; -} - -/** - * Giphy Icon. - */ -function GiphyIcon() { - return /*#__PURE__*/React.createElement("svg", { - height: "35", - width: "32", - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 32 35" - }, /*#__PURE__*/React.createElement("g", { - fill: "none", - fillRule: "evenodd" - }, /*#__PURE__*/React.createElement("path", { - d: "M4 4h20v27H4z", - fill: "#000" - }), /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", { - d: "M0 3h4v29H0z", - fill: "#04ff8e" - }), /*#__PURE__*/React.createElement("path", { - d: "M24 11h4v21h-4z", - fill: "#8e2eff" - }), /*#__PURE__*/React.createElement("path", { - d: "M0 31h28v4H0z", - fill: "#00c5ff" - }), /*#__PURE__*/React.createElement("path", { - d: "M0 0h16v4H0z", - fill: "#fff152" - }), /*#__PURE__*/React.createElement("path", { - d: "M24 8V4h-4V0h-4v12h12V8", - fill: "#ff5b5b" - }), /*#__PURE__*/React.createElement("path", { - d: "M24 16v-4h4", - fill: "#551c99" - })), /*#__PURE__*/React.createElement("path", { - d: "M16 0v4h-4", - fill: "#999131" - }))); -} - -/** - * Unsplash Icon. - */ -function UnsplashIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32", - height: "32", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("path", { - d: "M10 9V0H22V9H10ZM22 14H32V32H0V14H10V23H22V14Z", - fill: "black" - })); -} - -/** - * Pixabay Icon. - */ -function PixabayIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32", - height: "32", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("g", { - clipPath: "url(#clip0_307_143)" - }, /*#__PURE__*/React.createElement("path", { - d: "M0 0V32H32V0H0Z", - fill: "#48A947" - }), /*#__PURE__*/React.createElement("path", { - d: "M6.83734 22.3147V28C5.93067 28.0427 5.02401 28.032 4.11734 27.9787C4.09601 27.7014 4.06401 27.4667 4.06401 27.2427C4.06401 23.2427 4.05334 19.2534 4.06401 15.2534C4.07467 12.032 5.97334 9.32269 8.85334 8.37335C13.1307 6.95469 17.4507 10.048 17.8453 14.3894C18.144 17.6534 16.4267 20.5547 13.568 21.7814C12.6507 22.176 11.6907 22.304 10.7093 22.304C9.45067 22.3147 8.21334 22.3147 6.83734 22.3147ZM6.84801 19.4454C8.24534 19.4454 9.54667 19.424 10.848 19.4454C13.1627 19.488 14.816 17.76 15.104 15.712C15.424 13.3654 13.7813 11.2107 11.4453 10.88H11.4347C9.25867 10.592 7.06134 12.2774 6.88001 14.528C6.74134 16.128 6.84801 17.728 6.84801 19.4454Z", - fill: "#F9FBF9" - }), /*#__PURE__*/React.createElement("path", { - d: "M25.4827 14.9334L30.656 22.2081H27.3067L23.4667 16.9494C22.0694 18.6881 20.9067 20.4907 19.584 22.2081H16.2454L21.408 14.9334L16.8107 8.04272H20.16L23.4454 12.9494L26.7307 8.04272H30.0694L25.4827 14.9334Z", - fill: "#FAFCFA" - }), /*#__PURE__*/React.createElement("path", { - d: "M6.848 19.4453C6.848 17.7279 6.74134 16.1173 6.86934 14.5386C7.05067 12.2879 9.248 10.6026 11.424 10.8906C13.7707 11.2106 15.4133 13.3653 15.0933 15.7119C14.816 17.7599 13.152 19.4879 10.8373 19.4453C9.54667 19.4239 8.24534 19.4453 6.848 19.4453Z", - fill: "#4AA949" - })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", { - id: "clip0_307_143" - }, /*#__PURE__*/React.createElement("rect", { - width: "32", - height: "32", - fill: "white" - })))); -} - -/** - * Openverse Icon. - */ -function OpenverseIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32", - height: "32", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("path", { - d: "M25.8578 14.32C29.6708 14.32 32.7618 11.1144 32.7618 7.16C32.7618 3.20564 29.6708 0 25.8578 0C22.0448 0 18.9539 3.20564 18.9539 7.16C18.9539 11.1144 22.0448 14.32 25.8578 14.32Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M0.761841 7.16C0.761841 11.1 3.84742 14.32 7.66584 14.32V0C3.84742 0 0.761841 3.2 0.761841 7.16Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M9.85791 7.16C9.85791 11.1 12.9435 14.32 16.7619 14.32V0C12.9628 0 9.85791 3.2 9.85791 7.16Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M25.8578 31.9399C29.6708 31.9399 32.7618 28.7343 32.7618 24.78C32.7618 20.8256 29.6708 17.62 25.8578 17.62C22.0448 17.62 18.9539 20.8256 18.9539 24.78C18.9539 28.7343 22.0448 31.9399 25.8578 31.9399Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M9.85791 24.7801C9.85791 28.72 12.9435 31.9401 16.7619 31.9401V17.64C12.9628 17.64 9.85791 20.84 9.85791 24.7801Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M0.761841 24.84C0.761841 28.8 3.84742 32 7.66584 32V17.7C3.84742 17.7 0.761841 20.9 0.761841 24.84Z", - fill: "#000000" - })); -} - -/** - * Pexels Icon. - */ -function PexelsIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32px", - height: "32px", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("path", { - d: "M2 0h28a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2z", - fill: "#05A081" - }), /*#__PURE__*/React.createElement("path", { - d: "M13 21h3.863v-3.752h1.167a3.124 3.124 0 1 0 0-6.248H13v10zm5.863 2H11V9h7.03a5.124 5.124 0 0 1 .833 10.18V23z", - fill: "#fff" - })); -} - -/***/ }), - -/***/ "./src/js/components/ProviderNav.js": -/*!******************************************!*\ - !*** ./src/js/components/ProviderNav.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ ProviderNav) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _ProviderIcons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ProviderIcons */ "./src/js/components/ProviderIcons.js"); -/* harmony import */ var _img_logos_giphy_powered_png__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../img/logos/giphy-powered.png */ "./src/img/logos/giphy-powered.png"); - - - - - -var providers = _constants_API__WEBPACK_IMPORTED_MODULE_2__.API.providers; - -/** - * Render the ProviderNav component. - * - * @param {Object} props The component props. - * @param {Object} props.switchProvider The function to switch the provider. - * @return {JSX.Element} The ProviderNav component. - */ -function ProviderNav(_ref) { - var switchProvider = _ref.switchProvider; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - provider = _usePluginContext.provider; - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, !!(providers !== null && providers !== void 0 && providers.length) && /*#__PURE__*/React.createElement("nav", { - className: "provider-nav" - }, providers.map(function (item, index) { - return /*#__PURE__*/React.createElement("div", { - key: "provider-".concat(index) - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return switchProvider(item.toLowerCase()); - }, - className: provider === item.toLowerCase() ? 'provider-nav--btn active' : 'provider-nav--btn' - }, (0,_ProviderIcons__WEBPACK_IMPORTED_MODULE_3__.getProviderIcon)(item), /*#__PURE__*/React.createElement("span", null, item), _constants_API__WEBPACK_IMPORTED_MODULE_2__.API[item.toLowerCase()]["new"] && /*#__PURE__*/React.createElement("span", { - className: "provider-nav--new" - }, instant_img_localize["new"]))); - }), provider === 'giphy' ? /*#__PURE__*/React.createElement("div", { - className: "giphy-powered" - }, /*#__PURE__*/React.createElement("a", { - href: "https://giphy.com", - target: "_blank", - rel: "noreferrer" - }, /*#__PURE__*/React.createElement("img", { - src: _img_logos_giphy_powered_png__WEBPACK_IMPORTED_MODULE_4__, - alt: "Powered by Giphy" - }))) : null)); -} - -/***/ }), - -/***/ "./src/js/components/RestAPIError.js": -/*!*******************************************!*\ - !*** ./src/js/components/RestAPIError.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ RestAPIError) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - -/** - * Render the RestAPIError component. - * - * @return {JSX.Element} The RestAPIError component. - */ -function RestAPIError() { - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(true), - _useState2 = _slicedToArray(_useState, 2), - access = _useState2[0], - setAccess = _useState2[1]; - - /** - * Test users access to the REST API endpoint. - * - * @since 3.2 - */ - function test() { - var testURL = instant_img_localize.root + 'instant-images/test/'; - var restAPITest = new XMLHttpRequest(); - restAPITest.open('POST', testURL, true); - restAPITest.setRequestHeader('X-WP-Nonce', instant_img_localize.nonce); - restAPITest.setRequestHeader('Content-Type', 'application/json'); - restAPITest.send(); - restAPITest.onload = function () { - if (restAPITest.status >= 200 && restAPITest.status < 400) { - var response = JSON.parse(restAPITest.response); - var success = response.success; - if (!success) { - setAccess(false); - } - } else { - setAccess(false); - } - }; - restAPITest.onerror = function (errorMsg) { - console.warn(errorMsg); - setAccess(false); - }; - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - test(); - }, []); - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, !access ? /*#__PURE__*/React.createElement("div", { - className: "error-messaging" - }, /*#__PURE__*/React.createElement("strong", null, instant_img_localize.error_restapi), instant_img_localize.error_restapi_desc) : null); -} - -/***/ }), - -/***/ "./src/js/components/Results.js": -/*!**************************************!*\ - !*** ./src/js/components/Results.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _Photo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Photo */ "./src/js/components/Photo.js"); -/* harmony import */ var _Sponsor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Sponsor */ "./src/js/components/Sponsor.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - -/** - * Render the Results component. - * - * @return {JSX.Element} The Results component. - */ -var Results = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var data = props.data; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - inactive = _useState2[0], - setInactive = _useState2[1]; - return /*#__PURE__*/React.createElement("div", { - id: "photos", - className: inactive ? 'inactive' : null, - ref: ref - }, !!(data !== null && data !== void 0 && data.length) && data.map(function (result, index) { - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, { - key: "".concat(result.id, "-").concat(index) - }, (result === null || result === void 0 ? void 0 : result.type) === 'instant-images-ad' ? /*#__PURE__*/React.createElement(_Sponsor__WEBPACK_IMPORTED_MODULE_2__["default"], { - result: result - }) : /*#__PURE__*/React.createElement(_Photo__WEBPACK_IMPORTED_MODULE_1__["default"], { - result: result, - type: result === null || result === void 0 ? void 0 : result.type, - setInactive: setInactive - })); - })); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Results); - -/***/ }), - -/***/ "./src/js/components/ResultsWPBlock.js": -/*!*********************************************!*\ - !*** ./src/js/components/ResultsWPBlock.js ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var react_intersection_observer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-intersection-observer */ "./node_modules/react-intersection-observer/dist/index.mjs"); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _editor_block_components_Instructions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../editor/block/components/Instructions */ "./src/js/editor/block/components/Instructions.js"); -/* harmony import */ var _editor_block_components_LoadMore__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../editor/block/components/LoadMore */ "./src/js/editor/block/components/LoadMore.js"); -/* harmony import */ var _Photo__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Photo */ "./src/js/components/Photo.js"); -/* harmony import */ var _Sponsor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Sponsor */ "./src/js/components/Sponsor.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - -/** - * Render the Results component. - * - * @return {JSX.Element} The Results component. - */ -var ResultsWPBlock = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var data = props.data, - _props$done = props.done, - done = _props$done === void 0 ? false : _props$done, - loadMorePhotos = props.loadMorePhotos; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - _usePluginContext$wpB = _usePluginContext.wpBlock, - wpBlock = _usePluginContext$wpB === void 0 ? false : _usePluginContext$wpB; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - inactive = _useState2[0], - setInactive = _useState2[1]; - var _useInView = (0,react_intersection_observer__WEBPACK_IMPORTED_MODULE_6__.useInView)({ - rootMargin: '0px 0px' - }), - _useInView2 = _slicedToArray(_useInView, 2), - loadMoreRef = _useInView2[0], - inView = _useInView2[1]; - - // Scroll in-view callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (wpBlock) { - loadMorePhotos(); - } - }, [inView]); // eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("div", { - id: "photos", - className: inactive ? 'inactive' : null, - ref: ref - }, !!(data !== null && data !== void 0 && data.length) && data.map(function (result, index) { - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, { - key: "".concat(result.id, "-").concat(index) - }, (result === null || result === void 0 ? void 0 : result.type) === 'instant-images-ad' ? /*#__PURE__*/React.createElement(_Sponsor__WEBPACK_IMPORTED_MODULE_5__["default"], { - result: result - }) : /*#__PURE__*/React.createElement(_Photo__WEBPACK_IMPORTED_MODULE_4__["default"], { - result: result, - type: result === null || result === void 0 ? void 0 : result.type, - setInactive: setInactive - })); - }), /*#__PURE__*/React.createElement(_editor_block_components_LoadMore__WEBPACK_IMPORTED_MODULE_3__["default"], { - done: done, - ref: loadMoreRef - })), /*#__PURE__*/React.createElement(_editor_block_components_Instructions__WEBPACK_IMPORTED_MODULE_2__["default"], { - show: data === null || data === void 0 ? void 0 : data.length - })); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ResultsWPBlock); - -/***/ }), - -/***/ "./src/js/components/Sponsor.js": -/*!**************************************!*\ - !*** ./src/js/components/Sponsor.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Sponsor) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Render the Sponsor component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The Sponsor component. - */ -function Sponsor(props) { - var result = props.result; - var _result$data = result.data, - data = _result$data === void 0 ? null : _result$data; - var url = (data === null || data === void 0 ? void 0 : data.url) || ''; - var title = (data === null || data === void 0 ? void 0 : data.title) || ''; - var desc = (data === null || data === void 0 ? void 0 : data.description) || ''; - var avatar = (data === null || data === void 0 ? void 0 : data.avatar) || ''; - var _data$image = data.image, - image = _data$image === void 0 ? null : _data$image; - var _image$src = image.src, - src = _image$src === void 0 ? null : _image$src, - _image$alt = image.alt, - alt = _image$alt === void 0 ? null : _image$alt; - var photo = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var link = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, image && url ? - /*#__PURE__*/ - // eslint-disable-next-line - React.createElement("article", { - className: "photo feature", - title: desc, - ref: photo, - onClick: function onClick() { - return link.current.click(); - } - }, /*#__PURE__*/React.createElement("div", { - className: "photo--wrap" - }, /*#__PURE__*/React.createElement("span", { - className: "flag", - title: instant_img_localize.advertisement - }, instant_img_localize.ad), /*#__PURE__*/React.createElement("div", { - className: "img-wrap" - }, /*#__PURE__*/React.createElement("a", { - className: "loaded", - href: url, - target: "_blank", - ref: link, - rel: "noreferrer" - }, /*#__PURE__*/React.createElement("img", { - src: src, - alt: alt - }))), /*#__PURE__*/React.createElement("div", { - className: "feature-title" - }, avatar && /*#__PURE__*/React.createElement("img", { - src: avatar, - alt: title - }), /*#__PURE__*/React.createElement("span", null, title)))) : null); -} - -/***/ }), - -/***/ "./src/js/components/Tooltip.js": -/*!**************************************!*\ - !*** ./src/js/components/Tooltip.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Tooltip) -/* harmony export */ }); -/** - * Render the Tooltip component. - * - * @return {JSX.Element} The Tooltip component. - */ -function Tooltip() { - return /*#__PURE__*/React.createElement("div", { - id: "tooltip" - }); -} - -/***/ }), - -/***/ "./src/js/components/cta/Extended.js": -/*!*******************************************!*\ - !*** ./src/js/components/cta/Extended.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ ExtendedCTA: () => (/* binding */ ExtendedCTA), -/* harmony export */ ExtendedSearchCTA: () => (/* binding */ ExtendedSearchCTA) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _functions_localStorage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../functions/localStorage */ "./src/js/functions/localStorage.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - -/* eslint-disable */ - -/** - * Generic CTA for the Extended add-on. - * - * @return {JSX.Element} The ExtendedCTA component. - */ -function ExtendedCTA() { - var _instant_img_localize3; - var _instant_img_localize = (_instant_img_localize3 = instant_img_localize) === null || _instant_img_localize3 === void 0 || (_instant_img_localize3 = _instant_img_localize3.addons) === null || _instant_img_localize3 === void 0 ? void 0 : _instant_img_localize3.extended, - _instant_img_localize2 = _instant_img_localize.activated, - activated = _instant_img_localize2 === void 0 ? false : _instant_img_localize2; - var name = 'extended-cta-2024'; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSetting)(name) === 'hide'), - _useState2 = _slicedToArray(_useState, 2), - dissmissed = _useState2[0], - setDismissed = _useState2[1]; // Get setting from localstorage. - - // Hide the CTA. - function remove() { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.saveSettings)(name, 'hide'); - setDismissed(true); - } - return /*#__PURE__*/React.createElement(React.Fragment, null, !activated && !dissmissed ? /*#__PURE__*/React.createElement("div", { - className: "cta-extended cta-extended--standard" - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-bullhorn", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("span", null, "Introducing the", ' ', /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer" - }, "Extended add-on")), ' ', "\u2192 An extension pack of premium features and functionality to enhance the Instant Images plugin."), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer", - className: "button button-primary" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Learn More', 'instant-images')), /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button button-secondary", - onClick: function onClick() { - return remove(); - }, - "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images') - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images')))) : null); -} - -/** - * CTA for the Extended add-on in the search dropdown. - * - * @param {Object} props The component props. - * @param {boolean} props.show Display the component. - * @return {JSX.Element} The ExtendedSearchCTA component. - */ -function ExtendedSearchCTA(_ref) { - var _ref$show = _ref.show, - show = _ref$show === void 0 ? false : _ref$show; - var name = 'extended-cta-search-2024'; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSetting)(name) !== 'hide'), - _useState4 = _slicedToArray(_useState3, 2), - active = _useState4[0], - setActive = _useState4[1]; // Get setting from localstorage. - - // Hide the CTA. - function remove() { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.saveSettings)(name, 'hide'); - setActive(false); - } - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('control-nav--search-history extended-cta', show && active ? 'active' : null) - }, /*#__PURE__*/React.createElement("div", { - className: "cta-extended cta-extended--search" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "closeBtn", - onClick: function onClick() { - return remove(); - }, - "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images') - }, "\xD7", /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images'))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("i", { - className: "fa fa-magic", - "aria-hidden": "true" - }), "Enable search suggestions, history, and maintain current search term while switching providers with the", ' ', /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer" - }, "Extended add-on")), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer", - className: "button button-primary" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Learn More', 'instant-images')))))); -} - -/***/ }), - -/***/ "./src/js/components/search/SearchForm.js": -/*!************************************************!*\ - !*** ./src/js/components/search/SearchForm.js ***! - \************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _functions_localStorage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../functions/localStorage */ "./src/js/functions/localStorage.js"); -/* harmony import */ var _hooks_useClickOutside__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../hooks/useClickOutside */ "./src/js/hooks/useClickOutside.js"); -/* harmony import */ var _cta_Extended__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cta/Extended */ "./src/js/components/cta/Extended.js"); -/* harmony import */ var _SearchHistory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SearchHistory */ "./src/js/components/search/SearchHistory.js"); -/* harmony import */ var _SearchToolTip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./SearchToolTip */ "./src/js/components/search/SearchToolTip.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } -function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); } - - - - - - - - - -/** - * Render the search form as a component. - * - * @return {JSX.Element} The SearchForm component. - */ -var SearchForm = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (_ref, ref) { - var _instant_img_localize4; - _objectDestructuringEmpty(_ref); - var _instant_img_localize = (_instant_img_localize4 = instant_img_localize) === null || _instant_img_localize4 === void 0 || (_instant_img_localize4 = _instant_img_localize4.addons) === null || _instant_img_localize4 === void 0 ? void 0 : _instant_img_localize4.extended, - _instant_img_localize2 = _instant_img_localize.activated, - extended_activated = _instant_img_localize2 === void 0 ? false : _instant_img_localize2, - _instant_img_localize3 = _instant_img_localize.license, - extended_license = _instant_img_localize3 === void 0 ? false : _instant_img_localize3; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - searchHandler = _usePluginContext.searchHandler, - apiError = _usePluginContext.apiError, - suggestions = _usePluginContext.suggestions, - getSuggestions = _usePluginContext.getSuggestions; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]), - _useState2 = _slicedToArray(_useState, 2), - history = _useState2[0], - setHistory = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState4 = _slicedToArray(_useState3, 2), - show = _useState4[0], - setShow = _useState4[1]; - var historyRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); - var submitBtnRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); - - // Handle clickoutside hook. - (0,_hooks_useClickOutside__WEBPACK_IMPORTED_MODULE_4__.useClickOutside)(historyRef, function () { - setShow(false); - }); - - /** - * Set the search value in the form. - * - * @param {string} value The value to set. - */ - function setSearchValue(value) { - var input = ref === null || ref === void 0 ? void 0 : ref.current; - input.value = value; - submitBtnRef === null || submitBtnRef === void 0 || submitBtnRef.current.click(); - - // Set focus on input. - input.focus(); - } - - /** - * Search submit handler. - * - * @param {Event} e The event object. - */ - function formSubmit(e) { - var _ref$current; - e.preventDefault(); - var term = ref === null || ref === void 0 || (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.value; - if (term) { - searchHandler(e); - if (extended_license) { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.saveSearchHistory)(term); - setHistory((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSearchHistory)()); - } - } - } - - /** - * Should the history div be shown? - * - * @return {boolean} Show history. - */ - function showHistory() { - return (history === null || history === void 0 ? void 0 : history.length) || (suggestions === null || suggestions === void 0 ? void 0 : suggestions.length); - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - setHistory((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSearchHistory)()); - }, []); - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('control-nav--search', apiError ? 'inactive' : null) - }, /*#__PURE__*/React.createElement("form", { - onSubmit: function onSubmit(e) { - return formSubmit(e); - }, - autoComplete: "off" - }, /*#__PURE__*/React.createElement("label", { - htmlFor: "search-input", - className: "offscreen" - }, instant_img_localize.search_label), /*#__PURE__*/React.createElement("div", { - ref: historyRef - }, /*#__PURE__*/React.createElement("input", { - ref: ref, - type: "text", - id: "search-input", - placeholder: instant_img_localize.search, - disabled: apiError, - onChange: function onChange(e) { - return extended_license && getSuggestions(e.target.value); - }, - onFocus: function onFocus() { - return setShow(true); - } - }), extended_license && showHistory() ? - /*#__PURE__*/ - /* Extended: Show only with valid add-on license */ - React.createElement(_SearchHistory__WEBPACK_IMPORTED_MODULE_6__["default"], { - show: show, - history: history, - setHistory: setHistory, - setSearchValue: setSearchValue, - container: historyRef - }) : null, !extended_activated && - /*#__PURE__*/ - /* Extended: Show only when add-on not installed. */ - React.createElement(_cta_Extended__WEBPACK_IMPORTED_MODULE_5__.ExtendedSearchCTA, { - show: show - })), /*#__PURE__*/React.createElement("button", { - type: "submit", - disabled: apiError, - ref: submitBtnRef - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-search" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.search)), /*#__PURE__*/React.createElement(_SearchToolTip__WEBPACK_IMPORTED_MODULE_7__["default"], { - show: show - }))); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchForm); - -/***/ }), - -/***/ "./src/js/components/search/SearchHeader.js": -/*!**************************************************!*\ - !*** ./src/js/components/search/SearchHeader.js ***! - \**************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ SearchHeader) -/* harmony export */ }); -/* harmony import */ var _constants_filters__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../constants/filters */ "./src/js/constants/filters.js"); -/* harmony import */ var _Filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Filter */ "./src/js/components/Filter.js"); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - -/** - * Render the SearchHeader component. - * - * @return {JSX.Element} The SearchHeader component. - */ -function SearchHeader() { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider, - search = _usePluginContext.search, - getPhotos = _usePluginContext.getPhotos, - filterSearch = _usePluginContext.filterSearch; - var _search$active = search.active, - active = _search$active === void 0 ? false : _search$active, - _search$term = search.term, - term = _search$term === void 0 ? '' : _search$term, - _search$results = search.results, - total = _search$results === void 0 ? 0 : _search$results; - var filters = _constants_filters__WEBPACK_IMPORTED_MODULE_0__.FILTERS[provider].search; - if (!active) { - // Exit if search is not active. - return null; - } - return /*#__PURE__*/React.createElement("header", { - className: "search-header" - }, /*#__PURE__*/React.createElement("h2", null, term.replace('id:', 'ID: ')), /*#__PURE__*/React.createElement("div", { - className: "search-header--text" - }, "".concat(total, " ").concat(instant_img_localize.search_results), " ", /*#__PURE__*/React.createElement("strong", null, "".concat(term)), /*#__PURE__*/React.createElement("span", null, "-"), /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return getPhotos(true); - } - }, instant_img_localize.clear_search)), filters && Object.entries(filters).length ? /*#__PURE__*/React.createElement("div", { - className: "control-nav--filters-wrap" - }, /*#__PURE__*/React.createElement("div", { - className: "control-nav--filters" - }, Object.entries(filters).map(function (_ref, index) { - var _ref2 = _slicedToArray(_ref, 2), - key = _ref2[0], - filter = _ref2[1]; - return /*#__PURE__*/React.createElement(_Filter__WEBPACK_IMPORTED_MODULE_1__["default"], { - key: "".concat(provider, "-search-").concat(key, "-").concat(index), - filterKey: key, - provider: provider, - data: filter, - handler: filterSearch - }); - }))) : null); -} - -/***/ }), - -/***/ "./src/js/components/search/SearchHistory.js": -/*!***************************************************!*\ - !*** ./src/js/components/search/SearchHistory.js ***! - \***************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ SearchHistory) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _functions_localStorage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../functions/localStorage */ "./src/js/functions/localStorage.js"); -/* harmony import */ var _hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../hooks/useArrowControls */ "./src/js/hooks/useArrowControls.js"); - - - - - - - -/** - * The History list component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The SearchHistory component. - */ -function SearchHistory(props) { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__.usePluginContext)(), - suggestions = _usePluginContext.suggestions; - var show = props.show, - history = props.history, - setHistory = props.setHistory, - setSearchValue = props.setSearchValue, - container = props.container; - var dropRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); - - // Use up/down arrow keys to navigate dropdown. - (0,_hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_5__.useArrowControls)(show, container); - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('control-nav--search-history', show ? 'active' : null), - role: "listbox", - ref: dropRef - }, !!suggestions.length && /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("div", { - className: "control-nav--search-history-title" - }, /*#__PURE__*/React.createElement("div", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Suggestions', 'instant-images'))), /*#__PURE__*/React.createElement("ul", { - role: "listbox", - className: "search-suggestions" - }, suggestions.map(function (item, key) { - return /*#__PURE__*/React.createElement("li", { - key: key, - role: "option" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - onClick: function onClick() { - return setSearchValue(item); - } - }, item)); - }))), !!history.length && /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("div", { - className: "control-nav--search-history-title" - }, /*#__PURE__*/React.createElement("div", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Recent Searches', 'instant-images')), /*#__PURE__*/React.createElement("button", { - type: "button", - onClick: function onClick() { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_4__.clearSearchHistory)(); - setHistory([]); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Clear', 'instant-images'))), /*#__PURE__*/React.createElement("ul", { - role: "listbox", - className: "search-history" - }, history.map(function (item, key) { - return /*#__PURE__*/React.createElement("li", { - key: key, - role: "option" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "history", - onClick: function onClick() { - return setSearchValue(item); - } - }, item)); - })))); -} - -/***/ }), - -/***/ "./src/js/components/search/SearchToolTip.js": -/*!***************************************************!*\ - !*** ./src/js/components/search/SearchToolTip.js ***! - \***************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ SearchToolTip) -/* harmony export */ }); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); - - - -/** - * Render the search results tooltip component. - * - * @return {JSX.Element} The SearchToolTip component. - */ -function SearchToolTip() { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - getPhotos = _usePluginContext.getPhotos, - search = _usePluginContext.search; - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_0___default()('control-nav--search-tooltip', search !== null && search !== void 0 && search.active ? null : 'hide') - }, /*#__PURE__*/React.createElement("span", { - title: "".concat(search === null || search === void 0 ? void 0 : search.results, " ").concat(instant_img_localize.search_results, " ").concat(search === null || search === void 0 ? void 0 : search.term) - }, search === null || search === void 0 ? void 0 : search.results), /*#__PURE__*/React.createElement("button", { - type: "button", - title: instant_img_localize.clear_search, - onClick: function onClick() { - return getPhotos(true); - } - }, "x", /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.clear_search))); -} - -/***/ }), - -/***/ "./src/js/constants/API.js": -/*!*********************************!*\ - !*** ./src/js/constants/API.js ***! - \*********************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ API: () => (/* binding */ API) -/* harmony export */ }); -/* harmony import */ var _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/ProviderIcons */ "./src/js/components/ProviderIcons.js"); - -var API = { - proxy: "https://proxy.getinstantimages.com/api/" || 0, - // eslint-disable-line - testmode: false, - defaults: { - provider: 'unsplash', - order: 'latest', - arr_key: 'results' - }, - providers: ['Unsplash', 'Openverse', 'Pixabay', 'Pexels', 'Giphy'], - unsplash: { - name: 'Unsplash', - requires_key: true, - "new": false, - api_var: 'client_id', - collections_api: 'https://api.unsplash.com/collections/', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.UnsplashIcon - }, - pixabay: { - name: 'Pixabay', - requires_key: true, - "new": false, - api_var: 'key', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.PixabayIcon - }, - pexels: { - name: 'Pexels', - requires_key: true, - "new": false, - api_var: 'key', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.PexelsIcon - }, - openverse: { - name: 'Openverse', - requires_key: false, - "new": false, - api_var: 'key', - key: '', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.OpenverseIcon - }, - giphy: { - name: 'Giphy', - requires_key: true, - "new": true, - api_var: 'key', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.GiphyIcon - } -}; - -/***/ }), - -/***/ "./src/js/constants/filters.js": -/*!*************************************!*\ - !*** ./src/js/constants/filters.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ FILTERS: () => (/* binding */ FILTERS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _filters_openverse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filters/openverse */ "./src/js/constants/filters/openverse.js"); -/* harmony import */ var _filters_pexels__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./filters/pexels */ "./src/js/constants/filters/pexels.js"); -/* harmony import */ var _filters_pixabay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./filters/pixabay */ "./src/js/constants/filters/pixabay.js"); -/* harmony import */ var _filters_unsplash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./filters/unsplash */ "./src/js/constants/filters/unsplash.js"); -function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } -function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } - - - - - -var ALL = { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('All', 'instant-images'), - value: 'all' -}; -var FILTERS = { - giphy: { - filters: { - order: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'trending', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Trending', 'instant-images'), - value: 'trending' - }] - } - }, - search: {} - }, - openverse: { - filters: { - source: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Source', 'instant-images'), - "default": 'wordpress', - filters: _toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_SOURCES) - }, - aspect_ratio: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_ORIENTATIONS)) - } - }, - search: { - category: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Type', 'instant-images'), - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Illustration', 'instant-images'), - value: 'illustration' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Photograph', 'instant-images'), - value: 'photograph' - }] - }, - extension: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Extension', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_EXTENSIONS)) - }, - aspect_ratio: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_ORIENTATIONS)) - }, - size: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Size', 'instant-images'), - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Large', 'instant-images'), - value: 'large' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Medium', 'instant-images'), - value: 'medium' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Small', 'instant-images'), - value: 'small' - }] - }, - license: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('License', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_LICENSES)) - }, - license_type: { - label: 'license_type', - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Commercial', 'instant-images'), - value: 'commercial' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Modification', 'instant-images'), - value: 'modification' - }] - } - } - }, - pexels: { - filters: { - order_by: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'curated', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Curated', 'instant-images'), - value: 'curated' - }] - } - }, - search: { - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pexels__WEBPACK_IMPORTED_MODULE_2__.PEXELS_ORIENTATIONS)) - }, - color: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pexels__WEBPACK_IMPORTED_MODULE_2__.PEXELS_COLORS)) - }, - size: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Size', 'instant-images'), - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Large', 'instant-images'), - value: 'large' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Medium', 'instant-images'), - value: 'medium' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Small', 'instant-images'), - value: 'small' - }] - } - } - }, - unsplash: { - filters: { - order_by: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'latest', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Latest', 'instant-images'), - value: 'latest' - }] - } - }, - search: { - order_by: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'relevant', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Relevance', 'instant-images'), - value: 'relevant' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Latest', 'instant-images'), - value: 'latest' - }] - }, - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_unsplash__WEBPACK_IMPORTED_MODULE_4__.UNSPLASH_ORIENTATIONS)) - }, - color: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_unsplash__WEBPACK_IMPORTED_MODULE_4__.UNSPLASH_COLORS)) - } - } - }, - pixabay: { - filters: { - order: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'popular', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Popular', 'instant-images'), - value: 'popular' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Latest', 'instant-images'), - value: 'latest' - }] - }, - image_type: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Type', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_IMAGE_TYPE)) - }, - category: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Category', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_CATS)) - }, - colors: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_COLORS)) - }, - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_ORIENTATIONS)) - } - }, - search: { - image_type: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Type', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_IMAGE_TYPE)) - }, - colors: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_COLORS)) - }, - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_ORIENTATIONS)) - } - } - } -}; - -/***/ }), - -/***/ "./src/js/constants/filters/openverse.js": -/*!***********************************************!*\ - !*** ./src/js/constants/filters/openverse.js ***! - \***********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ OPENVERSE_EXTENSIONS: () => (/* binding */ OPENVERSE_EXTENSIONS), -/* harmony export */ OPENVERSE_LICENSES: () => (/* binding */ OPENVERSE_LICENSES), -/* harmony export */ OPENVERSE_ORIENTATIONS: () => (/* binding */ OPENVERSE_ORIENTATIONS), -/* harmony export */ OPENVERSE_SOURCES: () => (/* binding */ OPENVERSE_SOURCES) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var OPENVERSE_SOURCES = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('WordPress', 'instant-images'), - value: 'wordpress' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Flickr', 'instant-images'), - value: 'flickr' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Nasa', 'instant-images'), - value: 'nasa' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('SpaceX', 'instant-images'), - value: 'spacex' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Wikimedia', 'instant-images'), - value: 'wikimedia' -}]; -var OPENVERSE_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Square', 'instant-images'), - value: 'square' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Tall', 'instant-images'), - value: 'tall' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Wide', 'instant-images'), - value: 'wide' -}]; -var OPENVERSE_EXTENSIONS = [{ - label: 'JPG', - value: 'JPG' -}, { - label: 'GIF', - value: 'GIF' -}, { - label: 'PNG', - value: 'PNG' -}, { - label: 'SVG', - value: 'SVG' -}]; -var OPENVERSE_LICENSES = [{ - label: 'BY', - value: 'BY' -}, { - label: 'BY-NC', - value: 'BY-NC' -}, { - label: 'BY-NC-ND', - value: 'BY-NC-ND' -}, { - label: 'BY-NC-SA', - value: 'BY-NC-SA' -}, { - label: 'BY-ND', - value: 'BY-ND' -}, { - label: 'BY-SA', - value: 'BY-SA' -}, { - label: 'CC0', - value: 'CC0' -}]; - -/***/ }), - -/***/ "./src/js/constants/filters/pexels.js": -/*!********************************************!*\ - !*** ./src/js/constants/filters/pexels.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ PEXELS_COLORS: () => (/* binding */ PEXELS_COLORS), -/* harmony export */ PEXELS_ORIENTATIONS: () => (/* binding */ PEXELS_ORIENTATIONS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var PEXELS_COLORS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Red', 'instant-images'), - value: 'red' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orange', 'instant-images'), - value: 'orange' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Yellow', 'instant-images'), - value: 'yellow' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Green', 'instant-images'), - value: 'green' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Turquoise', 'instant-images'), - value: 'turquoise' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Blue', 'instant-images'), - value: 'blue' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Violet', 'instant-images'), - value: 'violet' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Pink', 'instant-images'), - value: 'pink' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Brown', 'instant-images'), - value: 'brown' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black', 'instant-images'), - value: 'black' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Gray', 'instant-images'), - value: 'gray' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('White', 'instant-images'), - value: 'white' -}]; -var PEXELS_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Landscape', 'instant-images'), - value: 'landscape' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Portrait', 'instant-images'), - value: 'portrait' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Square', 'instant-images'), - value: 'squarish' -}]; - -/***/ }), - -/***/ "./src/js/constants/filters/pixabay.js": -/*!*********************************************!*\ - !*** ./src/js/constants/filters/pixabay.js ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ PIXABAY_CATS: () => (/* binding */ PIXABAY_CATS), -/* harmony export */ PIXABAY_COLORS: () => (/* binding */ PIXABAY_COLORS), -/* harmony export */ PIXABAY_IMAGE_TYPE: () => (/* binding */ PIXABAY_IMAGE_TYPE), -/* harmony export */ PIXABAY_ORIENTATIONS: () => (/* binding */ PIXABAY_ORIENTATIONS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var PIXABAY_COLORS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Grayscale', 'instant-images'), - value: 'grayscale' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Red', 'instant-images'), - value: 'red' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orange', 'instant-images'), - value: 'orange' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Yellow', 'instant-images'), - value: 'yellow' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Green', 'instant-images'), - value: 'green' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Turquoise', 'instant-images'), - value: 'turquoise' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Blue', 'instant-images'), - value: 'blue' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Lilac', 'instant-images'), - value: 'lilac' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Pink', 'instant-images'), - value: 'pink' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('White', 'instant-images'), - value: 'white' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Gray', 'instant-images'), - value: 'gray' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black', 'instant-images'), - value: 'black' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Brown', 'instant-images'), - value: 'brown' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Transparent', 'instant-images'), - value: 'transparent' -}]; -var PIXABAY_CATS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Backgrounds', 'instant-images'), - value: 'backgrounds' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Fashion', 'instant-images'), - value: 'fashion' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Nature', 'instant-images'), - value: 'nature' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Science', 'instant-images'), - value: 'science' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Education', 'instant-images'), - value: 'education' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Feelings', 'instant-images'), - value: 'feelings' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Health', 'instant-images'), - value: 'health' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('People', 'instant-images'), - value: 'people' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Religion', 'instant-images'), - value: 'religion' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Places', 'instant-images'), - value: 'places' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Animals', 'instant-images'), - value: 'animals' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Industry', 'instant-images'), - value: 'industry' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Computer', 'instant-images'), - value: 'computer' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Food', 'instant-images'), - value: 'food' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Sports', 'instant-images'), - value: 'sports' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Food', 'instant-images'), - value: 'food' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Transportation', 'instant-images'), - value: 'transportation' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Travel', 'instant-images'), - value: 'travel' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Buildings', 'instant-images'), - value: 'buildings' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Business', 'instant-images'), - value: 'business' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Music', 'instant-images'), - value: 'music' -}]; -var PIXABAY_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Horizontal', 'instant-images'), - value: 'horizontal' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Vertical', 'instant-images'), - value: 'vertical' -}]; -var PIXABAY_IMAGE_TYPE = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Photo', 'instant-images'), - value: 'photo' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Illustration', 'instant-images'), - value: 'illustration' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Vector', 'instant-images'), - value: 'vector' -}]; - -/***/ }), - -/***/ "./src/js/constants/filters/unsplash.js": -/*!**********************************************!*\ - !*** ./src/js/constants/filters/unsplash.js ***! - \**********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ UNSPLASH_COLORS: () => (/* binding */ UNSPLASH_COLORS), -/* harmony export */ UNSPLASH_ORIENTATIONS: () => (/* binding */ UNSPLASH_ORIENTATIONS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var UNSPLASH_COLORS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black & White', 'instant-images'), - value: 'black_and_white' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black', 'instant-images'), - value: 'black' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('White', 'instant-images'), - value: 'white' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Yellow', 'instant-images'), - value: 'yellow' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Green', 'instant-images'), - value: 'green' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orange', 'instant-images'), - value: 'orange' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Red', 'instant-images'), - value: 'red' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Purple', 'instant-images'), - value: 'purple' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Magenta', 'instant-images'), - value: 'magenta' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Teal', 'instant-images'), - value: 'teal' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Blue', 'instant-images'), - value: 'blue' -}]; -var UNSPLASH_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Landscape', 'instant-images'), - value: 'landscape' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Portrait', 'instant-images'), - value: 'portrait' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Square', 'instant-images'), - value: 'squarish' -}]; - -/***/ }), - -/***/ "./src/js/editor/block/components/Header.js": -/*!**************************************************!*\ - !*** ./src/js/editor/block/components/Header.js ***! - \**************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ BlockHeader) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _components_Icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../components/Icon */ "./src/js/components/Icon.js"); - - - - -var providers = _constants_API__WEBPACK_IMPORTED_MODULE_2__.API.providers; - -/** - * Render the block header. - * - * @param {Object} props The component props. - * @param {Object} props.switchProvider The function to switch the provider. - * @return {JSX.Element} The BlockHeader component. - */ -function BlockHeader(_ref) { - var switchProvider = _ref.switchProvider; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - provider = _usePluginContext.provider; - - /** - * Switch the provider via select. - * - * @param {string} value The provider value. - */ - function providerChange(value) { - if (value) { - switchProvider(value); - } - } - return /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--header" - }, /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--header-logo" - }, /*#__PURE__*/React.createElement(_components_Icon__WEBPACK_IMPORTED_MODULE_3__.IconLogo, null), /*#__PURE__*/React.createElement("span", null, "Instant Images")), /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--header-nav" - }, /*#__PURE__*/React.createElement("label", { - className: "offscreen" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Select Provider', 'instant-images')), /*#__PURE__*/React.createElement("select", { - defaultValue: provider, - onChange: function onChange(e) { - return providerChange(e.target.value); - } - }, /*#__PURE__*/React.createElement("option", { - value: "" - }, "-- ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Select Provider', 'instant-images'), " --"), providers.map(function (item, index) { - return /*#__PURE__*/React.createElement("option", { - key: index, - value: item.toLowerCase() - }, item); - })))); -} - -/***/ }), - -/***/ "./src/js/editor/block/components/Instructions.js": -/*!********************************************************!*\ - !*** ./src/js/editor/block/components/Instructions.js ***! - \********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ BlockInstructions) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Render instructional text for the WP Block. - * - * @param {Object} props The component props. - * @return {JSX.Element} The BlockInstructions component. - */ -function BlockInstructions(props) { - var _props$show = props.show, - show = _props$show === void 0 ? false : _props$show; - if (!show) { - return null; - } - return /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--instructions" - }, /*#__PURE__*/React.createElement("span", null, "\u2190"), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Scroll to Load Images', 'instant-images'), /*#__PURE__*/React.createElement("span", null, "\u2192")); -} - -/***/ }), - -/***/ "./src/js/editor/block/components/LoadMore.js": -/*!****************************************************!*\ - !*** ./src/js/editor/block/components/LoadMore.js ***! - \****************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); - - - -/** - * Render the BlockLoadMore component. - * - * @return {JSX.Element} The BlockLoadMore component. - */ -var BlockLoadMore = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var done = props.done; - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('instant-images-block--loader', done ? 'done' : null), - ref: ref - }); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BlockLoadMore); - -/***/ }), - -/***/ "./src/js/editor/utils/insertImage.js": -/*!********************************************!*\ - !*** ./src/js/editor/utils/insertImage.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ insertImage) -/* harmony export */ }); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); - - - -/** - * Insert an image block into the block editor. - * - * @param {Object} attachment The attachment object. - * @param {string} clientId The block ID. - */ -function insertImage(attachment, clientId) { - var _attachment$id = attachment.id, - id = _attachment$id === void 0 ? null : _attachment$id, - _attachment$url = attachment.url, - url = _attachment$url === void 0 ? null : _attachment$url, - _attachment$caption = attachment.caption, - caption = _attachment$caption === void 0 ? '' : _attachment$caption, - _attachment$alt = attachment.alt, - alt = _attachment$alt === void 0 ? '' : _attachment$alt; - if (!url || !id) { - return; - } - - // Create block. - var block = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('core/image', { - id: id, - url: url, - caption: caption, - alt: alt - }); - if (clientId) { - // Replace the Instant Images block. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)('core/block-editor').replaceBlock(clientId, block); - } else { - // Insert Image block. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)('core/block-editor').insertBlocks(block); - } -} - -/***/ }), - -/***/ "./src/js/editor/utils/setFeaturedImage.js": -/*!*************************************************!*\ - !*** ./src/js/editor/utils/setFeaturedImage.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ setFeaturedImage) -/* harmony export */ }); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Set image as featured image in Gutenberg. - * - * @param {Object} attachment The attachment object. - */ -function setFeaturedImage(attachment) { - var _attachment$id = attachment.id, - id = _attachment$id === void 0 ? null : _attachment$id; - if (!id) { - return; - } - - // Set the featured image. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/editor').editPost({ - featured_media: id - }); - - // Open the document sidebar. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/edit-post').openGeneralSidebar('edit-post/document'); -} - -/***/ }), - -/***/ "./src/js/functions/buildURL.js": -/*!**************************************!*\ - !*** ./src/js/functions/buildURL.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ buildTestURL: () => (/* binding */ buildTestURL), -/* harmony export */ "default": () => (/* binding */ buildURL), -/* harmony export */ getProxyURL: () => (/* binding */ getProxyURL) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _getQueryParams__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getQueryParams */ "./src/js/functions/getQueryParams.js"); -/* harmony import */ var _providers_openverse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./providers/openverse */ "./src/js/functions/providers/openverse.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - - - - -/** - * Build the API query parameters. - * - * @param {string} type The query type (search, photos, id). - * @param {Object} params The current params object. - * @return {string} The new API URL with querystring params. - */ -function buildURL(type, params) { - if (!type) { - // Bail early if API query type is missing. - return ''; - } - // Get the current provider. - var _params = params, - _params$provider = _params.provider, - provider = _params$provider === void 0 ? 'unsplash' : _params$provider; - - // Provider doesn't need to be sent. - delete params.provider; - - // Set Openverse params. - params = provider === 'openverse' ? (0,_providers_openverse__WEBPACK_IMPORTED_MODULE_2__.openverseParams)(type, params) : params; - - // Build the API URL. - var url = new URL(getProxyURL(provider)); - - // Add `type` to params. - url.searchParams.append('type', type); - - // Append query params. - Object.keys(params).forEach(function (key) { - url.searchParams.append(key, params[key]); - }); - - // Add `version` to params. - url.searchParams.append('version', instant_img_localize.version); - return url === null || url === void 0 ? void 0 : url.href; -} - -/** - * Get the proxy URL from ENV vars. - * - * @param {string} provider The image provider. - * @return {string} The proxy URL. - */ -function getProxyURL(provider) { - var _API$proxy = _constants_API__WEBPACK_IMPORTED_MODULE_0__.API.proxy, - proxy = _API$proxy === void 0 ? 'https://proxy.getinstantimages.com/api/' : _API$proxy; - return "".concat(proxy).concat(provider); -} - -/** - * Build a API testing URL. - * - * @param {string} provider The current service provider. - * @return {string} The API URL. - */ -function buildTestURL(provider) { - var options = { - page: 1 - }; - - // Build URL. - var params = _objectSpread(_objectSpread({ - test: true - }, (0,_getQueryParams__WEBPACK_IMPORTED_MODULE_1__["default"])(provider)), options); - return buildURL('photos', params); -} - -/***/ }), - -/***/ "./src/js/functions/consoleStatus.js": -/*!*******************************************!*\ - !*** ./src/js/functions/consoleStatus.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ consoleStatus) -/* harmony export */ }); -/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _getErrorMessage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getErrorMessage */ "./src/js/functions/getErrorMessage.js"); - - - -/** - * Display a console.warn message about API status. - * - * @param {string} provider The API service provider. - * @param {string} status The API status. - */ -function consoleStatus(provider) { - var status = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200; - var local = instant_img_localize; - var message = (0,_getErrorMessage__WEBPACK_IMPORTED_MODULE_1__["default"])(status); - switch (status) { - case 400: - case 401: - case 500: - // Unsplash/Pixabay/Pexels incorrect API key - console.warn("[".concat(local.instant_images, " - ").concat(status, " Error] ").concat((0,_helpers__WEBPACK_IMPORTED_MODULE_0__.capitalizeFirstLetter)(provider), ": ").concat(message)); - break; - case 429: - /** - * Pixabay, Pexels - too many requests. - * - * @see https://www.pexels.com/api/documentation/#statistics - * @see https://pixabay.com/api/docs/#api_rate_limit - */ - console.warn("[".concat(local.instant_images, " - ").concat(status, " Error] ").concat((0,_helpers__WEBPACK_IMPORTED_MODULE_0__.capitalizeFirstLetter)(provider), ": ").concat(message)); - break; - default: - break; - } -} - -/***/ }), - -/***/ "./src/js/functions/generateAttribution.js": -/*!*************************************************!*\ - !*** ./src/js/functions/generateAttribution.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ generateAttribution) -/* harmony export */ }); -/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/js/functions/helpers.js"); - - -/** - * Get the API URL for searches by ID. - * - * @param {string} text Attribution hook content. - * @param {string} provider Image provider. - * @param {string} permalink Image url. - * @param {Object} user The user data. - * @return {string} The raw attribution HTML. - */ -function generateAttribution(text, provider, permalink, user) { - if (!text || !provider || !permalink || !user) { - return text; - } - - // Get user data. - var username = user.name, - user_url = user.url; - - // Format provider data. - var provider_url = instant_img_localize["".concat(provider, "_url")]; - var provider_name = (0,_helpers__WEBPACK_IMPORTED_MODULE_0__.capitalizeFirstLetter)(provider); - - // Generate attribution template. - var attribution = text; - attribution = attribution.replace('{username}', username); - attribution = attribution.replace('{user_url}', user_url); - attribution = attribution.replace('{image_url}', permalink); - attribution = attribution.replace('{provider_url}', provider_url); - attribution = attribution.replace('{provider}', provider_name); - return attribution; -} - -/***/ }), - -/***/ "./src/js/functions/getErrorMessage.js": -/*!*********************************************!*\ - !*** ./src/js/functions/getErrorMessage.js ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getErrorMessage) -/* harmony export */ }); -/** - * Get the correct error message by status code. - * - * @param {string} status The API status. - */ -function getErrorMessage() { - var status = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 200; - var local = instant_img_localize; - switch (status) { - case 400: - case 401: - // Unsplash/Pixabay/Pexels incorrect API key. - return local.api_invalid_msg; - case 403: - return local.api_invalid_403_msg; - case 404: - return local.api_invalid_404_msg; - case 429: - /** - * Pixabay, Pexels - too many requests. - * - * @see https://www.pexels.com/api/documentation/#statistics - * @see https://pixabay.com/api/docs/#api_rate_limit - */ - return local.api_ratelimit_msg; - case 500: - case 503: - // Internal server error. - return local.api_invalid_500_msg; - case 501: - // Missing params. - return local.api_invalid_501_msg; - default: - break; - } -} - -/***/ }), - -/***/ "./src/js/functions/getProvider.js": -/*!*****************************************!*\ - !*** ./src/js/functions/getProvider.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getProvider) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); - - -/** - * Get the default provider on page load. - * - * @return {string} The default service provider. - */ -function getProvider() { - return instant_img_localize && instant_img_localize.default_provider ? instant_img_localize.default_provider : _constants_API__WEBPACK_IMPORTED_MODULE_0__.API.defaults.provider; -} - -/***/ }), - -/***/ "./src/js/functions/getQueryParams.js": -/*!********************************************!*\ - !*** ./src/js/functions/getQueryParams.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getQueryParams), -/* harmony export */ getAuth: () => (/* binding */ getAuth), -/* harmony export */ getContentSafety: () => (/* binding */ getContentSafety) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - - -// eslint-disable - -/** - * Build the API query parameters - * - * @param {string} provider The current service provider. - * @param {Object} queryParams Optional query parameters to append to base params. - * @return {Object} Parameters used for the fetch request. - */ -function getQueryParams(provider, queryParams) { - if (!provider) { - return {}; - } - - // Set default params. - var params = { - provider: provider - }; - - // Append additional params. - params = getContentSafety(params, provider); - params = _objectSpread(_objectSpread({}, params), queryParams); - params = getAuth(params, provider); - - /** - * Display query params in the browser console. - * - * Global plugin hook. - */ - if (instant_img_localize.query_debug) { - console.table(params); - } - return params; -} - -/** - * Get auth keys and append to API query request. - * - * @param {Object} params The current params object. - * @param {string} provider The current service provider. - * @return {Object} The auth parameter object. - */ -function getAuth(params, provider) { - var has_auth = _constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider].requires_key; - if (!has_auth || !provider) { - return params; - } - var app_id = instant_img_localize["".concat(provider, "_app_id")]; - if (app_id) { - // Pass API keys if not using defaults. - params[_constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider].api_var] = app_id; - } - return params; -} - -/** - * Set the photo safety for indicating that only images suitable for all ages should be returned. - * - * @see https://unsplash.com/documentation#content-safety - * @see https://pixabay.com/api/docs/ - * - * @param {Object} params The current params object. - * @param {string} provider The current service provider. - * @return {Object} The fetch parameters object. - */ -function getContentSafety(params, provider) { - switch (provider) { - case 'unsplash': - if (instant_img_localize.unsplash_content_filter) { - params.content_filter = instant_img_localize.unsplash_content_filter; - } - break; - case 'pixabay': - if (instant_img_localize.pixabay_safesearch) { - params.safesearch = 'true'; - } - break; - case 'openverse': - if (instant_img_localize.openverse_mature) { - params.mature = 'true'; - } - break; - } - return params; -} - -/***/ }), - -/***/ "./src/js/functions/getResults.js": -/*!****************************************!*\ - !*** ./src/js/functions/getResults.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getResults), -/* harmony export */ getResultById: () => (/* binding */ getResultById), -/* harmony export */ getSearchTotal: () => (/* binding */ getSearchTotal) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); - - -/** - * Pluck `results` from the API response. - * - * @param {Object} data The API results object. - * @return {Array} The results as an array. - */ -function getResults(data) { - if (!data) { - return []; - } - return data[_constants_API__WEBPACK_IMPORTED_MODULE_0__.API.defaults.arr_key] || []; -} - -/** - * Get the total search results. - * - * @param {Object} data The search data object. - * @return {string} The total results. - */ -function getSearchTotal(data) { - // Return 0 if undefined or null. - return data.total === undefined || data.total === null ? 0 : data.total; -} - -/** - * Get results by photo ID. - * - * @param {string} provider The current service provider. - * @param {string} key The match key to access. - * @param {Object} data The API results object. - * @return {Array} The results as an array. - * @deprecated 5.0 - */ -function getResultById(provider, key, data) { - if (!data) { - return []; - } - var result = []; - switch (provider) { - case 'unsplash': - case 'pexels': - result = data || []; - break; - case 'pixabay': - result = data[key] && data[key][0] ? data[key][0] : []; - break; - } - return result; -} - -/***/ }), - -/***/ "./src/js/functions/helpers.js": -/*!*************************************!*\ - !*** ./src/js/functions/helpers.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ capitalizeFirstLetter: () => (/* binding */ capitalizeFirstLetter), -/* harmony export */ checkRateLimit: () => (/* binding */ checkRateLimit), -/* harmony export */ gotoURL: () => (/* binding */ gotoURL), -/* harmony export */ hideTooltip: () => (/* binding */ hideTooltip), -/* harmony export */ isObjectEmpty: () => (/* binding */ isObjectEmpty), -/* harmony export */ md5Hash: () => (/* binding */ md5Hash), -/* harmony export */ showTooltip: () => (/* binding */ showTooltip) -/* harmony export */ }); -/* harmony import */ var crypto_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! crypto-js */ "./node_modules/crypto-js/index.js"); -/* harmony import */ var crypto_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(crypto_js__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Get the MD5 hash value of a URL. - * - * @param {string} url The API URL to hash. - * @return {string} The MD5 hash. - */ -function md5Hash(url) { - return crypto_js__WEBPACK_IMPORTED_MODULE_0___default().MD5(url).toString(); -} - -/** - * Check if an object is empty. - * - * @param {Object} obj The object to test against. - * @return {boolean} Is this an object. - */ -function isObjectEmpty(obj) { - if (obj === null || obj === undefined) { - return true; - } - return Object.keys(obj).length === 0; -} - -/** - * Check the `x-ratelimit-remaining` headers to confirm the API is available. - * - * @param {Object} headers The request headers object. - */ -function checkRateLimit(headers) { - if (!headers) { - return; - } - var limit = headers.get('X-RateLimit-Limit') || -1; - var remaining = headers.get('X-RateLimit-Remaining') || -1; - if (limit > -1 && parseInt(remaining) < 2) { - alert(instant_img_localize.api_ratelimit_msg); // eslint-disable-line - } -} - -/** - * Capitalize the first letter of a string. - * - * @param {string} str The string to format. - * @return {string} The formatted string. - */ -function capitalizeFirstLetter(str) { - return str.charAt(0).toUpperCase() + str.slice(1); -} -var tooltipInterval = ''; - -/** - * Show the tooltip. - * - * @param {Event} e The target tooltip element. - * @since 4.3.0 - */ -function showTooltip(e) { - var target = e.currentTarget; - var rect = target.getBoundingClientRect(); - var left = Math.round(rect.left); - var top = Math.round(rect.top); - var container = target.closest('#photo-listing'); - var tooltip = container.querySelector('#tooltip'); - tooltip.classList.remove('over'); - if (target.classList.contains('tooltip--above')) { - tooltip.classList.add('above'); - } else { - tooltip.classList.remove('above'); - } - - // Delay Tooltip Reveal. - tooltipInterval = setInterval(function () { - clearInterval(tooltipInterval); - tooltip.innerHTML = target.dataset.title; // Tooltip content. - - // Position Tooltip. - left = left - tooltip.offsetWidth + target.offsetWidth + 5; - tooltip.style.left = "".concat(left, "px"); - tooltip.style.top = "".concat(top, "px"); - setTimeout(function () { - tooltip.classList.add('over'); - }, 25); - }, 750); -} - -/** - * Hide the tooltip. - * - * @param {Event} e The target tooltip element. - * @since 4.3.0 - */ -function hideTooltip(e) { - clearInterval(tooltipInterval); - var container = e.currentTarget.closest('#photo-listing'); - var tooltip = container.querySelector('#tooltip'); - tooltip.classList.remove('over'); -} - -/** - * Open the URL in new window. - * - * @param {string} url The destination URL. - */ -function gotoURL(url) { - if (url && window) { - window.open(url, '_blank'); - } -} - -/***/ }), - -/***/ "./src/js/functions/localStorage.js": -/*!******************************************!*\ - !*** ./src/js/functions/localStorage.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ clearSearchHistory: () => (/* binding */ clearSearchHistory), -/* harmony export */ getSearchHistory: () => (/* binding */ getSearchHistory), -/* harmony export */ getSetting: () => (/* binding */ getSetting), -/* harmony export */ saveSearchHistory: () => (/* binding */ saveSearchHistory), -/* harmony export */ saveSettings: () => (/* binding */ saveSettings) -/* harmony export */ }); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -var searchName = 'instant-images-recent-searches'; -var settingsName = 'instant-images-settings'; -var most = 10; - -/** - * Save search value to localstorage. - * - * @param {string} term The search term. - */ -function saveSearchHistory(term) { - if (term && term.toLowerCase().includes('id:')) { - return; // Don't index string with `id:` - } - var recent = getSearchHistory(); - if (!recent) { - localStorage.setItem(searchName, JSON.stringify([term])); - return; - } - - // Find duplicates. - var duplicate = recent.indexOf(term); - if (duplicate > -1) { - recent.splice(duplicate, 1); - } - - // Limit to 6 items. - if (recent.length >= most) { - recent.length = most; - } - - // Add new term to the beginning of the array. - recent.unshift(term); - localStorage.setItem(searchName, JSON.stringify(recent)); -} - -/** - * Get the search history from localstorage. - * - * @return {Array} The search history. - */ -function getSearchHistory() { - var history = localStorage.getItem(searchName); - if (!history) { - return []; - } - return JSON.parse(localStorage.getItem(searchName)); -} - -/** - * Clear search history. - */ -function clearSearchHistory() { - localStorage.removeItem(searchName); -} - -/** - * Save generic setting to localstorage as an key/value object pair. - * - * @param {string} key The object key. - * @param {value} value The object value. - */ -function saveSettings(key, value) { - var settings = localStorage.getItem(settingsName); - var setting = _defineProperty({}, key, value); - if (!settings) { - localStorage.setItem(settingsName, JSON.stringify(setting)); - } else { - var parsed = JSON.parse(settings); - parsed[key] = value; - localStorage.setItem(settingsName, JSON.stringify(parsed)); - } -} - -/** - * Get an individual setting from local storage. - * - * @param {string} key The stoarge key. - * @return {string|boolean} The storage value. - */ -function getSetting(key) { - var settings = localStorage.getItem(settingsName); - if (!settings) { - return false; - } - var parsed = JSON.parse(settings); - return parsed[key] ? parsed[key] : false; -} - -/***/ }), - -/***/ "./src/js/functions/providers/openverse.js": -/*!*************************************************!*\ - !*** ./src/js/functions/providers/openverse.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ openverseParams: () => (/* binding */ openverseParams) -/* harmony export */ }); -/* harmony import */ var _constants_filters_openverse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../constants/filters/openverse */ "./src/js/constants/filters/openverse.js"); - - -/** - * Format the params for Openverse. - * - * @param {string} type Query type (search, photos, id). - * @param {Object} params Query params object. - * @return {Object} Updated params. - */ -function openverseParams(type, params) { - if (type === 'photos' && !params.source) { - params.source = 'wordpress'; // Add `wordpress` as the default openverse `source`. - } - if (type === 'search') { - // Include these sources only. - var sources = _constants_filters_openverse__WEBPACK_IMPORTED_MODULE_0__.OPENVERSE_SOURCES.map(function (source) { - return source.value; - }).toString(); // e.g. `wordpress,flickr,nasa,spacex,wikimedia` - params.source = sources; - } - return params; -} - -/***/ }), - -/***/ "./src/js/functions/providers/unsplash.js": -/*!************************************************!*\ - !*** ./src/js/functions/providers/unsplash.js ***! - \************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ unsplashDownload: () => (/* binding */ unsplashDownload) -/* harmony export */ }); -/* harmony import */ var _buildURL__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../buildURL */ "./src/js/functions/buildURL.js"); -/* harmony import */ var _getQueryParams__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../getQueryParams */ "./src/js/functions/getQueryParams.js"); - - - -/** - * Function to trigger an image download at unsplash.com. - * Note: This is used to give authors download credits and nothing more. - * - * @see https://help.unsplash.com/en/articles/2511258-guideline-triggering-a-download - * - * @param {string} download_url The URL to trigger a download. - * @since 3.1 - */ -function unsplashDownload(download_url) { - var params = (0,_getQueryParams__WEBPACK_IMPORTED_MODULE_1__.getAuth)({}, 'unsplash'); - params.download_url = download_url; // Append download URL to query params. - var url = (0,_buildURL__WEBPACK_IMPORTED_MODULE_0__["default"])('photos', params); - fetch(url).then(function (data) { - return data.json(); - }).then(function () { - // Success, nothing else happens here - console.log('Image download successsfully triggered at Unsplash.'); // eslint-disable-line no-console - })["catch"](function (error) { - console.warn(error); - }); -} - -/***/ }), - -/***/ "./src/js/functions/session.js": -/*!*************************************!*\ - !*** ./src/js/functions/session.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ deleteSession: () => (/* binding */ deleteSession), -/* harmony export */ getSession: () => (/* binding */ getSession), -/* harmony export */ saveSession: () => (/* binding */ saveSession) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "./src/js/functions/helpers.js"); - - - -/** - * Get results from session storage by URL. - * - * @param {string} url The API URL. - * @return {Array|boolean} Session results. - */ -function getSession(url) { - if (!url || _constants_API__WEBPACK_IMPORTED_MODULE_0__.API.testmode) { - return false; // Exit if no URL or test m ode is enabled. - } - var session = sessionStorage.getItem((0,_helpers__WEBPACK_IMPORTED_MODULE_1__.md5Hash)(url)); - if (!session) { - return false; // Exit if no session data. - } - var data = JSON.parse(session); - var _data$expires = data.expires, - expires = _data$expires === void 0 ? 0 : _data$expires, - _data$error = data.error, - error = _data$error === void 0 ? null : _data$error; - if (error) { - return false; // Exit if session data has error entry. - } - - // Check if expiration time has passed. - var expired = Date.now() > expires; - - // Delete session data when expired. - if (expired) { - deleteSession(url); - } - return data && !expired ? data : false; -} - -/** - * Save API data to session storage by URL. - * - * @param {string} url Save results to session by URL. - * @param {Array} results The API results. - */ -function saveSession(url, results) { - if (!url || !results || results !== null && results !== void 0 && results.error) { - return false; - } - - // Set expiration to 2 hours. - results.expires = Date.now() + 7200000; - - // Save session data. - sessionStorage.setItem((0,_helpers__WEBPACK_IMPORTED_MODULE_1__.md5Hash)(url), JSON.stringify(results)); -} - -/** - * Remove/delete session storage by URL. - * - * @param {string} url The API URL. - */ -function deleteSession(url) { - if (!url) { - return false; - } - sessionStorage.removeItem((0,_helpers__WEBPACK_IMPORTED_MODULE_1__.md5Hash)(url)); -} - -/***/ }), - -/***/ "./src/js/functions/updatePluginSetting.js": -/*!*************************************************!*\ - !*** ./src/js/functions/updatePluginSetting.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ updatePluginSetting) -/* harmony export */ }); -/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js"); - - -/** - * Update plugin settings by specific key/value pair. - * - * @param {string} setting The previous provider. - * @param {string} value The value to save. - */ -function updatePluginSetting(setting, value) { - var _instant_img_localize; - var api = ((_instant_img_localize = instant_img_localize) === null || _instant_img_localize === void 0 ? void 0 : _instant_img_localize.root) + 'instant-images/settings/'; // eslint-disable-line no-undef - - var params = { - setting: setting, - value: value - }; - var config = { - headers: { - 'X-WP-Nonce': instant_img_localize.nonce, - // eslint-disable-line no-undef - 'Content-Type': 'application/json' - } - }; - axios__WEBPACK_IMPORTED_MODULE_0__["default"].post(api, JSON.stringify(params), config).then(function () {})["catch"](function (error) { - console.warn(error); - }); -} - -/***/ }), - -/***/ "./src/js/hooks/useArrowControls.js": -/*!******************************************!*\ - !*** ./src/js/hooks/useArrowControls.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ useArrowControls: () => (/* binding */ useArrowControls) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } -function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } - - -/** - * Detect up and down arrow presses. - * - * @param {boolean} active Is the element currently active. - * @param {Object} ref The container ref to select the focusable elements. - */ -function useArrowControls(active, ref) { - var focusedRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(active); - - /** - * Add event listener for arrow keys. - * - * @param {KeyboardEvent} e The event. - */ - function arrowHandler(e) { - var key = e.key; - if (focusedRef !== null && focusedRef !== void 0 && focusedRef.current && ref !== null && ref !== void 0 && ref.current) { - var focusable = ref === null || ref === void 0 ? void 0 : ref.current.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), input'); - if (!(focusable !== null && focusable !== void 0 && focusable.length)) { - // Exit if no focusable elements. - return; - } - var first = focusable[0]; - var last = focusable[focusable.length - 1]; - var _active = document.activeElement; // eslint-disable-line - var activeIndex = _toConsumableArray(focusable).indexOf(_active); - - // Up arrow. - if (key === 'ArrowUp') { - e.preventDefault(); - if (activeIndex === 0) { - last.focus({ - preventScroll: true - }); - } else { - focusable[activeIndex - 1].focus({ - preventScroll: true - }); - } - } - // Down Arrow - if (key === 'ArrowDown') { - e.preventDefault(); - if (activeIndex === focusable.length - 1 || activeIndex === -1) { - first.focus({ - preventScroll: true - }); - } else { - focusable[activeIndex + 1].focus({ - preventScroll: true - }); - } - } - } - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - focusedRef.current = active; - }, [active]); - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - document.addEventListener('keydown', arrowHandler, false); - return function () { - // Dispose of events. - document.removeEventListener('keydown', arrowHandler, false); - }; - }, []); // eslint-disable-line react-hooks/exhaustive-deps -} - -/***/ }), - -/***/ "./src/js/hooks/useClickOutside.js": -/*!*****************************************!*\ - !*** ./src/js/hooks/useClickOutside.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ useClickOutside: () => (/* binding */ useClickOutside) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Detect clicks outside of ref. - * - * @param {Object} ref React ref. - * @param {Function} onClickOutside Function to invoke when clicked outside. - */ -function useClickOutside(ref, onClickOutside) { - /** - * Escape handler. - * - * @param {Event} e The key press event. - */ - function escapeClick(e) { - var key = e.key; - if (key === 'Escape') { - onClickOutside(); - } - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - /** - * Invoke Function onClick outside of element - * - * @param {Event} event The event object. - */ - function handleClickOutside(event) { - if (ref.current && !ref.current.contains(event.target)) { - onClickOutside(); - } - } - - // Bind events. - document.addEventListener('mousedown', handleClickOutside); - document.addEventListener('keyup', handleClickOutside); - document.addEventListener('keydown', escapeClick, false); - return function () { - // Dispose of events. - document.removeEventListener('mousedown', handleClickOutside); - document.removeEventListener('keyup', handleClickOutside); - document.removeEventListener('keydown', escapeClick, false); - }; - }, [ref, onClickOutside]); //eslint-disable-line react-hooks/exhaustive-deps -} - -/***/ }), - -/***/ "./node_modules/crypto-js/aes.js": -/*!***************************************!*\ - !*** ./node_modules/crypto-js/aes.js ***! - \***************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - // Lookup tables - var SBOX = []; - var INV_SBOX = []; - var SUB_MIX_0 = []; - var SUB_MIX_1 = []; - var SUB_MIX_2 = []; - var SUB_MIX_3 = []; - var INV_SUB_MIX_0 = []; - var INV_SUB_MIX_1 = []; - var INV_SUB_MIX_2 = []; - var INV_SUB_MIX_3 = []; - - // Compute lookup tables - (function () { - // Compute double table - var d = []; - for (var i = 0; i < 256; i++) { - if (i < 128) { - d[i] = i << 1; - } else { - d[i] = (i << 1) ^ 0x11b; - } - } - - // Walk GF(2^8) - var x = 0; - var xi = 0; - for (var i = 0; i < 256; i++) { - // Compute sbox - var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); - sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; - SBOX[x] = sx; - INV_SBOX[sx] = x; - - // Compute multiplication - var x2 = d[x]; - var x4 = d[x2]; - var x8 = d[x4]; - - // Compute sub bytes, mix columns tables - var t = (d[sx] * 0x101) ^ (sx * 0x1010100); - SUB_MIX_0[x] = (t << 24) | (t >>> 8); - SUB_MIX_1[x] = (t << 16) | (t >>> 16); - SUB_MIX_2[x] = (t << 8) | (t >>> 24); - SUB_MIX_3[x] = t; - - // Compute inv sub bytes, inv mix columns tables - var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); - INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); - INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); - INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); - INV_SUB_MIX_3[sx] = t; - - // Compute next counter - if (!x) { - x = xi = 1; - } else { - x = x2 ^ d[d[d[x8 ^ x2]]]; - xi ^= d[d[xi]]; - } - } - }()); - - // Precomputed Rcon lookup - var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; - - /** - * AES block cipher algorithm. - */ - var AES = C_algo.AES = BlockCipher.extend({ - _doReset: function () { - var t; - - // Skip reset of nRounds has been set before and key did not change - if (this._nRounds && this._keyPriorReset === this._key) { - return; - } - - // Shortcuts - var key = this._keyPriorReset = this._key; - var keyWords = key.words; - var keySize = key.sigBytes / 4; - - // Compute number of rounds - var nRounds = this._nRounds = keySize + 6; - - // Compute number of key schedule rows - var ksRows = (nRounds + 1) * 4; - - // Compute key schedule - var keySchedule = this._keySchedule = []; - for (var ksRow = 0; ksRow < ksRows; ksRow++) { - if (ksRow < keySize) { - keySchedule[ksRow] = keyWords[ksRow]; - } else { - t = keySchedule[ksRow - 1]; - - if (!(ksRow % keySize)) { - // Rot word - t = (t << 8) | (t >>> 24); - - // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; - - // Mix Rcon - t ^= RCON[(ksRow / keySize) | 0] << 24; - } else if (keySize > 6 && ksRow % keySize == 4) { - // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; - } - - keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; - } - } - - // Compute inv key schedule - var invKeySchedule = this._invKeySchedule = []; - for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { - var ksRow = ksRows - invKsRow; - - if (invKsRow % 4) { - var t = keySchedule[ksRow]; - } else { - var t = keySchedule[ksRow - 4]; - } - - if (invKsRow < 4 || ksRow <= 4) { - invKeySchedule[invKsRow] = t; - } else { - invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ - INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; - } - } - }, - - encryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); - }, - - decryptBlock: function (M, offset) { - // Swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; - - this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); - - // Inv swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; - }, - - _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { - // Shortcut - var nRounds = this._nRounds; - - // Get input, add round key - var s0 = M[offset] ^ keySchedule[0]; - var s1 = M[offset + 1] ^ keySchedule[1]; - var s2 = M[offset + 2] ^ keySchedule[2]; - var s3 = M[offset + 3] ^ keySchedule[3]; - - // Key schedule row counter - var ksRow = 4; - - // Rounds - for (var round = 1; round < nRounds; round++) { - // Shift rows, sub bytes, mix columns, add round key - var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; - var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; - var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; - var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; - - // Update state - s0 = t0; - s1 = t1; - s2 = t2; - s3 = t3; - } - - // Shift rows, sub bytes, add round key - var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; - var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; - var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; - var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; - - // Set output - M[offset] = t0; - M[offset + 1] = t1; - M[offset + 2] = t2; - M[offset + 3] = t3; - }, - - keySize: 256/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); - */ - C.AES = BlockCipher._createHelper(AES); - }()); - - - return CryptoJS.AES; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/blowfish.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/blowfish.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - const N = 16; - - //Origin pbox and sbox, derived from PI - const ORIG_P = [ - 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, - 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89, - 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C, - 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917, - 0x9216D5D9, 0x8979FB1B - ]; - - const ORIG_S = [ - [ 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7, - 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99, - 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16, - 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E, - 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE, - 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013, - 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF, - 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E, - 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60, - 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440, - 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE, - 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A, - 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E, - 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677, - 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193, - 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032, - 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88, - 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239, - 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E, - 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0, - 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3, - 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98, - 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88, - 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE, - 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6, - 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D, - 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B, - 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7, - 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA, - 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463, - 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F, - 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09, - 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3, - 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB, - 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279, - 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8, - 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB, - 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82, - 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB, - 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573, - 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0, - 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B, - 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790, - 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8, - 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4, - 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0, - 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7, - 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C, - 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD, - 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1, - 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299, - 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9, - 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477, - 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF, - 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49, - 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF, - 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA, - 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5, - 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41, - 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915, - 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400, - 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915, - 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664, - 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A ], - [ 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623, - 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266, - 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1, - 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E, - 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6, - 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1, - 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E, - 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1, - 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737, - 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8, - 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF, - 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD, - 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701, - 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7, - 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41, - 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331, - 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF, - 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF, - 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E, - 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87, - 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C, - 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2, - 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16, - 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD, - 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B, - 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509, - 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E, - 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3, - 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F, - 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A, - 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4, - 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960, - 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66, - 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28, - 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802, - 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84, - 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510, - 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF, - 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14, - 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E, - 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50, - 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7, - 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8, - 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281, - 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99, - 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696, - 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128, - 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73, - 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0, - 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0, - 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105, - 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250, - 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3, - 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285, - 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00, - 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061, - 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB, - 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E, - 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735, - 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC, - 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9, - 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340, - 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20, - 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7 ], - [ 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934, - 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068, - 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF, - 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840, - 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45, - 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504, - 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A, - 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB, - 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE, - 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6, - 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42, - 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B, - 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2, - 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB, - 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527, - 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B, - 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33, - 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C, - 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3, - 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC, - 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17, - 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564, - 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B, - 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115, - 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922, - 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728, - 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0, - 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E, - 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37, - 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D, - 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804, - 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B, - 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3, - 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB, - 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D, - 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C, - 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350, - 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9, - 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A, - 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE, - 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D, - 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC, - 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F, - 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61, - 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2, - 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9, - 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2, - 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C, - 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E, - 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633, - 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10, - 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169, - 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52, - 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027, - 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5, - 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62, - 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634, - 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76, - 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24, - 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC, - 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4, - 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C, - 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837, - 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0 ], - [ 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B, - 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE, - 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B, - 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4, - 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8, - 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6, - 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304, - 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22, - 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4, - 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6, - 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9, - 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59, - 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593, - 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51, - 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28, - 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C, - 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B, - 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28, - 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C, - 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD, - 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A, - 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319, - 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB, - 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F, - 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991, - 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32, - 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680, - 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166, - 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE, - 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB, - 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5, - 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47, - 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370, - 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D, - 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84, - 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048, - 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8, - 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD, - 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9, - 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7, - 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38, - 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F, - 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C, - 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525, - 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1, - 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442, - 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964, - 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E, - 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8, - 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D, - 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F, - 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299, - 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02, - 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC, - 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614, - 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A, - 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6, - 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B, - 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0, - 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060, - 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E, - 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9, - 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F, - 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6 ] - ]; - - var BLOWFISH_CTX = { - pbox: [], - sbox: [] - } - - function F(ctx, x){ - let a = (x >> 24) & 0xFF; - let b = (x >> 16) & 0xFF; - let c = (x >> 8) & 0xFF; - let d = x & 0xFF; - - let y = ctx.sbox[0][a] + ctx.sbox[1][b]; - y = y ^ ctx.sbox[2][c]; - y = y + ctx.sbox[3][d]; - - return y; - } - - function BlowFish_Encrypt(ctx, left, right){ - let Xl = left; - let Xr = right; - let temp; - - for(let i = 0; i < N; ++i){ - Xl = Xl ^ ctx.pbox[i]; - Xr = F(ctx, Xl) ^ Xr; - - temp = Xl; - Xl = Xr; - Xr = temp; - } - - temp = Xl; - Xl = Xr; - Xr = temp; - - Xr = Xr ^ ctx.pbox[N]; - Xl = Xl ^ ctx.pbox[N + 1]; - - return {left: Xl, right: Xr}; - } - - function BlowFish_Decrypt(ctx, left, right){ - let Xl = left; - let Xr = right; - let temp; - - for(let i = N + 1; i > 1; --i){ - Xl = Xl ^ ctx.pbox[i]; - Xr = F(ctx, Xl) ^ Xr; - - temp = Xl; - Xl = Xr; - Xr = temp; - } - - temp = Xl; - Xl = Xr; - Xr = temp; - - Xr = Xr ^ ctx.pbox[1]; - Xl = Xl ^ ctx.pbox[0]; - - return {left: Xl, right: Xr}; - } - - /** - * Initialization ctx's pbox and sbox. - * - * @param {Object} ctx The object has pbox and sbox. - * @param {Array} key An array of 32-bit words. - * @param {int} keysize The length of the key. - * - * @example - * - * BlowFishInit(BLOWFISH_CTX, key, 128/32); - */ - function BlowFishInit(ctx, key, keysize) - { - for(let Row = 0; Row < 4; Row++) - { - ctx.sbox[Row] = []; - for(let Col = 0; Col < 256; Col++) - { - ctx.sbox[Row][Col] = ORIG_S[Row][Col]; - } - } - - let keyIndex = 0; - for(let index = 0; index < N + 2; index++) - { - ctx.pbox[index] = ORIG_P[index] ^ key[keyIndex]; - keyIndex++; - if(keyIndex >= keysize) - { - keyIndex = 0; - } - } - - let Data1 = 0; - let Data2 = 0; - let res = 0; - for(let i = 0; i < N + 2; i += 2) - { - res = BlowFish_Encrypt(ctx, Data1, Data2); - Data1 = res.left; - Data2 = res.right; - ctx.pbox[i] = Data1; - ctx.pbox[i + 1] = Data2; - } - - for(let i = 0; i < 4; i++) - { - for(let j = 0; j < 256; j += 2) - { - res = BlowFish_Encrypt(ctx, Data1, Data2); - Data1 = res.left; - Data2 = res.right; - ctx.sbox[i][j] = Data1; - ctx.sbox[i][j + 1] = Data2; - } - } - - return true; - } - - /** - * Blowfish block cipher algorithm. - */ - var Blowfish = C_algo.Blowfish = BlockCipher.extend({ - _doReset: function () { - // Skip reset of nRounds has been set before and key did not change - if (this._keyPriorReset === this._key) { - return; - } - - // Shortcuts - var key = this._keyPriorReset = this._key; - var keyWords = key.words; - var keySize = key.sigBytes / 4; - - //Initialization pbox and sbox - BlowFishInit(BLOWFISH_CTX, keyWords, keySize); - }, - - encryptBlock: function (M, offset) { - var res = BlowFish_Encrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); - M[offset] = res.left; - M[offset + 1] = res.right; - }, - - decryptBlock: function (M, offset) { - var res = BlowFish_Decrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); - M[offset] = res.left; - M[offset + 1] = res.right; - }, - - blockSize: 64/32, - - keySize: 128/32, - - ivSize: 64/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.Blowfish.encrypt(message, key, cfg); - * var plaintext = CryptoJS.Blowfish.decrypt(ciphertext, key, cfg); - */ - C.Blowfish = BlockCipher._createHelper(Blowfish); - }()); - - - return CryptoJS.Blowfish; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/cipher-core.js": -/*!***********************************************!*\ - !*** ./node_modules/crypto-js/cipher-core.js ***! - \***********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Cipher core components. - */ - CryptoJS.lib.Cipher || (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var Base64 = C_enc.Base64; - var C_algo = C.algo; - var EvpKDF = C_algo.EvpKDF; - - /** - * Abstract base cipher template. - * - * @property {number} keySize This cipher's key size. Default: 4 (128 bits) - * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) - * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. - * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. - */ - var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ - /** - * Configuration options. - * - * @property {WordArray} iv The IV to use for this operation. - */ - cfg: Base.extend(), - - /** - * Creates this cipher in encryption mode. - * - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {Cipher} A cipher instance. - * - * @static - * - * @example - * - * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); - */ - createEncryptor: function (key, cfg) { - return this.create(this._ENC_XFORM_MODE, key, cfg); - }, - - /** - * Creates this cipher in decryption mode. - * - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {Cipher} A cipher instance. - * - * @static - * - * @example - * - * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); - */ - createDecryptor: function (key, cfg) { - return this.create(this._DEC_XFORM_MODE, key, cfg); - }, - - /** - * Initializes a newly created cipher. - * - * @param {number} xformMode Either the encryption or decryption transormation mode constant. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @example - * - * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); - */ - init: function (xformMode, key, cfg) { - // Apply config defaults - this.cfg = this.cfg.extend(cfg); - - // Store transform mode and key - this._xformMode = xformMode; - this._key = key; - - // Set initial values - this.reset(); - }, - - /** - * Resets this cipher to its initial state. - * - * @example - * - * cipher.reset(); - */ - reset: function () { - // Reset data buffer - BufferedBlockAlgorithm.reset.call(this); - - // Perform concrete-cipher logic - this._doReset(); - }, - - /** - * Adds data to be encrypted or decrypted. - * - * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. - * - * @return {WordArray} The data after processing. - * - * @example - * - * var encrypted = cipher.process('data'); - * var encrypted = cipher.process(wordArray); - */ - process: function (dataUpdate) { - // Append - this._append(dataUpdate); - - // Process available blocks - return this._process(); - }, - - /** - * Finalizes the encryption or decryption process. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. - * - * @return {WordArray} The data after final processing. - * - * @example - * - * var encrypted = cipher.finalize(); - * var encrypted = cipher.finalize('data'); - * var encrypted = cipher.finalize(wordArray); - */ - finalize: function (dataUpdate) { - // Final data update - if (dataUpdate) { - this._append(dataUpdate); - } - - // Perform concrete-cipher logic - var finalProcessedData = this._doFinalize(); - - return finalProcessedData; - }, - - keySize: 128/32, - - ivSize: 128/32, - - _ENC_XFORM_MODE: 1, - - _DEC_XFORM_MODE: 2, - - /** - * Creates shortcut functions to a cipher's object interface. - * - * @param {Cipher} cipher The cipher to create a helper for. - * - * @return {Object} An object with encrypt and decrypt shortcut functions. - * - * @static - * - * @example - * - * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); - */ - _createHelper: (function () { - function selectCipherStrategy(key) { - if (typeof key == 'string') { - return PasswordBasedCipher; - } else { - return SerializableCipher; - } - } - - return function (cipher) { - return { - encrypt: function (message, key, cfg) { - return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); - }, - - decrypt: function (ciphertext, key, cfg) { - return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); - } - }; - }; - }()) - }); - - /** - * Abstract base stream cipher template. - * - * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) - */ - var StreamCipher = C_lib.StreamCipher = Cipher.extend({ - _doFinalize: function () { - // Process partial blocks - var finalProcessedBlocks = this._process(!!'flush'); - - return finalProcessedBlocks; - }, - - blockSize: 1 - }); - - /** - * Mode namespace. - */ - var C_mode = C.mode = {}; - - /** - * Abstract base block cipher mode template. - */ - var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ - /** - * Creates this mode for encryption. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @static - * - * @example - * - * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); - */ - createEncryptor: function (cipher, iv) { - return this.Encryptor.create(cipher, iv); - }, - - /** - * Creates this mode for decryption. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @static - * - * @example - * - * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); - */ - createDecryptor: function (cipher, iv) { - return this.Decryptor.create(cipher, iv); - }, - - /** - * Initializes a newly created mode. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @example - * - * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); - */ - init: function (cipher, iv) { - this._cipher = cipher; - this._iv = iv; - } - }); - - /** - * Cipher Block Chaining mode. - */ - var CBC = C_mode.CBC = (function () { - /** - * Abstract base CBC mode. - */ - var CBC = BlockCipherMode.extend(); - - /** - * CBC encryptor. - */ - CBC.Encryptor = CBC.extend({ - /** - * Processes the data block at offset. - * - * @param {Array} words The data words to operate on. - * @param {number} offset The offset where the block starts. - * - * @example - * - * mode.processBlock(data.words, offset); - */ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // XOR and encrypt - xorBlock.call(this, words, offset, blockSize); - cipher.encryptBlock(words, offset); - - // Remember this block to use with next block - this._prevBlock = words.slice(offset, offset + blockSize); - } - }); - - /** - * CBC decryptor. - */ - CBC.Decryptor = CBC.extend({ - /** - * Processes the data block at offset. - * - * @param {Array} words The data words to operate on. - * @param {number} offset The offset where the block starts. - * - * @example - * - * mode.processBlock(data.words, offset); - */ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // Remember this block to use with next block - var thisBlock = words.slice(offset, offset + blockSize); - - // Decrypt and XOR - cipher.decryptBlock(words, offset); - xorBlock.call(this, words, offset, blockSize); - - // This block becomes the previous block - this._prevBlock = thisBlock; - } - }); - - function xorBlock(words, offset, blockSize) { - var block; - - // Shortcut - var iv = this._iv; - - // Choose mixing block - if (iv) { - block = iv; - - // Remove IV for subsequent blocks - this._iv = undefined; - } else { - block = this._prevBlock; - } - - // XOR blocks - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= block[i]; - } - } - - return CBC; - }()); - - /** - * Padding namespace. - */ - var C_pad = C.pad = {}; - - /** - * PKCS #5/7 padding strategy. - */ - var Pkcs7 = C_pad.Pkcs7 = { - /** - * Pads data using the algorithm defined in PKCS #5/7. - * - * @param {WordArray} data The data to pad. - * @param {number} blockSize The multiple that the data should be padded to. - * - * @static - * - * @example - * - * CryptoJS.pad.Pkcs7.pad(wordArray, 4); - */ - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - - // Create padding word - var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; - - // Create padding - var paddingWords = []; - for (var i = 0; i < nPaddingBytes; i += 4) { - paddingWords.push(paddingWord); - } - var padding = WordArray.create(paddingWords, nPaddingBytes); - - // Add padding - data.concat(padding); - }, - - /** - * Unpads data that had been padded using the algorithm defined in PKCS #5/7. - * - * @param {WordArray} data The data to unpad. - * - * @static - * - * @example - * - * CryptoJS.pad.Pkcs7.unpad(wordArray); - */ - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - /** - * Abstract base block cipher template. - * - * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) - */ - var BlockCipher = C_lib.BlockCipher = Cipher.extend({ - /** - * Configuration options. - * - * @property {Mode} mode The block mode to use. Default: CBC - * @property {Padding} padding The padding strategy to use. Default: Pkcs7 - */ - cfg: Cipher.cfg.extend({ - mode: CBC, - padding: Pkcs7 - }), - - reset: function () { - var modeCreator; - - // Reset cipher - Cipher.reset.call(this); - - // Shortcuts - var cfg = this.cfg; - var iv = cfg.iv; - var mode = cfg.mode; - - // Reset block mode - if (this._xformMode == this._ENC_XFORM_MODE) { - modeCreator = mode.createEncryptor; - } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { - modeCreator = mode.createDecryptor; - // Keep at least one block in the buffer for unpadding - this._minBufferSize = 1; - } - - if (this._mode && this._mode.__creator == modeCreator) { - this._mode.init(this, iv && iv.words); - } else { - this._mode = modeCreator.call(mode, this, iv && iv.words); - this._mode.__creator = modeCreator; - } - }, - - _doProcessBlock: function (words, offset) { - this._mode.processBlock(words, offset); - }, - - _doFinalize: function () { - var finalProcessedBlocks; - - // Shortcut - var padding = this.cfg.padding; - - // Finalize - if (this._xformMode == this._ENC_XFORM_MODE) { - // Pad data - padding.pad(this._data, this.blockSize); - - // Process final blocks - finalProcessedBlocks = this._process(!!'flush'); - } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { - // Process final blocks - finalProcessedBlocks = this._process(!!'flush'); - - // Unpad data - padding.unpad(finalProcessedBlocks); - } - - return finalProcessedBlocks; - }, - - blockSize: 128/32 - }); - - /** - * A collection of cipher parameters. - * - * @property {WordArray} ciphertext The raw ciphertext. - * @property {WordArray} key The key to this ciphertext. - * @property {WordArray} iv The IV used in the ciphering operation. - * @property {WordArray} salt The salt used with a key derivation function. - * @property {Cipher} algorithm The cipher algorithm. - * @property {Mode} mode The block mode used in the ciphering operation. - * @property {Padding} padding The padding scheme used in the ciphering operation. - * @property {number} blockSize The block size of the cipher. - * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. - */ - var CipherParams = C_lib.CipherParams = Base.extend({ - /** - * Initializes a newly created cipher params object. - * - * @param {Object} cipherParams An object with any of the possible cipher parameters. - * - * @example - * - * var cipherParams = CryptoJS.lib.CipherParams.create({ - * ciphertext: ciphertextWordArray, - * key: keyWordArray, - * iv: ivWordArray, - * salt: saltWordArray, - * algorithm: CryptoJS.algo.AES, - * mode: CryptoJS.mode.CBC, - * padding: CryptoJS.pad.PKCS7, - * blockSize: 4, - * formatter: CryptoJS.format.OpenSSL - * }); - */ - init: function (cipherParams) { - this.mixIn(cipherParams); - }, - - /** - * Converts this cipher params object to a string. - * - * @param {Format} formatter (Optional) The formatting strategy to use. - * - * @return {string} The stringified cipher params. - * - * @throws Error If neither the formatter nor the default formatter is set. - * - * @example - * - * var string = cipherParams + ''; - * var string = cipherParams.toString(); - * var string = cipherParams.toString(CryptoJS.format.OpenSSL); - */ - toString: function (formatter) { - return (formatter || this.formatter).stringify(this); - } - }); - - /** - * Format namespace. - */ - var C_format = C.format = {}; - - /** - * OpenSSL formatting strategy. - */ - var OpenSSLFormatter = C_format.OpenSSL = { - /** - * Converts a cipher params object to an OpenSSL-compatible string. - * - * @param {CipherParams} cipherParams The cipher params object. - * - * @return {string} The OpenSSL-compatible string. - * - * @static - * - * @example - * - * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); - */ - stringify: function (cipherParams) { - var wordArray; - - // Shortcuts - var ciphertext = cipherParams.ciphertext; - var salt = cipherParams.salt; - - // Format - if (salt) { - wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); - } else { - wordArray = ciphertext; - } - - return wordArray.toString(Base64); - }, - - /** - * Converts an OpenSSL-compatible string to a cipher params object. - * - * @param {string} openSSLStr The OpenSSL-compatible string. - * - * @return {CipherParams} The cipher params object. - * - * @static - * - * @example - * - * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); - */ - parse: function (openSSLStr) { - var salt; - - // Parse base64 - var ciphertext = Base64.parse(openSSLStr); - - // Shortcut - var ciphertextWords = ciphertext.words; - - // Test for salt - if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { - // Extract salt - salt = WordArray.create(ciphertextWords.slice(2, 4)); - - // Remove salt from ciphertext - ciphertextWords.splice(0, 4); - ciphertext.sigBytes -= 16; - } - - return CipherParams.create({ ciphertext: ciphertext, salt: salt }); - } - }; - - /** - * A cipher wrapper that returns ciphertext as a serializable cipher params object. - */ - var SerializableCipher = C_lib.SerializableCipher = Base.extend({ - /** - * Configuration options. - * - * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL - */ - cfg: Base.extend({ - format: OpenSSLFormatter - }), - - /** - * Encrypts a message. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {WordArray|string} message The message to encrypt. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {CipherParams} A cipher params object. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - */ - encrypt: function (cipher, message, key, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Encrypt - var encryptor = cipher.createEncryptor(key, cfg); - var ciphertext = encryptor.finalize(message); - - // Shortcut - var cipherCfg = encryptor.cfg; - - // Create and return serializable cipher params - return CipherParams.create({ - ciphertext: ciphertext, - key: key, - iv: cipherCfg.iv, - algorithm: cipher, - mode: cipherCfg.mode, - padding: cipherCfg.padding, - blockSize: cipher.blockSize, - formatter: cfg.format - }); - }, - - /** - * Decrypts serialized ciphertext. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {CipherParams|string} ciphertext The ciphertext to decrypt. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {WordArray} The plaintext. - * - * @static - * - * @example - * - * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - */ - decrypt: function (cipher, ciphertext, key, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Convert string to CipherParams - ciphertext = this._parse(ciphertext, cfg.format); - - // Decrypt - var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); - - return plaintext; - }, - - /** - * Converts serialized ciphertext to CipherParams, - * else assumed CipherParams already and returns ciphertext unchanged. - * - * @param {CipherParams|string} ciphertext The ciphertext. - * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. - * - * @return {CipherParams} The unserialized ciphertext. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); - */ - _parse: function (ciphertext, format) { - if (typeof ciphertext == 'string') { - return format.parse(ciphertext, this); - } else { - return ciphertext; - } - } - }); - - /** - * Key derivation function namespace. - */ - var C_kdf = C.kdf = {}; - - /** - * OpenSSL key derivation function. - */ - var OpenSSLKdf = C_kdf.OpenSSL = { - /** - * Derives a key and IV from a password. - * - * @param {string} password The password to derive from. - * @param {number} keySize The size in words of the key to generate. - * @param {number} ivSize The size in words of the IV to generate. - * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. - * - * @return {CipherParams} A cipher params object with the key, IV, and salt. - * - * @static - * - * @example - * - * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); - * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); - */ - execute: function (password, keySize, ivSize, salt, hasher) { - // Generate random salt - if (!salt) { - salt = WordArray.random(64/8); - } - - // Derive key and IV - if (!hasher) { - var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); - } else { - var key = EvpKDF.create({ keySize: keySize + ivSize, hasher: hasher }).compute(password, salt); - } - - - // Separate key and IV - var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); - key.sigBytes = keySize * 4; - - // Return params - return CipherParams.create({ key: key, iv: iv, salt: salt }); - } - }; - - /** - * A serializable cipher wrapper that derives the key from a password, - * and returns ciphertext as a serializable cipher params object. - */ - var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ - /** - * Configuration options. - * - * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL - */ - cfg: SerializableCipher.cfg.extend({ - kdf: OpenSSLKdf - }), - - /** - * Encrypts a message using a password. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {WordArray|string} message The message to encrypt. - * @param {string} password The password. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {CipherParams} A cipher params object. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); - * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); - */ - encrypt: function (cipher, message, password, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Derive key and other params - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher); - - // Add IV to config - cfg.iv = derivedParams.iv; - - // Encrypt - var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); - - // Mix in derived params - ciphertext.mixIn(derivedParams); - - return ciphertext; - }, - - /** - * Decrypts serialized ciphertext using a password. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {CipherParams|string} ciphertext The ciphertext to decrypt. - * @param {string} password The password. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {WordArray} The plaintext. - * - * @static - * - * @example - * - * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); - * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); - */ - decrypt: function (cipher, ciphertext, password, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Convert string to CipherParams - ciphertext = this._parse(ciphertext, cfg.format); - - // Derive key and other params - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher); - - // Add IV to config - cfg.iv = derivedParams.iv; - - // Decrypt - var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); - - return plaintext; - } - }); - }()); - - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/core.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/core.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(); - } - else {} -}(this, function () { - - /*globals window, global, require*/ - - /** - * CryptoJS core components. - */ - var CryptoJS = CryptoJS || (function (Math, undefined) { - - var crypto; - - // Native crypto from window (Browser) - if (typeof window !== 'undefined' && window.crypto) { - crypto = window.crypto; - } - - // Native crypto in web worker (Browser) - if (typeof self !== 'undefined' && self.crypto) { - crypto = self.crypto; - } - - // Native crypto from worker - if (typeof globalThis !== 'undefined' && globalThis.crypto) { - crypto = globalThis.crypto; - } - - // Native (experimental IE 11) crypto from window (Browser) - if (!crypto && typeof window !== 'undefined' && window.msCrypto) { - crypto = window.msCrypto; - } - - // Native crypto from global (NodeJS) - if (!crypto && typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.crypto) { - crypto = __webpack_require__.g.crypto; - } - - // Native crypto import via require (NodeJS) - if (!crypto && "function" === 'function') { - try { - crypto = __webpack_require__(/*! crypto */ "?9157"); - } catch (err) {} - } - - /* - * Cryptographically secure pseudorandom number generator - * - * As Math.random() is cryptographically not safe to use - */ - var cryptoSecureRandomInt = function () { - if (crypto) { - // Use getRandomValues method (Browser) - if (typeof crypto.getRandomValues === 'function') { - try { - return crypto.getRandomValues(new Uint32Array(1))[0]; - } catch (err) {} - } - - // Use randomBytes method (NodeJS) - if (typeof crypto.randomBytes === 'function') { - try { - return crypto.randomBytes(4).readInt32LE(); - } catch (err) {} - } - } - - throw new Error('Native crypto module could not be used to get secure random number.'); - }; - - /* - * Local polyfill of Object.create - - */ - var create = Object.create || (function () { - function F() {} - - return function (obj) { - var subtype; - - F.prototype = obj; - - subtype = new F(); - - F.prototype = null; - - return subtype; - }; - }()); - - /** - * CryptoJS namespace. - */ - var C = {}; - - /** - * Library namespace. - */ - var C_lib = C.lib = {}; - - /** - * Base object for prototypal inheritance. - */ - var Base = C_lib.Base = (function () { - - - return { - /** - * Creates a new object that inherits from this object. - * - * @param {Object} overrides Properties to copy into the new object. - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * field: 'value', - * - * method: function () { - * } - * }); - */ - extend: function (overrides) { - // Spawn - var subtype = create(this); - - // Augment - if (overrides) { - subtype.mixIn(overrides); - } - - // Create default initializer - if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { - subtype.init = function () { - subtype.$super.init.apply(this, arguments); - }; - } - - // Initializer's prototype is the subtype object - subtype.init.prototype = subtype; - - // Reference supertype - subtype.$super = this; - - return subtype; - }, - - /** - * Extends this object and runs the init method. - * Arguments to create() will be passed to init(). - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var instance = MyType.create(); - */ - create: function () { - var instance = this.extend(); - instance.init.apply(instance, arguments); - - return instance; - }, - - /** - * Initializes a newly created object. - * Override this method to add some logic when your objects are created. - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * init: function () { - * // ... - * } - * }); - */ - init: function () { - }, - - /** - * Copies properties into this object. - * - * @param {Object} properties The properties to mix in. - * - * @example - * - * MyType.mixIn({ - * field: 'value' - * }); - */ - mixIn: function (properties) { - for (var propertyName in properties) { - if (properties.hasOwnProperty(propertyName)) { - this[propertyName] = properties[propertyName]; - } - } - - // IE won't copy toString using the loop above - if (properties.hasOwnProperty('toString')) { - this.toString = properties.toString; - } - }, - - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = instance.clone(); - */ - clone: function () { - return this.init.prototype.extend(this); - } - }; - }()); - - /** - * An array of 32-bit words. - * - * @property {Array} words The array of 32-bit words. - * @property {number} sigBytes The number of significant bytes in this word array. - */ - var WordArray = C_lib.WordArray = Base.extend({ - /** - * Initializes a newly created word array. - * - * @param {Array} words (Optional) An array of 32-bit words. - * @param {number} sigBytes (Optional) The number of significant bytes in the words. - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.create(); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); - */ - init: function (words, sigBytes) { - words = this.words = words || []; - - if (sigBytes != undefined) { - this.sigBytes = sigBytes; - } else { - this.sigBytes = words.length * 4; - } - }, - - /** - * Converts this word array to a string. - * - * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex - * - * @return {string} The stringified word array. - * - * @example - * - * var string = wordArray + ''; - * var string = wordArray.toString(); - * var string = wordArray.toString(CryptoJS.enc.Utf8); - */ - toString: function (encoder) { - return (encoder || Hex).stringify(this); - }, - - /** - * Concatenates a word array to this word array. - * - * @param {WordArray} wordArray The word array to append. - * - * @return {WordArray} This word array. - * - * @example - * - * wordArray1.concat(wordArray2); - */ - concat: function (wordArray) { - // Shortcuts - var thisWords = this.words; - var thatWords = wordArray.words; - var thisSigBytes = this.sigBytes; - var thatSigBytes = wordArray.sigBytes; - - // Clamp excess bits - this.clamp(); - - // Concat - if (thisSigBytes % 4) { - // Copy one byte at a time - for (var i = 0; i < thatSigBytes; i++) { - var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); - } - } else { - // Copy one word at a time - for (var j = 0; j < thatSigBytes; j += 4) { - thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2]; - } - } - this.sigBytes += thatSigBytes; - - // Chainable - return this; - }, - - /** - * Removes insignificant bits. - * - * @example - * - * wordArray.clamp(); - */ - clamp: function () { - // Shortcuts - var words = this.words; - var sigBytes = this.sigBytes; - - // Clamp - words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); - words.length = Math.ceil(sigBytes / 4); - }, - - /** - * Creates a copy of this word array. - * - * @return {WordArray} The clone. - * - * @example - * - * var clone = wordArray.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - clone.words = this.words.slice(0); - - return clone; - }, - - /** - * Creates a word array filled with random bytes. - * - * @param {number} nBytes The number of random bytes to generate. - * - * @return {WordArray} The random word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.random(16); - */ - random: function (nBytes) { - var words = []; - - for (var i = 0; i < nBytes; i += 4) { - words.push(cryptoSecureRandomInt()); - } - - return new WordArray.init(words, nBytes); - } - }); - - /** - * Encoder namespace. - */ - var C_enc = C.enc = {}; - - /** - * Hex encoding strategy. - */ - var Hex = C_enc.Hex = { - /** - * Converts a word array to a hex string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The hex string. - * - * @static - * - * @example - * - * var hexString = CryptoJS.enc.Hex.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var hexChars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - hexChars.push((bite >>> 4).toString(16)); - hexChars.push((bite & 0x0f).toString(16)); - } - - return hexChars.join(''); - }, - - /** - * Converts a hex string to a word array. - * - * @param {string} hexStr The hex string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Hex.parse(hexString); - */ - parse: function (hexStr) { - // Shortcut - var hexStrLength = hexStr.length; - - // Convert - var words = []; - for (var i = 0; i < hexStrLength; i += 2) { - words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); - } - - return new WordArray.init(words, hexStrLength / 2); - } - }; - - /** - * Latin1 encoding strategy. - */ - var Latin1 = C_enc.Latin1 = { - /** - * Converts a word array to a Latin1 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The Latin1 string. - * - * @static - * - * @example - * - * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var latin1Chars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - latin1Chars.push(String.fromCharCode(bite)); - } - - return latin1Chars.join(''); - }, - - /** - * Converts a Latin1 string to a word array. - * - * @param {string} latin1Str The Latin1 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); - */ - parse: function (latin1Str) { - // Shortcut - var latin1StrLength = latin1Str.length; - - // Convert - var words = []; - for (var i = 0; i < latin1StrLength; i++) { - words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); - } - - return new WordArray.init(words, latin1StrLength); - } - }; - - /** - * UTF-8 encoding strategy. - */ - var Utf8 = C_enc.Utf8 = { - /** - * Converts a word array to a UTF-8 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-8 string. - * - * @static - * - * @example - * - * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); - */ - stringify: function (wordArray) { - try { - return decodeURIComponent(escape(Latin1.stringify(wordArray))); - } catch (e) { - throw new Error('Malformed UTF-8 data'); - } - }, - - /** - * Converts a UTF-8 string to a word array. - * - * @param {string} utf8Str The UTF-8 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); - */ - parse: function (utf8Str) { - return Latin1.parse(unescape(encodeURIComponent(utf8Str))); - } - }; - - /** - * Abstract buffered block algorithm template. - * - * The property blockSize must be implemented in a concrete subtype. - * - * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 - */ - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ - /** - * Resets this block algorithm's data buffer to its initial state. - * - * @example - * - * bufferedBlockAlgorithm.reset(); - */ - reset: function () { - // Initial values - this._data = new WordArray.init(); - this._nDataBytes = 0; - }, - - /** - * Adds new data to this block algorithm's buffer. - * - * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. - * - * @example - * - * bufferedBlockAlgorithm._append('data'); - * bufferedBlockAlgorithm._append(wordArray); - */ - _append: function (data) { - // Convert string to WordArray, else assume WordArray already - if (typeof data == 'string') { - data = Utf8.parse(data); - } - - // Append - this._data.concat(data); - this._nDataBytes += data.sigBytes; - }, - - /** - * Processes available data blocks. - * - * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. - * - * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. - * - * @return {WordArray} The processed data. - * - * @example - * - * var processedData = bufferedBlockAlgorithm._process(); - * var processedData = bufferedBlockAlgorithm._process(!!'flush'); - */ - _process: function (doFlush) { - var processedWords; - - // Shortcuts - var data = this._data; - var dataWords = data.words; - var dataSigBytes = data.sigBytes; - var blockSize = this.blockSize; - var blockSizeBytes = blockSize * 4; - - // Count blocks ready - var nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - // Round up to include partial blocks - nBlocksReady = Math.ceil(nBlocksReady); - } else { - // Round down to include only full blocks, - // less the number of blocks that must remain in the buffer - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } - - // Count words ready - var nWordsReady = nBlocksReady * blockSize; - - // Count bytes ready - var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); - - // Process blocks - if (nWordsReady) { - for (var offset = 0; offset < nWordsReady; offset += blockSize) { - // Perform concrete-algorithm logic - this._doProcessBlock(dataWords, offset); - } - - // Remove processed words - processedWords = dataWords.splice(0, nWordsReady); - data.sigBytes -= nBytesReady; - } - - // Return processed words - return new WordArray.init(processedWords, nBytesReady); - }, - - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = bufferedBlockAlgorithm.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - clone._data = this._data.clone(); - - return clone; - }, - - _minBufferSize: 0 - }); - - /** - * Abstract hasher template. - * - * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) - */ - var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ - /** - * Configuration options. - */ - cfg: Base.extend(), - - /** - * Initializes a newly created hasher. - * - * @param {Object} cfg (Optional) The configuration options to use for this hash computation. - * - * @example - * - * var hasher = CryptoJS.algo.SHA256.create(); - */ - init: function (cfg) { - // Apply config defaults - this.cfg = this.cfg.extend(cfg); - - // Set initial values - this.reset(); - }, - - /** - * Resets this hasher to its initial state. - * - * @example - * - * hasher.reset(); - */ - reset: function () { - // Reset data buffer - BufferedBlockAlgorithm.reset.call(this); - - // Perform concrete-hasher logic - this._doReset(); - }, - - /** - * Updates this hasher with a message. - * - * @param {WordArray|string} messageUpdate The message to append. - * - * @return {Hasher} This hasher. - * - * @example - * - * hasher.update('message'); - * hasher.update(wordArray); - */ - update: function (messageUpdate) { - // Append - this._append(messageUpdate); - - // Update the hash - this._process(); - - // Chainable - return this; - }, - - /** - * Finalizes the hash computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} messageUpdate (Optional) A final message update. - * - * @return {WordArray} The hash. - * - * @example - * - * var hash = hasher.finalize(); - * var hash = hasher.finalize('message'); - * var hash = hasher.finalize(wordArray); - */ - finalize: function (messageUpdate) { - // Final message update - if (messageUpdate) { - this._append(messageUpdate); - } - - // Perform concrete-hasher logic - var hash = this._doFinalize(); - - return hash; - }, - - blockSize: 512/32, - - /** - * Creates a shortcut function to a hasher's object interface. - * - * @param {Hasher} hasher The hasher to create a helper for. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); - */ - _createHelper: function (hasher) { - return function (message, cfg) { - return new hasher.init(cfg).finalize(message); - }; - }, - - /** - * Creates a shortcut function to the HMAC's object interface. - * - * @param {Hasher} hasher The hasher to use in this HMAC helper. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); - */ - _createHmacHelper: function (hasher) { - return function (message, key) { - return new C_algo.HMAC.init(hasher, key).finalize(message); - }; - } - }); - - /** - * Algorithm namespace. - */ - var C_algo = C.algo = {}; - - return C; - }(Math)); - - - return CryptoJS; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/enc-base64.js": -/*!**********************************************!*\ - !*** ./node_modules/crypto-js/enc-base64.js ***! - \**********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - - /** - * Base64 encoding strategy. - */ - var Base64 = C_enc.Base64 = { - /** - * Converts a word array to a Base64 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The Base64 string. - * - * @static - * - * @example - * - * var base64String = CryptoJS.enc.Base64.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var map = this._map; - - // Clamp excess bits - wordArray.clamp(); - - // Convert - var base64Chars = []; - for (var i = 0; i < sigBytes; i += 3) { - var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; - var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; - - var triplet = (byte1 << 16) | (byte2 << 8) | byte3; - - for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { - base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); - } - } - - // Add padding - var paddingChar = map.charAt(64); - if (paddingChar) { - while (base64Chars.length % 4) { - base64Chars.push(paddingChar); - } - } - - return base64Chars.join(''); - }, - - /** - * Converts a Base64 string to a word array. - * - * @param {string} base64Str The Base64 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Base64.parse(base64String); - */ - parse: function (base64Str) { - // Shortcuts - var base64StrLength = base64Str.length; - var map = this._map; - var reverseMap = this._reverseMap; - - if (!reverseMap) { - reverseMap = this._reverseMap = []; - for (var j = 0; j < map.length; j++) { - reverseMap[map.charCodeAt(j)] = j; - } - } - - // Ignore padding - var paddingChar = map.charAt(64); - if (paddingChar) { - var paddingIndex = base64Str.indexOf(paddingChar); - if (paddingIndex !== -1) { - base64StrLength = paddingIndex; - } - } - - // Convert - return parseLoop(base64Str, base64StrLength, reverseMap); - - }, - - _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' - }; - - function parseLoop(base64Str, base64StrLength, reverseMap) { - var words = []; - var nBytes = 0; - for (var i = 0; i < base64StrLength; i++) { - if (i % 4) { - var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); - var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); - var bitsCombined = bits1 | bits2; - words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); - nBytes++; - } - } - return WordArray.create(words, nBytes); - } - }()); - - - return CryptoJS.enc.Base64; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/enc-base64url.js": -/*!*************************************************!*\ - !*** ./node_modules/crypto-js/enc-base64url.js ***! - \*************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - - /** - * Base64url encoding strategy. - */ - var Base64url = C_enc.Base64url = { - /** - * Converts a word array to a Base64url string. - * - * @param {WordArray} wordArray The word array. - * - * @param {boolean} urlSafe Whether to use url safe - * - * @return {string} The Base64url string. - * - * @static - * - * @example - * - * var base64String = CryptoJS.enc.Base64url.stringify(wordArray); - */ - stringify: function (wordArray, urlSafe) { - if (urlSafe === undefined) { - urlSafe = true - } - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var map = urlSafe ? this._safe_map : this._map; - - // Clamp excess bits - wordArray.clamp(); - - // Convert - var base64Chars = []; - for (var i = 0; i < sigBytes; i += 3) { - var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; - var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; - - var triplet = (byte1 << 16) | (byte2 << 8) | byte3; - - for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { - base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); - } - } - - // Add padding - var paddingChar = map.charAt(64); - if (paddingChar) { - while (base64Chars.length % 4) { - base64Chars.push(paddingChar); - } - } - - return base64Chars.join(''); - }, - - /** - * Converts a Base64url string to a word array. - * - * @param {string} base64Str The Base64url string. - * - * @param {boolean} urlSafe Whether to use url safe - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Base64url.parse(base64String); - */ - parse: function (base64Str, urlSafe) { - if (urlSafe === undefined) { - urlSafe = true - } - - // Shortcuts - var base64StrLength = base64Str.length; - var map = urlSafe ? this._safe_map : this._map; - var reverseMap = this._reverseMap; - - if (!reverseMap) { - reverseMap = this._reverseMap = []; - for (var j = 0; j < map.length; j++) { - reverseMap[map.charCodeAt(j)] = j; - } - } - - // Ignore padding - var paddingChar = map.charAt(64); - if (paddingChar) { - var paddingIndex = base64Str.indexOf(paddingChar); - if (paddingIndex !== -1) { - base64StrLength = paddingIndex; - } - } - - // Convert - return parseLoop(base64Str, base64StrLength, reverseMap); - - }, - - _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', - _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', - }; - - function parseLoop(base64Str, base64StrLength, reverseMap) { - var words = []; - var nBytes = 0; - for (var i = 0; i < base64StrLength; i++) { - if (i % 4) { - var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); - var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); - var bitsCombined = bits1 | bits2; - words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); - nBytes++; - } - } - return WordArray.create(words, nBytes); - } - }()); - - - return CryptoJS.enc.Base64url; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/enc-utf16.js": -/*!*********************************************!*\ - !*** ./node_modules/crypto-js/enc-utf16.js ***! - \*********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - - /** - * UTF-16 BE encoding strategy. - */ - var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { - /** - * Converts a word array to a UTF-16 BE string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-16 BE string. - * - * @static - * - * @example - * - * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var utf16Chars = []; - for (var i = 0; i < sigBytes; i += 2) { - var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; - utf16Chars.push(String.fromCharCode(codePoint)); - } - - return utf16Chars.join(''); - }, - - /** - * Converts a UTF-16 BE string to a word array. - * - * @param {string} utf16Str The UTF-16 BE string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); - */ - parse: function (utf16Str) { - // Shortcut - var utf16StrLength = utf16Str.length; - - // Convert - var words = []; - for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); - } - - return WordArray.create(words, utf16StrLength * 2); - } - }; - - /** - * UTF-16 LE encoding strategy. - */ - C_enc.Utf16LE = { - /** - * Converts a word array to a UTF-16 LE string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-16 LE string. - * - * @static - * - * @example - * - * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var utf16Chars = []; - for (var i = 0; i < sigBytes; i += 2) { - var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); - utf16Chars.push(String.fromCharCode(codePoint)); - } - - return utf16Chars.join(''); - }, - - /** - * Converts a UTF-16 LE string to a word array. - * - * @param {string} utf16Str The UTF-16 LE string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); - */ - parse: function (utf16Str) { - // Shortcut - var utf16StrLength = utf16Str.length; - - // Convert - var words = []; - for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); - } - - return WordArray.create(words, utf16StrLength * 2); - } - }; - - function swapEndian(word) { - return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); - } - }()); - - - return CryptoJS.enc.Utf16; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/evpkdf.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/evpkdf.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha1 */ "./node_modules/crypto-js/sha1.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var MD5 = C_algo.MD5; - - /** - * This key derivation function is meant to conform with EVP_BytesToKey. - * www.openssl.org/docs/crypto/EVP_BytesToKey.html - */ - var EvpKDF = C_algo.EvpKDF = Base.extend({ - /** - * Configuration options. - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hash algorithm to use. Default: MD5 - * @property {number} iterations The number of iterations to perform. Default: 1 - */ - cfg: Base.extend({ - keySize: 128/32, - hasher: MD5, - iterations: 1 - }), - - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * var kdf = CryptoJS.algo.EvpKDF.create(); - * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); - * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); - */ - init: function (cfg) { - this.cfg = this.cfg.extend(cfg); - }, - - /** - * Derives a key from a password. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * var key = kdf.compute(password, salt); - */ - compute: function (password, salt) { - var block; - - // Shortcut - var cfg = this.cfg; - - // Init hasher - var hasher = cfg.hasher.create(); - - // Initial values - var derivedKey = WordArray.create(); - - // Shortcuts - var derivedKeyWords = derivedKey.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; - - // Generate key - while (derivedKeyWords.length < keySize) { - if (block) { - hasher.update(block); - } - block = hasher.update(password).finalize(salt); - hasher.reset(); - - // Iterations - for (var i = 1; i < iterations; i++) { - block = hasher.finalize(block); - hasher.reset(); - } - - derivedKey.concat(block); - } - derivedKey.sigBytes = keySize * 4; - - return derivedKey; - } - }); - - /** - * Derives a key from a password. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * @param {Object} cfg (Optional) The configuration options to use for this computation. - * - * @return {WordArray} The derived key. - * - * @static - * - * @example - * - * var key = CryptoJS.EvpKDF(password, salt); - * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); - * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); - */ - C.EvpKDF = function (password, salt, cfg) { - return EvpKDF.create(cfg).compute(password, salt); - }; - }()); - - - return CryptoJS.EvpKDF; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/format-hex.js": -/*!**********************************************!*\ - !*** ./node_modules/crypto-js/format-hex.js ***! - \**********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var CipherParams = C_lib.CipherParams; - var C_enc = C.enc; - var Hex = C_enc.Hex; - var C_format = C.format; - - var HexFormatter = C_format.Hex = { - /** - * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. - * - * @param {CipherParams} cipherParams The cipher params object. - * - * @return {string} The hexadecimally encoded string. - * - * @static - * - * @example - * - * var hexString = CryptoJS.format.Hex.stringify(cipherParams); - */ - stringify: function (cipherParams) { - return cipherParams.ciphertext.toString(Hex); - }, - - /** - * Converts a hexadecimally encoded ciphertext string to a cipher params object. - * - * @param {string} input The hexadecimally encoded string. - * - * @return {CipherParams} The cipher params object. - * - * @static - * - * @example - * - * var cipherParams = CryptoJS.format.Hex.parse(hexString); - */ - parse: function (input) { - var ciphertext = Hex.parse(input); - return CipherParams.create({ ciphertext: ciphertext }); - } - }; - }()); - - - return CryptoJS.format.Hex; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/hmac.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/hmac.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var C_algo = C.algo; - - /** - * HMAC algorithm. - */ - var HMAC = C_algo.HMAC = Base.extend({ - /** - * Initializes a newly created HMAC. - * - * @param {Hasher} hasher The hash algorithm to use. - * @param {WordArray|string} key The secret key. - * - * @example - * - * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); - */ - init: function (hasher, key) { - // Init hasher - hasher = this._hasher = new hasher.init(); - - // Convert string to WordArray, else assume WordArray already - if (typeof key == 'string') { - key = Utf8.parse(key); - } - - // Shortcuts - var hasherBlockSize = hasher.blockSize; - var hasherBlockSizeBytes = hasherBlockSize * 4; - - // Allow arbitrary length keys - if (key.sigBytes > hasherBlockSizeBytes) { - key = hasher.finalize(key); - } - - // Clamp excess bits - key.clamp(); - - // Clone key for inner and outer pads - var oKey = this._oKey = key.clone(); - var iKey = this._iKey = key.clone(); - - // Shortcuts - var oKeyWords = oKey.words; - var iKeyWords = iKey.words; - - // XOR keys with pad constants - for (var i = 0; i < hasherBlockSize; i++) { - oKeyWords[i] ^= 0x5c5c5c5c; - iKeyWords[i] ^= 0x36363636; - } - oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; - - // Set initial values - this.reset(); - }, - - /** - * Resets this HMAC to its initial state. - * - * @example - * - * hmacHasher.reset(); - */ - reset: function () { - // Shortcut - var hasher = this._hasher; - - // Reset - hasher.reset(); - hasher.update(this._iKey); - }, - - /** - * Updates this HMAC with a message. - * - * @param {WordArray|string} messageUpdate The message to append. - * - * @return {HMAC} This HMAC instance. - * - * @example - * - * hmacHasher.update('message'); - * hmacHasher.update(wordArray); - */ - update: function (messageUpdate) { - this._hasher.update(messageUpdate); - - // Chainable - return this; - }, - - /** - * Finalizes the HMAC computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} messageUpdate (Optional) A final message update. - * - * @return {WordArray} The HMAC. - * - * @example - * - * var hmac = hmacHasher.finalize(); - * var hmac = hmacHasher.finalize('message'); - * var hmac = hmacHasher.finalize(wordArray); - */ - finalize: function (messageUpdate) { - // Shortcut - var hasher = this._hasher; - - // Compute HMAC - var innerHash = hasher.finalize(messageUpdate); - hasher.reset(); - var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); - - return hmac; - } - }); - }()); - - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/index.js": -/*!*****************************************!*\ - !*** ./node_modules/crypto-js/index.js ***! - \*****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js"), __webpack_require__(/*! ./lib-typedarrays */ "./node_modules/crypto-js/lib-typedarrays.js"), __webpack_require__(/*! ./enc-utf16 */ "./node_modules/crypto-js/enc-utf16.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./enc-base64url */ "./node_modules/crypto-js/enc-base64url.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./sha1 */ "./node_modules/crypto-js/sha1.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js"), __webpack_require__(/*! ./sha224 */ "./node_modules/crypto-js/sha224.js"), __webpack_require__(/*! ./sha512 */ "./node_modules/crypto-js/sha512.js"), __webpack_require__(/*! ./sha384 */ "./node_modules/crypto-js/sha384.js"), __webpack_require__(/*! ./sha3 */ "./node_modules/crypto-js/sha3.js"), __webpack_require__(/*! ./ripemd160 */ "./node_modules/crypto-js/ripemd160.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js"), __webpack_require__(/*! ./pbkdf2 */ "./node_modules/crypto-js/pbkdf2.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js"), __webpack_require__(/*! ./mode-cfb */ "./node_modules/crypto-js/mode-cfb.js"), __webpack_require__(/*! ./mode-ctr */ "./node_modules/crypto-js/mode-ctr.js"), __webpack_require__(/*! ./mode-ctr-gladman */ "./node_modules/crypto-js/mode-ctr-gladman.js"), __webpack_require__(/*! ./mode-ofb */ "./node_modules/crypto-js/mode-ofb.js"), __webpack_require__(/*! ./mode-ecb */ "./node_modules/crypto-js/mode-ecb.js"), __webpack_require__(/*! ./pad-ansix923 */ "./node_modules/crypto-js/pad-ansix923.js"), __webpack_require__(/*! ./pad-iso10126 */ "./node_modules/crypto-js/pad-iso10126.js"), __webpack_require__(/*! ./pad-iso97971 */ "./node_modules/crypto-js/pad-iso97971.js"), __webpack_require__(/*! ./pad-zeropadding */ "./node_modules/crypto-js/pad-zeropadding.js"), __webpack_require__(/*! ./pad-nopadding */ "./node_modules/crypto-js/pad-nopadding.js"), __webpack_require__(/*! ./format-hex */ "./node_modules/crypto-js/format-hex.js"), __webpack_require__(/*! ./aes */ "./node_modules/crypto-js/aes.js"), __webpack_require__(/*! ./tripledes */ "./node_modules/crypto-js/tripledes.js"), __webpack_require__(/*! ./rc4 */ "./node_modules/crypto-js/rc4.js"), __webpack_require__(/*! ./rabbit */ "./node_modules/crypto-js/rabbit.js"), __webpack_require__(/*! ./rabbit-legacy */ "./node_modules/crypto-js/rabbit-legacy.js"), __webpack_require__(/*! ./blowfish */ "./node_modules/crypto-js/blowfish.js")); - } - else {} -}(this, function (CryptoJS) { - - return CryptoJS; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/lib-typedarrays.js": -/*!***************************************************!*\ - !*** ./node_modules/crypto-js/lib-typedarrays.js ***! - \***************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Check if typed arrays are supported - if (typeof ArrayBuffer != 'function') { - return; - } - - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - - // Reference original init - var superInit = WordArray.init; - - // Augment WordArray.init to handle typed arrays - var subInit = WordArray.init = function (typedArray) { - // Convert buffers to uint8 - if (typedArray instanceof ArrayBuffer) { - typedArray = new Uint8Array(typedArray); - } - - // Convert other array views to uint8 - if ( - typedArray instanceof Int8Array || - (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || - typedArray instanceof Int16Array || - typedArray instanceof Uint16Array || - typedArray instanceof Int32Array || - typedArray instanceof Uint32Array || - typedArray instanceof Float32Array || - typedArray instanceof Float64Array - ) { - typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); - } - - // Handle Uint8Array - if (typedArray instanceof Uint8Array) { - // Shortcut - var typedArrayByteLength = typedArray.byteLength; - - // Extract bytes - var words = []; - for (var i = 0; i < typedArrayByteLength; i++) { - words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); - } - - // Initialize this word array - superInit.call(this, words, typedArrayByteLength); - } else { - // Else call normal init - superInit.apply(this, arguments); - } - }; - - subInit.prototype = WordArray; - }()); - - - return CryptoJS.lib.WordArray; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/md5.js": -/*!***************************************!*\ - !*** ./node_modules/crypto-js/md5.js ***! - \***************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Constants table - var T = []; - - // Compute constants - (function () { - for (var i = 0; i < 64; i++) { - T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; - } - }()); - - /** - * MD5 hash algorithm. - */ - var MD5 = C_algo.MD5 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0x67452301, 0xefcdab89, - 0x98badcfe, 0x10325476 - ]); - }, - - _doProcessBlock: function (M, offset) { - // Swap endian - for (var i = 0; i < 16; i++) { - // Shortcuts - var offset_i = offset + i; - var M_offset_i = M[offset_i]; - - M[offset_i] = ( - (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | - (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) - ); - } - - // Shortcuts - var H = this._hash.words; - - var M_offset_0 = M[offset + 0]; - var M_offset_1 = M[offset + 1]; - var M_offset_2 = M[offset + 2]; - var M_offset_3 = M[offset + 3]; - var M_offset_4 = M[offset + 4]; - var M_offset_5 = M[offset + 5]; - var M_offset_6 = M[offset + 6]; - var M_offset_7 = M[offset + 7]; - var M_offset_8 = M[offset + 8]; - var M_offset_9 = M[offset + 9]; - var M_offset_10 = M[offset + 10]; - var M_offset_11 = M[offset + 11]; - var M_offset_12 = M[offset + 12]; - var M_offset_13 = M[offset + 13]; - var M_offset_14 = M[offset + 14]; - var M_offset_15 = M[offset + 15]; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - - // Computation - a = FF(a, b, c, d, M_offset_0, 7, T[0]); - d = FF(d, a, b, c, M_offset_1, 12, T[1]); - c = FF(c, d, a, b, M_offset_2, 17, T[2]); - b = FF(b, c, d, a, M_offset_3, 22, T[3]); - a = FF(a, b, c, d, M_offset_4, 7, T[4]); - d = FF(d, a, b, c, M_offset_5, 12, T[5]); - c = FF(c, d, a, b, M_offset_6, 17, T[6]); - b = FF(b, c, d, a, M_offset_7, 22, T[7]); - a = FF(a, b, c, d, M_offset_8, 7, T[8]); - d = FF(d, a, b, c, M_offset_9, 12, T[9]); - c = FF(c, d, a, b, M_offset_10, 17, T[10]); - b = FF(b, c, d, a, M_offset_11, 22, T[11]); - a = FF(a, b, c, d, M_offset_12, 7, T[12]); - d = FF(d, a, b, c, M_offset_13, 12, T[13]); - c = FF(c, d, a, b, M_offset_14, 17, T[14]); - b = FF(b, c, d, a, M_offset_15, 22, T[15]); - - a = GG(a, b, c, d, M_offset_1, 5, T[16]); - d = GG(d, a, b, c, M_offset_6, 9, T[17]); - c = GG(c, d, a, b, M_offset_11, 14, T[18]); - b = GG(b, c, d, a, M_offset_0, 20, T[19]); - a = GG(a, b, c, d, M_offset_5, 5, T[20]); - d = GG(d, a, b, c, M_offset_10, 9, T[21]); - c = GG(c, d, a, b, M_offset_15, 14, T[22]); - b = GG(b, c, d, a, M_offset_4, 20, T[23]); - a = GG(a, b, c, d, M_offset_9, 5, T[24]); - d = GG(d, a, b, c, M_offset_14, 9, T[25]); - c = GG(c, d, a, b, M_offset_3, 14, T[26]); - b = GG(b, c, d, a, M_offset_8, 20, T[27]); - a = GG(a, b, c, d, M_offset_13, 5, T[28]); - d = GG(d, a, b, c, M_offset_2, 9, T[29]); - c = GG(c, d, a, b, M_offset_7, 14, T[30]); - b = GG(b, c, d, a, M_offset_12, 20, T[31]); - - a = HH(a, b, c, d, M_offset_5, 4, T[32]); - d = HH(d, a, b, c, M_offset_8, 11, T[33]); - c = HH(c, d, a, b, M_offset_11, 16, T[34]); - b = HH(b, c, d, a, M_offset_14, 23, T[35]); - a = HH(a, b, c, d, M_offset_1, 4, T[36]); - d = HH(d, a, b, c, M_offset_4, 11, T[37]); - c = HH(c, d, a, b, M_offset_7, 16, T[38]); - b = HH(b, c, d, a, M_offset_10, 23, T[39]); - a = HH(a, b, c, d, M_offset_13, 4, T[40]); - d = HH(d, a, b, c, M_offset_0, 11, T[41]); - c = HH(c, d, a, b, M_offset_3, 16, T[42]); - b = HH(b, c, d, a, M_offset_6, 23, T[43]); - a = HH(a, b, c, d, M_offset_9, 4, T[44]); - d = HH(d, a, b, c, M_offset_12, 11, T[45]); - c = HH(c, d, a, b, M_offset_15, 16, T[46]); - b = HH(b, c, d, a, M_offset_2, 23, T[47]); - - a = II(a, b, c, d, M_offset_0, 6, T[48]); - d = II(d, a, b, c, M_offset_7, 10, T[49]); - c = II(c, d, a, b, M_offset_14, 15, T[50]); - b = II(b, c, d, a, M_offset_5, 21, T[51]); - a = II(a, b, c, d, M_offset_12, 6, T[52]); - d = II(d, a, b, c, M_offset_3, 10, T[53]); - c = II(c, d, a, b, M_offset_10, 15, T[54]); - b = II(b, c, d, a, M_offset_1, 21, T[55]); - a = II(a, b, c, d, M_offset_8, 6, T[56]); - d = II(d, a, b, c, M_offset_15, 10, T[57]); - c = II(c, d, a, b, M_offset_6, 15, T[58]); - b = II(b, c, d, a, M_offset_13, 21, T[59]); - a = II(a, b, c, d, M_offset_4, 6, T[60]); - d = II(d, a, b, c, M_offset_11, 10, T[61]); - c = II(c, d, a, b, M_offset_2, 15, T[62]); - b = II(b, c, d, a, M_offset_9, 21, T[63]); - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - - var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); - var nBitsTotalL = nBitsTotal; - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( - (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | - (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) - ); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( - (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | - (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) - ); - - data.sigBytes = (dataWords.length + 1) * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var hash = this._hash; - var H = hash.words; - - // Swap endian - for (var i = 0; i < 4; i++) { - // Shortcut - var H_i = H[i]; - - H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | - (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); - } - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - function FF(a, b, c, d, x, s, t) { - var n = a + ((b & c) | (~b & d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function GG(a, b, c, d, x, s, t) { - var n = a + ((b & d) | (c & ~d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function HH(a, b, c, d, x, s, t) { - var n = a + (b ^ c ^ d) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function II(a, b, c, d, x, s, t) { - var n = a + (c ^ (b | ~d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.MD5('message'); - * var hash = CryptoJS.MD5(wordArray); - */ - C.MD5 = Hasher._createHelper(MD5); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacMD5(message, key); - */ - C.HmacMD5 = Hasher._createHmacHelper(MD5); - }(Math)); - - - return CryptoJS.MD5; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-cfb.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-cfb.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Cipher Feedback block mode. - */ - CryptoJS.mode.CFB = (function () { - var CFB = CryptoJS.lib.BlockCipherMode.extend(); - - CFB.Encryptor = CFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - - // Remember this block to use with next block - this._prevBlock = words.slice(offset, offset + blockSize); - } - }); - - CFB.Decryptor = CFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // Remember this block to use with next block - var thisBlock = words.slice(offset, offset + blockSize); - - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - - // This block becomes the previous block - this._prevBlock = thisBlock; - } - }); - - function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { - var keystream; - - // Shortcut - var iv = this._iv; - - // Generate keystream - if (iv) { - keystream = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } else { - keystream = this._prevBlock; - } - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - - return CFB; - }()); - - - return CryptoJS.mode.CFB; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ctr-gladman.js": -/*!****************************************************!*\ - !*** ./node_modules/crypto-js/mode-ctr-gladman.js ***! - \****************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** @preserve - * Counter block mode compatible with Dr Brian Gladman fileenc.c - * derived from CryptoJS.mode.CTR - * Jan Hruby jhruby.web@gmail.com - */ - CryptoJS.mode.CTRGladman = (function () { - var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); - - function incWord(word) - { - if (((word >> 24) & 0xff) === 0xff) { //overflow - var b1 = (word >> 16)&0xff; - var b2 = (word >> 8)&0xff; - var b3 = word & 0xff; - - if (b1 === 0xff) // overflow b1 - { - b1 = 0; - if (b2 === 0xff) - { - b2 = 0; - if (b3 === 0xff) - { - b3 = 0; - } - else - { - ++b3; - } - } - else - { - ++b2; - } - } - else - { - ++b1; - } - - word = 0; - word += (b1 << 16); - word += (b2 << 8); - word += b3; - } - else - { - word += (0x01 << 24); - } - return word; - } - - function incCounter(counter) - { - if ((counter[0] = incWord(counter[0])) === 0) - { - // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 - counter[1] = incWord(counter[1]); - } - return counter; - } - - var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; - - // Generate keystream - if (iv) { - counter = this._counter = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - - incCounter(counter); - - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - CTRGladman.Decryptor = Encryptor; - - return CTRGladman; - }()); - - - - - return CryptoJS.mode.CTRGladman; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ctr.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-ctr.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Counter block mode. - */ - CryptoJS.mode.CTR = (function () { - var CTR = CryptoJS.lib.BlockCipherMode.extend(); - - var Encryptor = CTR.Encryptor = CTR.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; - - // Generate keystream - if (iv) { - counter = this._counter = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - - // Increment counter - counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - CTR.Decryptor = Encryptor; - - return CTR; - }()); - - - return CryptoJS.mode.CTR; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ecb.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-ecb.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Electronic Codebook block mode. - */ - CryptoJS.mode.ECB = (function () { - var ECB = CryptoJS.lib.BlockCipherMode.extend(); - - ECB.Encryptor = ECB.extend({ - processBlock: function (words, offset) { - this._cipher.encryptBlock(words, offset); - } - }); - - ECB.Decryptor = ECB.extend({ - processBlock: function (words, offset) { - this._cipher.decryptBlock(words, offset); - } - }); - - return ECB; - }()); - - - return CryptoJS.mode.ECB; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ofb.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-ofb.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Output Feedback block mode. - */ - CryptoJS.mode.OFB = (function () { - var OFB = CryptoJS.lib.BlockCipherMode.extend(); - - var Encryptor = OFB.Encryptor = OFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var keystream = this._keystream; - - // Generate keystream - if (iv) { - keystream = this._keystream = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - OFB.Decryptor = Encryptor; - - return OFB; - }()); - - - return CryptoJS.mode.OFB; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-ansix923.js": -/*!************************************************!*\ - !*** ./node_modules/crypto-js/pad-ansix923.js ***! - \************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * ANSI X.923 padding strategy. - */ - CryptoJS.pad.AnsiX923 = { - pad: function (data, blockSize) { - // Shortcuts - var dataSigBytes = data.sigBytes; - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; - - // Compute last byte position - var lastBytePos = dataSigBytes + nPaddingBytes - 1; - - // Pad - data.clamp(); - data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); - data.sigBytes += nPaddingBytes; - }, - - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - - return CryptoJS.pad.Ansix923; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-iso10126.js": -/*!************************************************!*\ - !*** ./node_modules/crypto-js/pad-iso10126.js ***! - \************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * ISO 10126 padding strategy. - */ - CryptoJS.pad.Iso10126 = { - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - - // Pad - data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). - concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); - }, - - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - - return CryptoJS.pad.Iso10126; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-iso97971.js": -/*!************************************************!*\ - !*** ./node_modules/crypto-js/pad-iso97971.js ***! - \************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * ISO/IEC 9797-1 Padding Method 2. - */ - CryptoJS.pad.Iso97971 = { - pad: function (data, blockSize) { - // Add 0x80 byte - data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); - - // Zero pad the rest - CryptoJS.pad.ZeroPadding.pad(data, blockSize); - }, - - unpad: function (data) { - // Remove zero padding - CryptoJS.pad.ZeroPadding.unpad(data); - - // Remove one more byte -- the 0x80 byte - data.sigBytes--; - } - }; - - - return CryptoJS.pad.Iso97971; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-nopadding.js": -/*!*************************************************!*\ - !*** ./node_modules/crypto-js/pad-nopadding.js ***! - \*************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * A noop padding strategy. - */ - CryptoJS.pad.NoPadding = { - pad: function () { - }, - - unpad: function () { - } - }; - - - return CryptoJS.pad.NoPadding; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-zeropadding.js": -/*!***************************************************!*\ - !*** ./node_modules/crypto-js/pad-zeropadding.js ***! - \***************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Zero padding strategy. - */ - CryptoJS.pad.ZeroPadding = { - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Pad - data.clamp(); - data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); - }, - - unpad: function (data) { - // Shortcut - var dataWords = data.words; - - // Unpad - var i = data.sigBytes - 1; - for (var i = data.sigBytes - 1; i >= 0; i--) { - if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { - data.sigBytes = i + 1; - break; - } - } - } - }; - - - return CryptoJS.pad.ZeroPadding; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pbkdf2.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/pbkdf2.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA256 = C_algo.SHA256; - var HMAC = C_algo.HMAC; - - /** - * Password-Based Key Derivation Function 2 algorithm. - */ - var PBKDF2 = C_algo.PBKDF2 = Base.extend({ - /** - * Configuration options. - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hasher to use. Default: SHA256 - * @property {number} iterations The number of iterations to perform. Default: 250000 - */ - cfg: Base.extend({ - keySize: 128/32, - hasher: SHA256, - iterations: 250000 - }), - - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * var kdf = CryptoJS.algo.PBKDF2.create(); - * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); - * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); - */ - init: function (cfg) { - this.cfg = this.cfg.extend(cfg); - }, - - /** - * Computes the Password-Based Key Derivation Function 2. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * var key = kdf.compute(password, salt); - */ - compute: function (password, salt) { - // Shortcut - var cfg = this.cfg; - - // Init HMAC - var hmac = HMAC.create(cfg.hasher, password); - - // Initial values - var derivedKey = WordArray.create(); - var blockIndex = WordArray.create([0x00000001]); - - // Shortcuts - var derivedKeyWords = derivedKey.words; - var blockIndexWords = blockIndex.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; - - // Generate key - while (derivedKeyWords.length < keySize) { - var block = hmac.update(salt).finalize(blockIndex); - hmac.reset(); - - // Shortcuts - var blockWords = block.words; - var blockWordsLength = blockWords.length; - - // Iterations - var intermediate = block; - for (var i = 1; i < iterations; i++) { - intermediate = hmac.finalize(intermediate); - hmac.reset(); - - // Shortcut - var intermediateWords = intermediate.words; - - // XOR intermediate with block - for (var j = 0; j < blockWordsLength; j++) { - blockWords[j] ^= intermediateWords[j]; - } - } - - derivedKey.concat(block); - blockIndexWords[0]++; - } - derivedKey.sigBytes = keySize * 4; - - return derivedKey; - } - }); - - /** - * Computes the Password-Based Key Derivation Function 2. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * @param {Object} cfg (Optional) The configuration options to use for this computation. - * - * @return {WordArray} The derived key. - * - * @static - * - * @example - * - * var key = CryptoJS.PBKDF2(password, salt); - * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); - * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); - */ - C.PBKDF2 = function (password, salt, cfg) { - return PBKDF2.create(cfg).compute(password, salt); - }; - }()); - - - return CryptoJS.PBKDF2; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/rabbit-legacy.js": -/*!*************************************************!*\ - !*** ./node_modules/crypto-js/rabbit-legacy.js ***! - \*************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - // Reusable objects - var S = []; - var C_ = []; - var G = []; - - /** - * Rabbit stream cipher algorithm. - * - * This is a legacy version that neglected to convert the key to little-endian. - * This error doesn't affect the cipher's security, - * but it does affect its compatibility with other implementations. - */ - var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var K = this._key.words; - var iv = this.cfg.iv; - - // Generate initial state values - var X = this._X = [ - K[0], (K[3] << 16) | (K[2] >>> 16), - K[1], (K[0] << 16) | (K[3] >>> 16), - K[2], (K[1] << 16) | (K[0] >>> 16), - K[3], (K[2] << 16) | (K[1] >>> 16) - ]; - - // Generate initial counter values - var C = this._C = [ - (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), - (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), - (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), - (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) - ]; - - // Carry bit - this._b = 0; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - - // Modify the counters - for (var i = 0; i < 8; i++) { - C[i] ^= X[(i + 4) & 7]; - } - - // IV setup - if (iv) { - // Shortcuts - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; - - // Generate four subvectors - var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); - var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); - var i1 = (i0 >>> 16) | (i2 & 0xffff0000); - var i3 = (i2 << 16) | (i0 & 0x0000ffff); - - // Modify counter values - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - } - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var X = this._X; - - // Iterate the system - nextState.call(this); - - // Generate four keystream words - S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); - S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); - S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); - S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); - - for (var i = 0; i < 4; i++) { - // Swap endian - S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | - (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); - - // Encrypt - M[offset + i] ^= S[i]; - } - }, - - blockSize: 128/32, - - ivSize: 64/32 - }); - - function nextState() { - // Shortcuts - var X = this._X; - var C = this._C; - - // Save old counter values - for (var i = 0; i < 8; i++) { - C_[i] = C[i]; - } - - // Calculate new counter values - C[0] = (C[0] + 0x4d34d34d + this._b) | 0; - C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; - C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; - C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; - C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; - C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; - C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; - C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; - this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; - - // Calculate the g-values - for (var i = 0; i < 8; i++) { - var gx = X[i] + C[i]; - - // Construct high and low argument for squaring - var ga = gx & 0xffff; - var gb = gx >>> 16; - - // Calculate high and low result of squaring - var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; - var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); - - // High XOR low - G[i] = gh ^ gl; - } - - // Calculate new state values - X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; - X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; - X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; - X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; - X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; - X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; - X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; - X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); - */ - C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); - }()); - - - return CryptoJS.RabbitLegacy; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/rabbit.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/rabbit.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - // Reusable objects - var S = []; - var C_ = []; - var G = []; - - /** - * Rabbit stream cipher algorithm - */ - var Rabbit = C_algo.Rabbit = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var K = this._key.words; - var iv = this.cfg.iv; - - // Swap endian - for (var i = 0; i < 4; i++) { - K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | - (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); - } - - // Generate initial state values - var X = this._X = [ - K[0], (K[3] << 16) | (K[2] >>> 16), - K[1], (K[0] << 16) | (K[3] >>> 16), - K[2], (K[1] << 16) | (K[0] >>> 16), - K[3], (K[2] << 16) | (K[1] >>> 16) - ]; - - // Generate initial counter values - var C = this._C = [ - (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), - (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), - (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), - (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) - ]; - - // Carry bit - this._b = 0; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - - // Modify the counters - for (var i = 0; i < 8; i++) { - C[i] ^= X[(i + 4) & 7]; - } - - // IV setup - if (iv) { - // Shortcuts - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; - - // Generate four subvectors - var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); - var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); - var i1 = (i0 >>> 16) | (i2 & 0xffff0000); - var i3 = (i2 << 16) | (i0 & 0x0000ffff); - - // Modify counter values - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - } - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var X = this._X; - - // Iterate the system - nextState.call(this); - - // Generate four keystream words - S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); - S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); - S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); - S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); - - for (var i = 0; i < 4; i++) { - // Swap endian - S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | - (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); - - // Encrypt - M[offset + i] ^= S[i]; - } - }, - - blockSize: 128/32, - - ivSize: 64/32 - }); - - function nextState() { - // Shortcuts - var X = this._X; - var C = this._C; - - // Save old counter values - for (var i = 0; i < 8; i++) { - C_[i] = C[i]; - } - - // Calculate new counter values - C[0] = (C[0] + 0x4d34d34d + this._b) | 0; - C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; - C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; - C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; - C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; - C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; - C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; - C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; - this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; - - // Calculate the g-values - for (var i = 0; i < 8; i++) { - var gx = X[i] + C[i]; - - // Construct high and low argument for squaring - var ga = gx & 0xffff; - var gb = gx >>> 16; - - // Calculate high and low result of squaring - var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; - var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); - - // High XOR low - G[i] = gh ^ gl; - } - - // Calculate new state values - X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; - X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; - X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; - X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; - X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; - X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; - X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; - X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); - * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); - */ - C.Rabbit = StreamCipher._createHelper(Rabbit); - }()); - - - return CryptoJS.Rabbit; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/rc4.js": -/*!***************************************!*\ - !*** ./node_modules/crypto-js/rc4.js ***! - \***************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - /** - * RC4 stream cipher algorithm. - */ - var RC4 = C_algo.RC4 = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - var keySigBytes = key.sigBytes; - - // Init sbox - var S = this._S = []; - for (var i = 0; i < 256; i++) { - S[i] = i; - } - - // Key setup - for (var i = 0, j = 0; i < 256; i++) { - var keyByteIndex = i % keySigBytes; - var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; - - j = (j + S[i] + keyByte) % 256; - - // Swap - var t = S[i]; - S[i] = S[j]; - S[j] = t; - } - - // Counters - this._i = this._j = 0; - }, - - _doProcessBlock: function (M, offset) { - M[offset] ^= generateKeystreamWord.call(this); - }, - - keySize: 256/32, - - ivSize: 0 - }); - - function generateKeystreamWord() { - // Shortcuts - var S = this._S; - var i = this._i; - var j = this._j; - - // Generate keystream word - var keystreamWord = 0; - for (var n = 0; n < 4; n++) { - i = (i + 1) % 256; - j = (j + S[i]) % 256; - - // Swap - var t = S[i]; - S[i] = S[j]; - S[j] = t; - - keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); - } - - // Update counters - this._i = i; - this._j = j; - - return keystreamWord; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); - */ - C.RC4 = StreamCipher._createHelper(RC4); - - /** - * Modified RC4 stream cipher algorithm. - */ - var RC4Drop = C_algo.RC4Drop = RC4.extend({ - /** - * Configuration options. - * - * @property {number} drop The number of keystream words to drop. Default 192 - */ - cfg: RC4.cfg.extend({ - drop: 192 - }), - - _doReset: function () { - RC4._doReset.call(this); - - // Drop - for (var i = this.cfg.drop; i > 0; i--) { - generateKeystreamWord.call(this); - } - } - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); - */ - C.RC4Drop = StreamCipher._createHelper(RC4Drop); - }()); - - - return CryptoJS.RC4; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/ripemd160.js": -/*!*********************************************!*\ - !*** ./node_modules/crypto-js/ripemd160.js ***! - \*********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** @preserve - (c) 2012 by Cédric Mesnil. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Constants table - var _zl = WordArray.create([ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, - 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, - 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, - 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); - var _zr = WordArray.create([ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, - 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, - 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, - 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, - 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); - var _sl = WordArray.create([ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, - 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, - 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, - 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, - 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); - var _sr = WordArray.create([ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, - 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, - 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, - 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, - 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); - - var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); - var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); - - /** - * RIPEMD160 hash algorithm. - */ - var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ - _doReset: function () { - this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); - }, - - _doProcessBlock: function (M, offset) { - - // Swap endian - for (var i = 0; i < 16; i++) { - // Shortcuts - var offset_i = offset + i; - var M_offset_i = M[offset_i]; - - // Swap - M[offset_i] = ( - (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | - (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) - ); - } - // Shortcut - var H = this._hash.words; - var hl = _hl.words; - var hr = _hr.words; - var zl = _zl.words; - var zr = _zr.words; - var sl = _sl.words; - var sr = _sr.words; - - // Working variables - var al, bl, cl, dl, el; - var ar, br, cr, dr, er; - - ar = al = H[0]; - br = bl = H[1]; - cr = cl = H[2]; - dr = dl = H[3]; - er = el = H[4]; - // Computation - var t; - for (var i = 0; i < 80; i += 1) { - t = (al + M[offset+zl[i]])|0; - if (i<16){ - t += f1(bl,cl,dl) + hl[0]; - } else if (i<32) { - t += f2(bl,cl,dl) + hl[1]; - } else if (i<48) { - t += f3(bl,cl,dl) + hl[2]; - } else if (i<64) { - t += f4(bl,cl,dl) + hl[3]; - } else {// if (i<80) { - t += f5(bl,cl,dl) + hl[4]; - } - t = t|0; - t = rotl(t,sl[i]); - t = (t+el)|0; - al = el; - el = dl; - dl = rotl(cl, 10); - cl = bl; - bl = t; - - t = (ar + M[offset+zr[i]])|0; - if (i<16){ - t += f5(br,cr,dr) + hr[0]; - } else if (i<32) { - t += f4(br,cr,dr) + hr[1]; - } else if (i<48) { - t += f3(br,cr,dr) + hr[2]; - } else if (i<64) { - t += f2(br,cr,dr) + hr[3]; - } else {// if (i<80) { - t += f1(br,cr,dr) + hr[4]; - } - t = t|0; - t = rotl(t,sr[i]) ; - t = (t+er)|0; - ar = er; - er = dr; - dr = rotl(cr, 10); - cr = br; - br = t; - } - // Intermediate hash value - t = (H[1] + cl + dr)|0; - H[1] = (H[2] + dl + er)|0; - H[2] = (H[3] + el + ar)|0; - H[3] = (H[4] + al + br)|0; - H[4] = (H[0] + bl + cr)|0; - H[0] = t; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( - (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | - (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) - ); - data.sigBytes = (dataWords.length + 1) * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var hash = this._hash; - var H = hash.words; - - // Swap endian - for (var i = 0; i < 5; i++) { - // Shortcut - var H_i = H[i]; - - // Swap - H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | - (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); - } - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - - function f1(x, y, z) { - return ((x) ^ (y) ^ (z)); - - } - - function f2(x, y, z) { - return (((x)&(y)) | ((~x)&(z))); - } - - function f3(x, y, z) { - return (((x) | (~(y))) ^ (z)); - } - - function f4(x, y, z) { - return (((x) & (z)) | ((y)&(~(z)))); - } - - function f5(x, y, z) { - return ((x) ^ ((y) |(~(z)))); - - } - - function rotl(x,n) { - return (x<>>(32-n)); - } - - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.RIPEMD160('message'); - * var hash = CryptoJS.RIPEMD160(wordArray); - */ - C.RIPEMD160 = Hasher._createHelper(RIPEMD160); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacRIPEMD160(message, key); - */ - C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); - }(Math)); - - - return CryptoJS.RIPEMD160; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha1.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/sha1.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Reusable object - var W = []; - - /** - * SHA-1 hash algorithm. - */ - var SHA1 = C_algo.SHA1 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0x67452301, 0xefcdab89, - 0x98badcfe, 0x10325476, - 0xc3d2e1f0 - ]); - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var H = this._hash.words; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - - // Computation - for (var i = 0; i < 80; i++) { - if (i < 16) { - W[i] = M[offset + i] | 0; - } else { - var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; - W[i] = (n << 1) | (n >>> 31); - } - - var t = ((a << 5) | (a >>> 27)) + e + W[i]; - if (i < 20) { - t += ((b & c) | (~b & d)) + 0x5a827999; - } else if (i < 40) { - t += (b ^ c ^ d) + 0x6ed9eba1; - } else if (i < 60) { - t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; - } else /* if (i < 80) */ { - t += (b ^ c ^ d) - 0x359d3e2a; - } - - e = d; - d = c; - c = (b << 30) | (b >>> 2); - b = a; - a = t; - } - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - H[4] = (H[4] + e) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Return final computed hash - return this._hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA1('message'); - * var hash = CryptoJS.SHA1(wordArray); - */ - C.SHA1 = Hasher._createHelper(SHA1); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA1(message, key); - */ - C.HmacSHA1 = Hasher._createHmacHelper(SHA1); - }()); - - - return CryptoJS.SHA1; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha224.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha224.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA256 = C_algo.SHA256; - - /** - * SHA-224 hash algorithm. - */ - var SHA224 = C_algo.SHA224 = SHA256.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, - 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 - ]); - }, - - _doFinalize: function () { - var hash = SHA256._doFinalize.call(this); - - hash.sigBytes -= 4; - - return hash; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA224('message'); - * var hash = CryptoJS.SHA224(wordArray); - */ - C.SHA224 = SHA256._createHelper(SHA224); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA224(message, key); - */ - C.HmacSHA224 = SHA256._createHmacHelper(SHA224); - }()); - - - return CryptoJS.SHA224; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha256.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha256.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Initialization and round constants tables - var H = []; - var K = []; - - // Compute constants - (function () { - function isPrime(n) { - var sqrtN = Math.sqrt(n); - for (var factor = 2; factor <= sqrtN; factor++) { - if (!(n % factor)) { - return false; - } - } - - return true; - } - - function getFractionalBits(n) { - return ((n - (n | 0)) * 0x100000000) | 0; - } - - var n = 2; - var nPrime = 0; - while (nPrime < 64) { - if (isPrime(n)) { - if (nPrime < 8) { - H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); - } - K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); - - nPrime++; - } - - n++; - } - }()); - - // Reusable object - var W = []; - - /** - * SHA-256 hash algorithm. - */ - var SHA256 = C_algo.SHA256 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init(H.slice(0)); - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var H = this._hash.words; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - var f = H[5]; - var g = H[6]; - var h = H[7]; - - // Computation - for (var i = 0; i < 64; i++) { - if (i < 16) { - W[i] = M[offset + i] | 0; - } else { - var gamma0x = W[i - 15]; - var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ - ((gamma0x << 14) | (gamma0x >>> 18)) ^ - (gamma0x >>> 3); - - var gamma1x = W[i - 2]; - var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ - ((gamma1x << 13) | (gamma1x >>> 19)) ^ - (gamma1x >>> 10); - - W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; - } - - var ch = (e & f) ^ (~e & g); - var maj = (a & b) ^ (a & c) ^ (b & c); - - var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); - var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); - - var t1 = h + sigma1 + ch + K[i] + W[i]; - var t2 = sigma0 + maj; - - h = g; - g = f; - f = e; - e = (d + t1) | 0; - d = c; - c = b; - b = a; - a = (t1 + t2) | 0; - } - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - H[4] = (H[4] + e) | 0; - H[5] = (H[5] + f) | 0; - H[6] = (H[6] + g) | 0; - H[7] = (H[7] + h) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Return final computed hash - return this._hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA256('message'); - * var hash = CryptoJS.SHA256(wordArray); - */ - C.SHA256 = Hasher._createHelper(SHA256); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA256(message, key); - */ - C.HmacSHA256 = Hasher._createHmacHelper(SHA256); - }(Math)); - - - return CryptoJS.SHA256; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha3.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/sha3.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var C_algo = C.algo; - - // Constants tables - var RHO_OFFSETS = []; - var PI_INDEXES = []; - var ROUND_CONSTANTS = []; - - // Compute Constants - (function () { - // Compute rho offset constants - var x = 1, y = 0; - for (var t = 0; t < 24; t++) { - RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; - - var newX = y % 5; - var newY = (2 * x + 3 * y) % 5; - x = newX; - y = newY; - } - - // Compute pi index constants - for (var x = 0; x < 5; x++) { - for (var y = 0; y < 5; y++) { - PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; - } - } - - // Compute round constants - var LFSR = 0x01; - for (var i = 0; i < 24; i++) { - var roundConstantMsw = 0; - var roundConstantLsw = 0; - - for (var j = 0; j < 7; j++) { - if (LFSR & 0x01) { - var bitPosition = (1 << j) - 1; - if (bitPosition < 32) { - roundConstantLsw ^= 1 << bitPosition; - } else /* if (bitPosition >= 32) */ { - roundConstantMsw ^= 1 << (bitPosition - 32); - } - } - - // Compute next LFSR - if (LFSR & 0x80) { - // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 - LFSR = (LFSR << 1) ^ 0x71; - } else { - LFSR <<= 1; - } - } - - ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); - } - }()); - - // Reusable objects for temporary values - var T = []; - (function () { - for (var i = 0; i < 25; i++) { - T[i] = X64Word.create(); - } - }()); - - /** - * SHA-3 hash algorithm. - */ - var SHA3 = C_algo.SHA3 = Hasher.extend({ - /** - * Configuration options. - * - * @property {number} outputLength - * The desired number of bits in the output hash. - * Only values permitted are: 224, 256, 384, 512. - * Default: 512 - */ - cfg: Hasher.cfg.extend({ - outputLength: 512 - }), - - _doReset: function () { - var state = this._state = [] - for (var i = 0; i < 25; i++) { - state[i] = new X64Word.init(); - } - - this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; - }, - - _doProcessBlock: function (M, offset) { - // Shortcuts - var state = this._state; - var nBlockSizeLanes = this.blockSize / 2; - - // Absorb - for (var i = 0; i < nBlockSizeLanes; i++) { - // Shortcuts - var M2i = M[offset + 2 * i]; - var M2i1 = M[offset + 2 * i + 1]; - - // Swap endian - M2i = ( - (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | - (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) - ); - M2i1 = ( - (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | - (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) - ); - - // Absorb message into state - var lane = state[i]; - lane.high ^= M2i1; - lane.low ^= M2i; - } - - // Rounds - for (var round = 0; round < 24; round++) { - // Theta - for (var x = 0; x < 5; x++) { - // Mix column lanes - var tMsw = 0, tLsw = 0; - for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - tMsw ^= lane.high; - tLsw ^= lane.low; - } - - // Temporary values - var Tx = T[x]; - Tx.high = tMsw; - Tx.low = tLsw; - } - for (var x = 0; x < 5; x++) { - // Shortcuts - var Tx4 = T[(x + 4) % 5]; - var Tx1 = T[(x + 1) % 5]; - var Tx1Msw = Tx1.high; - var Tx1Lsw = Tx1.low; - - // Mix surrounding columns - var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); - var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); - for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - lane.high ^= tMsw; - lane.low ^= tLsw; - } - } - - // Rho Pi - for (var laneIndex = 1; laneIndex < 25; laneIndex++) { - var tMsw; - var tLsw; - - // Shortcuts - var lane = state[laneIndex]; - var laneMsw = lane.high; - var laneLsw = lane.low; - var rhoOffset = RHO_OFFSETS[laneIndex]; - - // Rotate lanes - if (rhoOffset < 32) { - tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); - tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); - } else /* if (rhoOffset >= 32) */ { - tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); - tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); - } - - // Transpose lanes - var TPiLane = T[PI_INDEXES[laneIndex]]; - TPiLane.high = tMsw; - TPiLane.low = tLsw; - } - - // Rho pi at x = y = 0 - var T0 = T[0]; - var state0 = state[0]; - T0.high = state0.high; - T0.low = state0.low; - - // Chi - for (var x = 0; x < 5; x++) { - for (var y = 0; y < 5; y++) { - // Shortcuts - var laneIndex = x + 5 * y; - var lane = state[laneIndex]; - var TLane = T[laneIndex]; - var Tx1Lane = T[((x + 1) % 5) + 5 * y]; - var Tx2Lane = T[((x + 2) % 5) + 5 * y]; - - // Mix rows - lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); - lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); - } - } - - // Iota - var lane = state[0]; - var roundConstant = ROUND_CONSTANTS[round]; - lane.high ^= roundConstant.high; - lane.low ^= roundConstant.low; - } - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - var blockSizeBits = this.blockSize * 32; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); - dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var state = this._state; - var outputLengthBytes = this.cfg.outputLength / 8; - var outputLengthLanes = outputLengthBytes / 8; - - // Squeeze - var hashWords = []; - for (var i = 0; i < outputLengthLanes; i++) { - // Shortcuts - var lane = state[i]; - var laneMsw = lane.high; - var laneLsw = lane.low; - - // Swap endian - laneMsw = ( - (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | - (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) - ); - laneLsw = ( - (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | - (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) - ); - - // Squeeze state to retrieve hash - hashWords.push(laneLsw); - hashWords.push(laneMsw); - } - - // Return final computed hash - return new WordArray.init(hashWords, outputLengthBytes); - }, - - clone: function () { - var clone = Hasher.clone.call(this); - - var state = clone._state = this._state.slice(0); - for (var i = 0; i < 25; i++) { - state[i] = state[i].clone(); - } - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA3('message'); - * var hash = CryptoJS.SHA3(wordArray); - */ - C.SHA3 = Hasher._createHelper(SHA3); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA3(message, key); - */ - C.HmacSHA3 = Hasher._createHmacHelper(SHA3); - }(Math)); - - - return CryptoJS.SHA3; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha384.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha384.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js"), __webpack_require__(/*! ./sha512 */ "./node_modules/crypto-js/sha512.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; - var SHA512 = C_algo.SHA512; - - /** - * SHA-384 hash algorithm. - */ - var SHA384 = C_algo.SHA384 = SHA512.extend({ - _doReset: function () { - this._hash = new X64WordArray.init([ - new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), - new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), - new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), - new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) - ]); - }, - - _doFinalize: function () { - var hash = SHA512._doFinalize.call(this); - - hash.sigBytes -= 16; - - return hash; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA384('message'); - * var hash = CryptoJS.SHA384(wordArray); - */ - C.SHA384 = SHA512._createHelper(SHA384); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA384(message, key); - */ - C.HmacSHA384 = SHA512._createHmacHelper(SHA384); - }()); - - - return CryptoJS.SHA384; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha512.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha512.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; - - function X64Word_create() { - return X64Word.create.apply(X64Word, arguments); - } - - // Constants - var K = [ - X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), - X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), - X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), - X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), - X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), - X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), - X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), - X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), - X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), - X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), - X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), - X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), - X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), - X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), - X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), - X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), - X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), - X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), - X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), - X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), - X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), - X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), - X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), - X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), - X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), - X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), - X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), - X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), - X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), - X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), - X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), - X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), - X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), - X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), - X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), - X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), - X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), - X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), - X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), - X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) - ]; - - // Reusable objects - var W = []; - (function () { - for (var i = 0; i < 80; i++) { - W[i] = X64Word_create(); - } - }()); - - /** - * SHA-512 hash algorithm. - */ - var SHA512 = C_algo.SHA512 = Hasher.extend({ - _doReset: function () { - this._hash = new X64WordArray.init([ - new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), - new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), - new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), - new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) - ]); - }, - - _doProcessBlock: function (M, offset) { - // Shortcuts - var H = this._hash.words; - - var H0 = H[0]; - var H1 = H[1]; - var H2 = H[2]; - var H3 = H[3]; - var H4 = H[4]; - var H5 = H[5]; - var H6 = H[6]; - var H7 = H[7]; - - var H0h = H0.high; - var H0l = H0.low; - var H1h = H1.high; - var H1l = H1.low; - var H2h = H2.high; - var H2l = H2.low; - var H3h = H3.high; - var H3l = H3.low; - var H4h = H4.high; - var H4l = H4.low; - var H5h = H5.high; - var H5l = H5.low; - var H6h = H6.high; - var H6l = H6.low; - var H7h = H7.high; - var H7l = H7.low; - - // Working variables - var ah = H0h; - var al = H0l; - var bh = H1h; - var bl = H1l; - var ch = H2h; - var cl = H2l; - var dh = H3h; - var dl = H3l; - var eh = H4h; - var el = H4l; - var fh = H5h; - var fl = H5l; - var gh = H6h; - var gl = H6l; - var hh = H7h; - var hl = H7l; - - // Rounds - for (var i = 0; i < 80; i++) { - var Wil; - var Wih; - - // Shortcut - var Wi = W[i]; - - // Extend message - if (i < 16) { - Wih = Wi.high = M[offset + i * 2] | 0; - Wil = Wi.low = M[offset + i * 2 + 1] | 0; - } else { - // Gamma0 - var gamma0x = W[i - 15]; - var gamma0xh = gamma0x.high; - var gamma0xl = gamma0x.low; - var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); - var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); - - // Gamma1 - var gamma1x = W[i - 2]; - var gamma1xh = gamma1x.high; - var gamma1xl = gamma1x.low; - var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); - var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); - - // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] - var Wi7 = W[i - 7]; - var Wi7h = Wi7.high; - var Wi7l = Wi7.low; - - var Wi16 = W[i - 16]; - var Wi16h = Wi16.high; - var Wi16l = Wi16.low; - - Wil = gamma0l + Wi7l; - Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); - Wil = Wil + gamma1l; - Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); - Wil = Wil + Wi16l; - Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); - - Wi.high = Wih; - Wi.low = Wil; - } - - var chh = (eh & fh) ^ (~eh & gh); - var chl = (el & fl) ^ (~el & gl); - var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); - var majl = (al & bl) ^ (al & cl) ^ (bl & cl); - - var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); - var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); - var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); - var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); - - // t1 = h + sigma1 + ch + K[i] + W[i] - var Ki = K[i]; - var Kih = Ki.high; - var Kil = Ki.low; - - var t1l = hl + sigma1l; - var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); - var t1l = t1l + chl; - var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); - var t1l = t1l + Kil; - var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); - var t1l = t1l + Wil; - var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); - - // t2 = sigma0 + maj - var t2l = sigma0l + majl; - var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); - - // Update working variables - hh = gh; - hl = gl; - gh = fh; - gl = fl; - fh = eh; - fl = el; - el = (dl + t1l) | 0; - eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; - dh = ch; - dl = cl; - ch = bh; - cl = bl; - bh = ah; - bl = al; - al = (t1l + t2l) | 0; - ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; - } - - // Intermediate hash value - H0l = H0.low = (H0l + al); - H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); - H1l = H1.low = (H1l + bl); - H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); - H2l = H2.low = (H2l + cl); - H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); - H3l = H3.low = (H3l + dl); - H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); - H4l = H4.low = (H4l + el); - H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); - H5l = H5.low = (H5l + fl); - H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); - H6l = H6.low = (H6l + gl); - H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); - H7l = H7.low = (H7l + hl); - H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Convert hash to 32-bit word array before returning - var hash = this._hash.toX32(); - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - }, - - blockSize: 1024/32 - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA512('message'); - * var hash = CryptoJS.SHA512(wordArray); - */ - C.SHA512 = Hasher._createHelper(SHA512); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA512(message, key); - */ - C.HmacSHA512 = Hasher._createHmacHelper(SHA512); - }()); - - - return CryptoJS.SHA512; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/tripledes.js": -/*!*********************************************!*\ - !*** ./node_modules/crypto-js/tripledes.js ***! - \*********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - // Permuted Choice 1 constants - var PC1 = [ - 57, 49, 41, 33, 25, 17, 9, 1, - 58, 50, 42, 34, 26, 18, 10, 2, - 59, 51, 43, 35, 27, 19, 11, 3, - 60, 52, 44, 36, 63, 55, 47, 39, - 31, 23, 15, 7, 62, 54, 46, 38, - 30, 22, 14, 6, 61, 53, 45, 37, - 29, 21, 13, 5, 28, 20, 12, 4 - ]; - - // Permuted Choice 2 constants - var PC2 = [ - 14, 17, 11, 24, 1, 5, - 3, 28, 15, 6, 21, 10, - 23, 19, 12, 4, 26, 8, - 16, 7, 27, 20, 13, 2, - 41, 52, 31, 37, 47, 55, - 30, 40, 51, 45, 33, 48, - 44, 49, 39, 56, 34, 53, - 46, 42, 50, 36, 29, 32 - ]; - - // Cumulative bit shift constants - var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; - - // SBOXes and round permutation constants - var SBOX_P = [ - { - 0x0: 0x808200, - 0x10000000: 0x8000, - 0x20000000: 0x808002, - 0x30000000: 0x2, - 0x40000000: 0x200, - 0x50000000: 0x808202, - 0x60000000: 0x800202, - 0x70000000: 0x800000, - 0x80000000: 0x202, - 0x90000000: 0x800200, - 0xa0000000: 0x8200, - 0xb0000000: 0x808000, - 0xc0000000: 0x8002, - 0xd0000000: 0x800002, - 0xe0000000: 0x0, - 0xf0000000: 0x8202, - 0x8000000: 0x0, - 0x18000000: 0x808202, - 0x28000000: 0x8202, - 0x38000000: 0x8000, - 0x48000000: 0x808200, - 0x58000000: 0x200, - 0x68000000: 0x808002, - 0x78000000: 0x2, - 0x88000000: 0x800200, - 0x98000000: 0x8200, - 0xa8000000: 0x808000, - 0xb8000000: 0x800202, - 0xc8000000: 0x800002, - 0xd8000000: 0x8002, - 0xe8000000: 0x202, - 0xf8000000: 0x800000, - 0x1: 0x8000, - 0x10000001: 0x2, - 0x20000001: 0x808200, - 0x30000001: 0x800000, - 0x40000001: 0x808002, - 0x50000001: 0x8200, - 0x60000001: 0x200, - 0x70000001: 0x800202, - 0x80000001: 0x808202, - 0x90000001: 0x808000, - 0xa0000001: 0x800002, - 0xb0000001: 0x8202, - 0xc0000001: 0x202, - 0xd0000001: 0x800200, - 0xe0000001: 0x8002, - 0xf0000001: 0x0, - 0x8000001: 0x808202, - 0x18000001: 0x808000, - 0x28000001: 0x800000, - 0x38000001: 0x200, - 0x48000001: 0x8000, - 0x58000001: 0x800002, - 0x68000001: 0x2, - 0x78000001: 0x8202, - 0x88000001: 0x8002, - 0x98000001: 0x800202, - 0xa8000001: 0x202, - 0xb8000001: 0x808200, - 0xc8000001: 0x800200, - 0xd8000001: 0x0, - 0xe8000001: 0x8200, - 0xf8000001: 0x808002 - }, - { - 0x0: 0x40084010, - 0x1000000: 0x4000, - 0x2000000: 0x80000, - 0x3000000: 0x40080010, - 0x4000000: 0x40000010, - 0x5000000: 0x40084000, - 0x6000000: 0x40004000, - 0x7000000: 0x10, - 0x8000000: 0x84000, - 0x9000000: 0x40004010, - 0xa000000: 0x40000000, - 0xb000000: 0x84010, - 0xc000000: 0x80010, - 0xd000000: 0x0, - 0xe000000: 0x4010, - 0xf000000: 0x40080000, - 0x800000: 0x40004000, - 0x1800000: 0x84010, - 0x2800000: 0x10, - 0x3800000: 0x40004010, - 0x4800000: 0x40084010, - 0x5800000: 0x40000000, - 0x6800000: 0x80000, - 0x7800000: 0x40080010, - 0x8800000: 0x80010, - 0x9800000: 0x0, - 0xa800000: 0x4000, - 0xb800000: 0x40080000, - 0xc800000: 0x40000010, - 0xd800000: 0x84000, - 0xe800000: 0x40084000, - 0xf800000: 0x4010, - 0x10000000: 0x0, - 0x11000000: 0x40080010, - 0x12000000: 0x40004010, - 0x13000000: 0x40084000, - 0x14000000: 0x40080000, - 0x15000000: 0x10, - 0x16000000: 0x84010, - 0x17000000: 0x4000, - 0x18000000: 0x4010, - 0x19000000: 0x80000, - 0x1a000000: 0x80010, - 0x1b000000: 0x40000010, - 0x1c000000: 0x84000, - 0x1d000000: 0x40004000, - 0x1e000000: 0x40000000, - 0x1f000000: 0x40084010, - 0x10800000: 0x84010, - 0x11800000: 0x80000, - 0x12800000: 0x40080000, - 0x13800000: 0x4000, - 0x14800000: 0x40004000, - 0x15800000: 0x40084010, - 0x16800000: 0x10, - 0x17800000: 0x40000000, - 0x18800000: 0x40084000, - 0x19800000: 0x40000010, - 0x1a800000: 0x40004010, - 0x1b800000: 0x80010, - 0x1c800000: 0x0, - 0x1d800000: 0x4010, - 0x1e800000: 0x40080010, - 0x1f800000: 0x84000 - }, - { - 0x0: 0x104, - 0x100000: 0x0, - 0x200000: 0x4000100, - 0x300000: 0x10104, - 0x400000: 0x10004, - 0x500000: 0x4000004, - 0x600000: 0x4010104, - 0x700000: 0x4010000, - 0x800000: 0x4000000, - 0x900000: 0x4010100, - 0xa00000: 0x10100, - 0xb00000: 0x4010004, - 0xc00000: 0x4000104, - 0xd00000: 0x10000, - 0xe00000: 0x4, - 0xf00000: 0x100, - 0x80000: 0x4010100, - 0x180000: 0x4010004, - 0x280000: 0x0, - 0x380000: 0x4000100, - 0x480000: 0x4000004, - 0x580000: 0x10000, - 0x680000: 0x10004, - 0x780000: 0x104, - 0x880000: 0x4, - 0x980000: 0x100, - 0xa80000: 0x4010000, - 0xb80000: 0x10104, - 0xc80000: 0x10100, - 0xd80000: 0x4000104, - 0xe80000: 0x4010104, - 0xf80000: 0x4000000, - 0x1000000: 0x4010100, - 0x1100000: 0x10004, - 0x1200000: 0x10000, - 0x1300000: 0x4000100, - 0x1400000: 0x100, - 0x1500000: 0x4010104, - 0x1600000: 0x4000004, - 0x1700000: 0x0, - 0x1800000: 0x4000104, - 0x1900000: 0x4000000, - 0x1a00000: 0x4, - 0x1b00000: 0x10100, - 0x1c00000: 0x4010000, - 0x1d00000: 0x104, - 0x1e00000: 0x10104, - 0x1f00000: 0x4010004, - 0x1080000: 0x4000000, - 0x1180000: 0x104, - 0x1280000: 0x4010100, - 0x1380000: 0x0, - 0x1480000: 0x10004, - 0x1580000: 0x4000100, - 0x1680000: 0x100, - 0x1780000: 0x4010004, - 0x1880000: 0x10000, - 0x1980000: 0x4010104, - 0x1a80000: 0x10104, - 0x1b80000: 0x4000004, - 0x1c80000: 0x4000104, - 0x1d80000: 0x4010000, - 0x1e80000: 0x4, - 0x1f80000: 0x10100 - }, - { - 0x0: 0x80401000, - 0x10000: 0x80001040, - 0x20000: 0x401040, - 0x30000: 0x80400000, - 0x40000: 0x0, - 0x50000: 0x401000, - 0x60000: 0x80000040, - 0x70000: 0x400040, - 0x80000: 0x80000000, - 0x90000: 0x400000, - 0xa0000: 0x40, - 0xb0000: 0x80001000, - 0xc0000: 0x80400040, - 0xd0000: 0x1040, - 0xe0000: 0x1000, - 0xf0000: 0x80401040, - 0x8000: 0x80001040, - 0x18000: 0x40, - 0x28000: 0x80400040, - 0x38000: 0x80001000, - 0x48000: 0x401000, - 0x58000: 0x80401040, - 0x68000: 0x0, - 0x78000: 0x80400000, - 0x88000: 0x1000, - 0x98000: 0x80401000, - 0xa8000: 0x400000, - 0xb8000: 0x1040, - 0xc8000: 0x80000000, - 0xd8000: 0x400040, - 0xe8000: 0x401040, - 0xf8000: 0x80000040, - 0x100000: 0x400040, - 0x110000: 0x401000, - 0x120000: 0x80000040, - 0x130000: 0x0, - 0x140000: 0x1040, - 0x150000: 0x80400040, - 0x160000: 0x80401000, - 0x170000: 0x80001040, - 0x180000: 0x80401040, - 0x190000: 0x80000000, - 0x1a0000: 0x80400000, - 0x1b0000: 0x401040, - 0x1c0000: 0x80001000, - 0x1d0000: 0x400000, - 0x1e0000: 0x40, - 0x1f0000: 0x1000, - 0x108000: 0x80400000, - 0x118000: 0x80401040, - 0x128000: 0x0, - 0x138000: 0x401000, - 0x148000: 0x400040, - 0x158000: 0x80000000, - 0x168000: 0x80001040, - 0x178000: 0x40, - 0x188000: 0x80000040, - 0x198000: 0x1000, - 0x1a8000: 0x80001000, - 0x1b8000: 0x80400040, - 0x1c8000: 0x1040, - 0x1d8000: 0x80401000, - 0x1e8000: 0x400000, - 0x1f8000: 0x401040 - }, - { - 0x0: 0x80, - 0x1000: 0x1040000, - 0x2000: 0x40000, - 0x3000: 0x20000000, - 0x4000: 0x20040080, - 0x5000: 0x1000080, - 0x6000: 0x21000080, - 0x7000: 0x40080, - 0x8000: 0x1000000, - 0x9000: 0x20040000, - 0xa000: 0x20000080, - 0xb000: 0x21040080, - 0xc000: 0x21040000, - 0xd000: 0x0, - 0xe000: 0x1040080, - 0xf000: 0x21000000, - 0x800: 0x1040080, - 0x1800: 0x21000080, - 0x2800: 0x80, - 0x3800: 0x1040000, - 0x4800: 0x40000, - 0x5800: 0x20040080, - 0x6800: 0x21040000, - 0x7800: 0x20000000, - 0x8800: 0x20040000, - 0x9800: 0x0, - 0xa800: 0x21040080, - 0xb800: 0x1000080, - 0xc800: 0x20000080, - 0xd800: 0x21000000, - 0xe800: 0x1000000, - 0xf800: 0x40080, - 0x10000: 0x40000, - 0x11000: 0x80, - 0x12000: 0x20000000, - 0x13000: 0x21000080, - 0x14000: 0x1000080, - 0x15000: 0x21040000, - 0x16000: 0x20040080, - 0x17000: 0x1000000, - 0x18000: 0x21040080, - 0x19000: 0x21000000, - 0x1a000: 0x1040000, - 0x1b000: 0x20040000, - 0x1c000: 0x40080, - 0x1d000: 0x20000080, - 0x1e000: 0x0, - 0x1f000: 0x1040080, - 0x10800: 0x21000080, - 0x11800: 0x1000000, - 0x12800: 0x1040000, - 0x13800: 0x20040080, - 0x14800: 0x20000000, - 0x15800: 0x1040080, - 0x16800: 0x80, - 0x17800: 0x21040000, - 0x18800: 0x40080, - 0x19800: 0x21040080, - 0x1a800: 0x0, - 0x1b800: 0x21000000, - 0x1c800: 0x1000080, - 0x1d800: 0x40000, - 0x1e800: 0x20040000, - 0x1f800: 0x20000080 - }, - { - 0x0: 0x10000008, - 0x100: 0x2000, - 0x200: 0x10200000, - 0x300: 0x10202008, - 0x400: 0x10002000, - 0x500: 0x200000, - 0x600: 0x200008, - 0x700: 0x10000000, - 0x800: 0x0, - 0x900: 0x10002008, - 0xa00: 0x202000, - 0xb00: 0x8, - 0xc00: 0x10200008, - 0xd00: 0x202008, - 0xe00: 0x2008, - 0xf00: 0x10202000, - 0x80: 0x10200000, - 0x180: 0x10202008, - 0x280: 0x8, - 0x380: 0x200000, - 0x480: 0x202008, - 0x580: 0x10000008, - 0x680: 0x10002000, - 0x780: 0x2008, - 0x880: 0x200008, - 0x980: 0x2000, - 0xa80: 0x10002008, - 0xb80: 0x10200008, - 0xc80: 0x0, - 0xd80: 0x10202000, - 0xe80: 0x202000, - 0xf80: 0x10000000, - 0x1000: 0x10002000, - 0x1100: 0x10200008, - 0x1200: 0x10202008, - 0x1300: 0x2008, - 0x1400: 0x200000, - 0x1500: 0x10000000, - 0x1600: 0x10000008, - 0x1700: 0x202000, - 0x1800: 0x202008, - 0x1900: 0x0, - 0x1a00: 0x8, - 0x1b00: 0x10200000, - 0x1c00: 0x2000, - 0x1d00: 0x10002008, - 0x1e00: 0x10202000, - 0x1f00: 0x200008, - 0x1080: 0x8, - 0x1180: 0x202000, - 0x1280: 0x200000, - 0x1380: 0x10000008, - 0x1480: 0x10002000, - 0x1580: 0x2008, - 0x1680: 0x10202008, - 0x1780: 0x10200000, - 0x1880: 0x10202000, - 0x1980: 0x10200008, - 0x1a80: 0x2000, - 0x1b80: 0x202008, - 0x1c80: 0x200008, - 0x1d80: 0x0, - 0x1e80: 0x10000000, - 0x1f80: 0x10002008 - }, - { - 0x0: 0x100000, - 0x10: 0x2000401, - 0x20: 0x400, - 0x30: 0x100401, - 0x40: 0x2100401, - 0x50: 0x0, - 0x60: 0x1, - 0x70: 0x2100001, - 0x80: 0x2000400, - 0x90: 0x100001, - 0xa0: 0x2000001, - 0xb0: 0x2100400, - 0xc0: 0x2100000, - 0xd0: 0x401, - 0xe0: 0x100400, - 0xf0: 0x2000000, - 0x8: 0x2100001, - 0x18: 0x0, - 0x28: 0x2000401, - 0x38: 0x2100400, - 0x48: 0x100000, - 0x58: 0x2000001, - 0x68: 0x2000000, - 0x78: 0x401, - 0x88: 0x100401, - 0x98: 0x2000400, - 0xa8: 0x2100000, - 0xb8: 0x100001, - 0xc8: 0x400, - 0xd8: 0x2100401, - 0xe8: 0x1, - 0xf8: 0x100400, - 0x100: 0x2000000, - 0x110: 0x100000, - 0x120: 0x2000401, - 0x130: 0x2100001, - 0x140: 0x100001, - 0x150: 0x2000400, - 0x160: 0x2100400, - 0x170: 0x100401, - 0x180: 0x401, - 0x190: 0x2100401, - 0x1a0: 0x100400, - 0x1b0: 0x1, - 0x1c0: 0x0, - 0x1d0: 0x2100000, - 0x1e0: 0x2000001, - 0x1f0: 0x400, - 0x108: 0x100400, - 0x118: 0x2000401, - 0x128: 0x2100001, - 0x138: 0x1, - 0x148: 0x2000000, - 0x158: 0x100000, - 0x168: 0x401, - 0x178: 0x2100400, - 0x188: 0x2000001, - 0x198: 0x2100000, - 0x1a8: 0x0, - 0x1b8: 0x2100401, - 0x1c8: 0x100401, - 0x1d8: 0x400, - 0x1e8: 0x2000400, - 0x1f8: 0x100001 - }, - { - 0x0: 0x8000820, - 0x1: 0x20000, - 0x2: 0x8000000, - 0x3: 0x20, - 0x4: 0x20020, - 0x5: 0x8020820, - 0x6: 0x8020800, - 0x7: 0x800, - 0x8: 0x8020000, - 0x9: 0x8000800, - 0xa: 0x20800, - 0xb: 0x8020020, - 0xc: 0x820, - 0xd: 0x0, - 0xe: 0x8000020, - 0xf: 0x20820, - 0x80000000: 0x800, - 0x80000001: 0x8020820, - 0x80000002: 0x8000820, - 0x80000003: 0x8000000, - 0x80000004: 0x8020000, - 0x80000005: 0x20800, - 0x80000006: 0x20820, - 0x80000007: 0x20, - 0x80000008: 0x8000020, - 0x80000009: 0x820, - 0x8000000a: 0x20020, - 0x8000000b: 0x8020800, - 0x8000000c: 0x0, - 0x8000000d: 0x8020020, - 0x8000000e: 0x8000800, - 0x8000000f: 0x20000, - 0x10: 0x20820, - 0x11: 0x8020800, - 0x12: 0x20, - 0x13: 0x800, - 0x14: 0x8000800, - 0x15: 0x8000020, - 0x16: 0x8020020, - 0x17: 0x20000, - 0x18: 0x0, - 0x19: 0x20020, - 0x1a: 0x8020000, - 0x1b: 0x8000820, - 0x1c: 0x8020820, - 0x1d: 0x20800, - 0x1e: 0x820, - 0x1f: 0x8000000, - 0x80000010: 0x20000, - 0x80000011: 0x800, - 0x80000012: 0x8020020, - 0x80000013: 0x20820, - 0x80000014: 0x20, - 0x80000015: 0x8020000, - 0x80000016: 0x8000000, - 0x80000017: 0x8000820, - 0x80000018: 0x8020820, - 0x80000019: 0x8000020, - 0x8000001a: 0x8000800, - 0x8000001b: 0x0, - 0x8000001c: 0x20800, - 0x8000001d: 0x820, - 0x8000001e: 0x20020, - 0x8000001f: 0x8020800 - } - ]; - - // Masks that select the SBOX input - var SBOX_MASK = [ - 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, - 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f - ]; - - /** - * DES block cipher algorithm. - */ - var DES = C_algo.DES = BlockCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - - // Select 56 bits according to PC1 - var keyBits = []; - for (var i = 0; i < 56; i++) { - var keyBitPos = PC1[i] - 1; - keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; - } - - // Assemble 16 subkeys - var subKeys = this._subKeys = []; - for (var nSubKey = 0; nSubKey < 16; nSubKey++) { - // Create subkey - var subKey = subKeys[nSubKey] = []; - - // Shortcut - var bitShift = BIT_SHIFTS[nSubKey]; - - // Select 48 bits according to PC2 - for (var i = 0; i < 24; i++) { - // Select from the left 28 key bits - subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); - - // Select from the right 28 key bits - subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); - } - - // Since each subkey is applied to an expanded 32-bit input, - // the subkey can be broken into 8 values scaled to 32-bits, - // which allows the key to be used without expansion - subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); - for (var i = 1; i < 7; i++) { - subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); - } - subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); - } - - // Compute inverse subkeys - var invSubKeys = this._invSubKeys = []; - for (var i = 0; i < 16; i++) { - invSubKeys[i] = subKeys[15 - i]; - } - }, - - encryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._subKeys); - }, - - decryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._invSubKeys); - }, - - _doCryptBlock: function (M, offset, subKeys) { - // Get input - this._lBlock = M[offset]; - this._rBlock = M[offset + 1]; - - // Initial permutation - exchangeLR.call(this, 4, 0x0f0f0f0f); - exchangeLR.call(this, 16, 0x0000ffff); - exchangeRL.call(this, 2, 0x33333333); - exchangeRL.call(this, 8, 0x00ff00ff); - exchangeLR.call(this, 1, 0x55555555); - - // Rounds - for (var round = 0; round < 16; round++) { - // Shortcuts - var subKey = subKeys[round]; - var lBlock = this._lBlock; - var rBlock = this._rBlock; - - // Feistel function - var f = 0; - for (var i = 0; i < 8; i++) { - f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; - } - this._lBlock = rBlock; - this._rBlock = lBlock ^ f; - } - - // Undo swap from last round - var t = this._lBlock; - this._lBlock = this._rBlock; - this._rBlock = t; - - // Final permutation - exchangeLR.call(this, 1, 0x55555555); - exchangeRL.call(this, 8, 0x00ff00ff); - exchangeRL.call(this, 2, 0x33333333); - exchangeLR.call(this, 16, 0x0000ffff); - exchangeLR.call(this, 4, 0x0f0f0f0f); - - // Set output - M[offset] = this._lBlock; - M[offset + 1] = this._rBlock; - }, - - keySize: 64/32, - - ivSize: 64/32, - - blockSize: 64/32 - }); - - // Swap bits across the left and right words - function exchangeLR(offset, mask) { - var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; - this._rBlock ^= t; - this._lBlock ^= t << offset; - } - - function exchangeRL(offset, mask) { - var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; - this._lBlock ^= t; - this._rBlock ^= t << offset; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); - */ - C.DES = BlockCipher._createHelper(DES); - - /** - * Triple-DES block cipher algorithm. - */ - var TripleDES = C_algo.TripleDES = BlockCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - // Make sure the key length is valid (64, 128 or >= 192 bit) - if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) { - throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.'); - } - - // Extend the key according to the keying options defined in 3DES standard - var key1 = keyWords.slice(0, 2); - var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4); - var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6); - - // Create DES instances - this._des1 = DES.createEncryptor(WordArray.create(key1)); - this._des2 = DES.createEncryptor(WordArray.create(key2)); - this._des3 = DES.createEncryptor(WordArray.create(key3)); - }, - - encryptBlock: function (M, offset) { - this._des1.encryptBlock(M, offset); - this._des2.decryptBlock(M, offset); - this._des3.encryptBlock(M, offset); - }, - - decryptBlock: function (M, offset) { - this._des3.decryptBlock(M, offset); - this._des2.encryptBlock(M, offset); - this._des1.decryptBlock(M, offset); - }, - - keySize: 192/32, - - ivSize: 64/32, - - blockSize: 64/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); - */ - C.TripleDES = BlockCipher._createHelper(TripleDES); - }()); - - - return CryptoJS.TripleDES; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/x64-core.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/x64-core.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var X32WordArray = C_lib.WordArray; - - /** - * x64 namespace. - */ - var C_x64 = C.x64 = {}; - - /** - * A 64-bit word. - */ - var X64Word = C_x64.Word = Base.extend({ - /** - * Initializes a newly created 64-bit word. - * - * @param {number} high The high 32 bits. - * @param {number} low The low 32 bits. - * - * @example - * - * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); - */ - init: function (high, low) { - this.high = high; - this.low = low; - } - - /** - * Bitwise NOTs this word. - * - * @return {X64Word} A new x64-Word object after negating. - * - * @example - * - * var negated = x64Word.not(); - */ - // not: function () { - // var high = ~this.high; - // var low = ~this.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise ANDs this word with the passed word. - * - * @param {X64Word} word The x64-Word to AND with this word. - * - * @return {X64Word} A new x64-Word object after ANDing. - * - * @example - * - * var anded = x64Word.and(anotherX64Word); - */ - // and: function (word) { - // var high = this.high & word.high; - // var low = this.low & word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise ORs this word with the passed word. - * - * @param {X64Word} word The x64-Word to OR with this word. - * - * @return {X64Word} A new x64-Word object after ORing. - * - * @example - * - * var ored = x64Word.or(anotherX64Word); - */ - // or: function (word) { - // var high = this.high | word.high; - // var low = this.low | word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise XORs this word with the passed word. - * - * @param {X64Word} word The x64-Word to XOR with this word. - * - * @return {X64Word} A new x64-Word object after XORing. - * - * @example - * - * var xored = x64Word.xor(anotherX64Word); - */ - // xor: function (word) { - // var high = this.high ^ word.high; - // var low = this.low ^ word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Shifts this word n bits to the left. - * - * @param {number} n The number of bits to shift. - * - * @return {X64Word} A new x64-Word object after shifting. - * - * @example - * - * var shifted = x64Word.shiftL(25); - */ - // shiftL: function (n) { - // if (n < 32) { - // var high = (this.high << n) | (this.low >>> (32 - n)); - // var low = this.low << n; - // } else { - // var high = this.low << (n - 32); - // var low = 0; - // } - - // return X64Word.create(high, low); - // }, - - /** - * Shifts this word n bits to the right. - * - * @param {number} n The number of bits to shift. - * - * @return {X64Word} A new x64-Word object after shifting. - * - * @example - * - * var shifted = x64Word.shiftR(7); - */ - // shiftR: function (n) { - // if (n < 32) { - // var low = (this.low >>> n) | (this.high << (32 - n)); - // var high = this.high >>> n; - // } else { - // var low = this.high >>> (n - 32); - // var high = 0; - // } - - // return X64Word.create(high, low); - // }, - - /** - * Rotates this word n bits to the left. - * - * @param {number} n The number of bits to rotate. - * - * @return {X64Word} A new x64-Word object after rotating. - * - * @example - * - * var rotated = x64Word.rotL(25); - */ - // rotL: function (n) { - // return this.shiftL(n).or(this.shiftR(64 - n)); - // }, - - /** - * Rotates this word n bits to the right. - * - * @param {number} n The number of bits to rotate. - * - * @return {X64Word} A new x64-Word object after rotating. - * - * @example - * - * var rotated = x64Word.rotR(7); - */ - // rotR: function (n) { - // return this.shiftR(n).or(this.shiftL(64 - n)); - // }, - - /** - * Adds this word with the passed word. - * - * @param {X64Word} word The x64-Word to add with this word. - * - * @return {X64Word} A new x64-Word object after adding. - * - * @example - * - * var added = x64Word.add(anotherX64Word); - */ - // add: function (word) { - // var low = (this.low + word.low) | 0; - // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; - // var high = (this.high + word.high + carry) | 0; - - // return X64Word.create(high, low); - // } - }); - - /** - * An array of 64-bit words. - * - * @property {Array} words The array of CryptoJS.x64.Word objects. - * @property {number} sigBytes The number of significant bytes in this word array. - */ - var X64WordArray = C_x64.WordArray = Base.extend({ - /** - * Initializes a newly created word array. - * - * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. - * @param {number} sigBytes (Optional) The number of significant bytes in the words. - * - * @example - * - * var wordArray = CryptoJS.x64.WordArray.create(); - * - * var wordArray = CryptoJS.x64.WordArray.create([ - * CryptoJS.x64.Word.create(0x00010203, 0x04050607), - * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) - * ]); - * - * var wordArray = CryptoJS.x64.WordArray.create([ - * CryptoJS.x64.Word.create(0x00010203, 0x04050607), - * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) - * ], 10); - */ - init: function (words, sigBytes) { - words = this.words = words || []; - - if (sigBytes != undefined) { - this.sigBytes = sigBytes; - } else { - this.sigBytes = words.length * 8; - } - }, - - /** - * Converts this 64-bit word array to a 32-bit word array. - * - * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. - * - * @example - * - * var x32WordArray = x64WordArray.toX32(); - */ - toX32: function () { - // Shortcuts - var x64Words = this.words; - var x64WordsLength = x64Words.length; - - // Convert - var x32Words = []; - for (var i = 0; i < x64WordsLength; i++) { - var x64Word = x64Words[i]; - x32Words.push(x64Word.high); - x32Words.push(x64Word.low); - } - - return X32WordArray.create(x32Words, this.sigBytes); - }, - - /** - * Creates a copy of this word array. - * - * @return {X64WordArray} The clone. - * - * @example - * - * var clone = x64WordArray.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - - // Clone "words" array - var words = clone.words = this.words.slice(0); - - // Clone each X64Word object - var wordsLength = words.length; - for (var i = 0; i < wordsLength; i++) { - words[i] = words[i].clone(); - } - - return clone; - } - }); - }()); - - - return CryptoJS; - -})); - -/***/ }), - -/***/ "./node_modules/desandro-matches-selector/matches-selector.js": -/*!********************************************************************!*\ - !*** ./node_modules/desandro-matches-selector/matches-selector.js ***! - \********************************************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * matchesSelector v2.0.2 - * matchesSelector( element, '.selector' ) - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true */ - -( function( window, factory ) { - /*global define: false, module: false */ - 'use strict'; - // universal module definition - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory() { - 'use strict'; - - var matchesMethod = ( function() { - var ElemProto = window.Element.prototype; - // check for the standard method name first - if ( ElemProto.matches ) { - return 'matches'; - } - // check un-prefixed - if ( ElemProto.matchesSelector ) { - return 'matchesSelector'; - } - // check vendor prefixes - var prefixes = [ 'webkit', 'moz', 'ms', 'o' ]; - - for ( var i=0; i < prefixes.length; i++ ) { - var prefix = prefixes[i]; - var method = prefix + 'MatchesSelector'; - if ( ElemProto[ method ] ) { - return method; - } - } - })(); - - return function matchesSelector( elem, selector ) { - return elem[ matchesMethod ]( selector ); - }; - -})); - - -/***/ }), - -/***/ "./node_modules/ev-emitter/ev-emitter.js": -/*!***********************************************!*\ - !*** ./node_modules/ev-emitter/ev-emitter.js ***! - \***********************************************/ -/***/ (function(module) { - -/** - * EvEmitter v2.1.1 - * Lil' event emitter - * MIT License - */ - -( function( global, factory ) { - // universal module definition - if ( true && module.exports ) { - // CommonJS - Browserify, Webpack - module.exports = factory(); - } else { - // Browser globals - global.EvEmitter = factory(); - } - -}( typeof window != 'undefined' ? window : this, function() { - -function EvEmitter() {} - -let proto = EvEmitter.prototype; - -proto.on = function( eventName, listener ) { - if ( !eventName || !listener ) return this; - - // set events hash - let events = this._events = this._events || {}; - // set listeners array - let listeners = events[ eventName ] = events[ eventName ] || []; - // only add once - if ( !listeners.includes( listener ) ) { - listeners.push( listener ); - } - - return this; -}; - -proto.once = function( eventName, listener ) { - if ( !eventName || !listener ) return this; - - // add event - this.on( eventName, listener ); - // set once flag - // set onceEvents hash - let onceEvents = this._onceEvents = this._onceEvents || {}; - // set onceListeners object - let onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {}; - // set flag - onceListeners[ listener ] = true; - - return this; -}; - -proto.off = function( eventName, listener ) { - let listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) return this; - - let index = listeners.indexOf( listener ); - if ( index != -1 ) { - listeners.splice( index, 1 ); - } - - return this; -}; - -proto.emitEvent = function( eventName, args ) { - let listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) return this; - - // copy over to avoid interference if .off() in listener - listeners = listeners.slice( 0 ); - args = args || []; - // once stuff - let onceListeners = this._onceEvents && this._onceEvents[ eventName ]; - - for ( let listener of listeners ) { - let isOnce = onceListeners && onceListeners[ listener ]; - if ( isOnce ) { - // remove listener - // remove before trigger to prevent recursion - this.off( eventName, listener ); - // unset once flag - delete onceListeners[ listener ]; - } - // trigger listener - listener.apply( this, args ); - } - - return this; -}; - -proto.allOff = function() { - delete this._events; - delete this._onceEvents; - return this; -}; - -return EvEmitter; - -} ) ); - - -/***/ }), - -/***/ "./node_modules/fizzy-ui-utils/utils.js": -/*!**********************************************!*\ - !*** ./node_modules/fizzy-ui-utils/utils.js ***! - \**********************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * Fizzy UI utils v2.0.7 - * MIT license - */ - -/*jshint browser: true, undef: true, unused: true, strict: true */ - -( function( window, factory ) { - // universal module definition - /*jshint strict: false */ /*globals define, module, require */ - - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! desandro-matches-selector/matches-selector */ "./node_modules/desandro-matches-selector/matches-selector.js") - ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( matchesSelector ) { - return factory( window, matchesSelector ); - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( window, matchesSelector ) { - -'use strict'; - -var utils = {}; - -// ----- extend ----- // - -// extends objects -utils.extend = function( a, b ) { - for ( var prop in b ) { - a[ prop ] = b[ prop ]; - } - return a; -}; - -// ----- modulo ----- // - -utils.modulo = function( num, div ) { - return ( ( num % div ) + div ) % div; -}; - -// ----- makeArray ----- // - -var arraySlice = Array.prototype.slice; - -// turn element or nodeList into an array -utils.makeArray = function( obj ) { - if ( Array.isArray( obj ) ) { - // use object if already an array - return obj; - } - // return empty array if undefined or null. #6 - if ( obj === null || obj === undefined ) { - return []; - } - - var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number'; - if ( isArrayLike ) { - // convert nodeList to array - return arraySlice.call( obj ); - } - - // array of single index - return [ obj ]; -}; - -// ----- removeFrom ----- // - -utils.removeFrom = function( ary, obj ) { - var index = ary.indexOf( obj ); - if ( index != -1 ) { - ary.splice( index, 1 ); - } -}; - -// ----- getParent ----- // - -utils.getParent = function( elem, selector ) { - while ( elem.parentNode && elem != document.body ) { - elem = elem.parentNode; - if ( matchesSelector( elem, selector ) ) { - return elem; - } - } -}; - -// ----- getQueryElement ----- // - -// use element as selector string -utils.getQueryElement = function( elem ) { - if ( typeof elem == 'string' ) { - return document.querySelector( elem ); - } - return elem; -}; - -// ----- handleEvent ----- // - -// enable .ontype to trigger from .addEventListener( elem, 'type' ) -utils.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -// ----- filterFindElements ----- // - -utils.filterFindElements = function( elems, selector ) { - // make array of elems - elems = utils.makeArray( elems ); - var ffElems = []; - - elems.forEach( function( elem ) { - // check that elem is an actual element - if ( !( elem instanceof HTMLElement ) ) { - return; - } - // add elem if no selector - if ( !selector ) { - ffElems.push( elem ); - return; - } - // filter & find items if we have a selector - // filter - if ( matchesSelector( elem, selector ) ) { - ffElems.push( elem ); - } - // find children - var childElems = elem.querySelectorAll( selector ); - // concat childElems to filterFound array - for ( var i=0; i < childElems.length; i++ ) { - ffElems.push( childElems[i] ); - } - }); - - return ffElems; -}; - -// ----- debounceMethod ----- // - -utils.debounceMethod = function( _class, methodName, threshold ) { - threshold = threshold || 100; - // original method - var method = _class.prototype[ methodName ]; - var timeoutName = methodName + 'Timeout'; - - _class.prototype[ methodName ] = function() { - var timeout = this[ timeoutName ]; - clearTimeout( timeout ); - - var args = arguments; - var _this = this; - this[ timeoutName ] = setTimeout( function() { - method.apply( _this, args ); - delete _this[ timeoutName ]; - }, threshold ); - }; -}; - -// ----- docReady ----- // - -utils.docReady = function( callback ) { - var readyState = document.readyState; - if ( readyState == 'complete' || readyState == 'interactive' ) { - // do async to allow for other scripts to run. metafizzy/flickity#441 - setTimeout( callback ); - } else { - document.addEventListener( 'DOMContentLoaded', callback ); - } -}; - -// ----- htmlInit ----- // - -// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/ -utils.toDashed = function( str ) { - return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) { - return $1 + '-' + $2; - }).toLowerCase(); -}; - -var console = window.console; -/** - * allow user to initialize classes via [data-namespace] or .js-namespace class - * htmlInit( Widget, 'widgetName' ) - * options are parsed from data-namespace-options - */ -utils.htmlInit = function( WidgetClass, namespace ) { - utils.docReady( function() { - var dashedNamespace = utils.toDashed( namespace ); - var dataAttr = 'data-' + dashedNamespace; - var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' ); - var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace ); - var elems = utils.makeArray( dataAttrElems ) - .concat( utils.makeArray( jsDashElems ) ); - var dataOptionsAttr = dataAttr + '-options'; - var jQuery = window.jQuery; - - elems.forEach( function( elem ) { - var attr = elem.getAttribute( dataAttr ) || - elem.getAttribute( dataOptionsAttr ); - var options; - try { - options = attr && JSON.parse( attr ); - } catch ( error ) { - // log error, do not initialize - if ( console ) { - console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className + - ': ' + error ); - } - return; - } - // initialize - var instance = new WidgetClass( elem, options ); - // make available via $().data('namespace') - if ( jQuery ) { - jQuery.data( elem, namespace, instance ); - } - }); - - }); -}; - -// ----- ----- // - -return utils; - -})); - - -/***/ }), - -/***/ "./node_modules/get-size/get-size.js": -/*!*******************************************!*\ - !*** ./node_modules/get-size/get-size.js ***! - \*******************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - * getSize v2.0.3 - * measure size of elements - * MIT license - */ - -/* jshint browser: true, strict: true, undef: true, unused: true */ -/* globals console: false */ - -( function( window, factory ) { - /* jshint strict: false */ /* globals define, module */ - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -})( window, function factory() { -'use strict'; - -// -------------------------- helpers -------------------------- // - -// get a number from a string, not a percentage -function getStyleSize( value ) { - var num = parseFloat( value ); - // not a percent like '100%', and a number - var isValid = value.indexOf('%') == -1 && !isNaN( num ); - return isValid && num; -} - -function noop() {} - -var logError = typeof console == 'undefined' ? noop : - function( message ) { - console.error( message ); - }; - -// -------------------------- measurements -------------------------- // - -var measurements = [ - 'paddingLeft', - 'paddingRight', - 'paddingTop', - 'paddingBottom', - 'marginLeft', - 'marginRight', - 'marginTop', - 'marginBottom', - 'borderLeftWidth', - 'borderRightWidth', - 'borderTopWidth', - 'borderBottomWidth' -]; - -var measurementsLength = measurements.length; - -function getZeroSize() { - var size = { - width: 0, - height: 0, - innerWidth: 0, - innerHeight: 0, - outerWidth: 0, - outerHeight: 0 - }; - for ( var i=0; i < measurementsLength; i++ ) { - var measurement = measurements[i]; - size[ measurement ] = 0; - } - return size; -} - -// -------------------------- getStyle -------------------------- // - -/** - * getStyle, get style of element, check for Firefox bug - * https://bugzilla.mozilla.org/show_bug.cgi?id=548397 - */ -function getStyle( elem ) { - var style = getComputedStyle( elem ); - if ( !style ) { - logError( 'Style returned ' + style + - '. Are you running this code in a hidden iframe on Firefox? ' + - 'See https://bit.ly/getsizebug1' ); - } - return style; -} - -// -------------------------- setup -------------------------- // - -var isSetup = false; - -var isBoxSizeOuter; - -/** - * setup - * check isBoxSizerOuter - * do on first getSize() rather than on page load for Firefox bug - */ -function setup() { - // setup once - if ( isSetup ) { - return; - } - isSetup = true; - - // -------------------------- box sizing -------------------------- // - - /** - * Chrome & Safari measure the outer-width on style.width on border-box elems - * IE11 & Firefox<29 measures the inner-width - */ - var div = document.createElement('div'); - div.style.width = '200px'; - div.style.padding = '1px 2px 3px 4px'; - div.style.borderStyle = 'solid'; - div.style.borderWidth = '1px 2px 3px 4px'; - div.style.boxSizing = 'border-box'; - - var body = document.body || document.documentElement; - body.appendChild( div ); - var style = getStyle( div ); - // round value for browser zoom. desandro/masonry#928 - isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200; - getSize.isBoxSizeOuter = isBoxSizeOuter; - - body.removeChild( div ); -} - -// -------------------------- getSize -------------------------- // - -function getSize( elem ) { - setup(); - - // use querySeletor if elem is string - if ( typeof elem == 'string' ) { - elem = document.querySelector( elem ); - } - - // do not proceed on non-objects - if ( !elem || typeof elem != 'object' || !elem.nodeType ) { - return; - } - - var style = getStyle( elem ); - - // if hidden, everything is 0 - if ( style.display == 'none' ) { - return getZeroSize(); - } - - var size = {}; - size.width = elem.offsetWidth; - size.height = elem.offsetHeight; - - var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box'; - - // get all measurements - for ( var i=0; i < measurementsLength; i++ ) { - var measurement = measurements[i]; - var value = style[ measurement ]; - var num = parseFloat( value ); - // any 'auto', 'medium' value will be 0 - size[ measurement ] = !isNaN( num ) ? num : 0; - } - - var paddingWidth = size.paddingLeft + size.paddingRight; - var paddingHeight = size.paddingTop + size.paddingBottom; - var marginWidth = size.marginLeft + size.marginRight; - var marginHeight = size.marginTop + size.marginBottom; - var borderWidth = size.borderLeftWidth + size.borderRightWidth; - var borderHeight = size.borderTopWidth + size.borderBottomWidth; - - var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter; - - // overwrite width and height if we can get it from style - var styleWidth = getStyleSize( style.width ); - if ( styleWidth !== false ) { - size.width = styleWidth + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth ); - } - - var styleHeight = getStyleSize( style.height ); - if ( styleHeight !== false ) { - size.height = styleHeight + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight ); - } - - size.innerWidth = size.width - ( paddingWidth + borderWidth ); - size.innerHeight = size.height - ( paddingHeight + borderHeight ); - - size.outerWidth = size.width + marginWidth; - size.outerHeight = size.height + marginHeight; - - return size; -} - -return getSize; - -}); - - -/***/ }), - -/***/ "./node_modules/imagesloaded/imagesloaded.js": -/*!***************************************************!*\ - !*** ./node_modules/imagesloaded/imagesloaded.js ***! - \***************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -/*! - * imagesLoaded v5.0.0 - * JavaScript is all like "You images are done yet or what?" - * MIT License - */ - -( function( window, factory ) { - // universal module definition - if ( true && module.exports ) { - // CommonJS - module.exports = factory( window, __webpack_require__(/*! ev-emitter */ "./node_modules/ev-emitter/ev-emitter.js") ); - } else { - // browser global - window.imagesLoaded = factory( window, window.EvEmitter ); - } - -} )( typeof window !== 'undefined' ? window : this, - function factory( window, EvEmitter ) { - -let $ = window.jQuery; -let console = window.console; - -// -------------------------- helpers -------------------------- // - -// turn element or nodeList into an array -function makeArray( obj ) { - // use object if already an array - if ( Array.isArray( obj ) ) return obj; - - let isArrayLike = typeof obj == 'object' && typeof obj.length == 'number'; - // convert nodeList to array - if ( isArrayLike ) return [ ...obj ]; - - // array of single index - return [ obj ]; -} - -// -------------------------- imagesLoaded -------------------------- // - -/** - * @param {[Array, Element, NodeList, String]} elem - * @param {[Object, Function]} options - if function, use as callback - * @param {Function} onAlways - callback function - * @returns {ImagesLoaded} - */ -function ImagesLoaded( elem, options, onAlways ) { - // coerce ImagesLoaded() without new, to be new ImagesLoaded() - if ( !( this instanceof ImagesLoaded ) ) { - return new ImagesLoaded( elem, options, onAlways ); - } - // use elem as selector string - let queryElem = elem; - if ( typeof elem == 'string' ) { - queryElem = document.querySelectorAll( elem ); - } - // bail if bad element - if ( !queryElem ) { - console.error(`Bad element for imagesLoaded ${queryElem || elem}`); - return; - } - - this.elements = makeArray( queryElem ); - this.options = {}; - // shift arguments if no options set - if ( typeof options == 'function' ) { - onAlways = options; - } else { - Object.assign( this.options, options ); - } - - if ( onAlways ) this.on( 'always', onAlways ); - - this.getImages(); - // add jQuery Deferred object - if ( $ ) this.jqDeferred = new $.Deferred(); - - // HACK check async to allow time to bind listeners - setTimeout( this.check.bind( this ) ); -} - -ImagesLoaded.prototype = Object.create( EvEmitter.prototype ); - -ImagesLoaded.prototype.getImages = function() { - this.images = []; - - // filter & find items if we have an item selector - this.elements.forEach( this.addElementImages, this ); -}; - -const elementNodeTypes = [ 1, 9, 11 ]; - -/** - * @param {Node} elem - */ -ImagesLoaded.prototype.addElementImages = function( elem ) { - // filter siblings - if ( elem.nodeName === 'IMG' ) { - this.addImage( elem ); - } - // get background image on element - if ( this.options.background === true ) { - this.addElementBackgroundImages( elem ); - } - - // find children - // no non-element nodes, #143 - let { nodeType } = elem; - if ( !nodeType || !elementNodeTypes.includes( nodeType ) ) return; - - let childImgs = elem.querySelectorAll('img'); - // concat childElems to filterFound array - for ( let img of childImgs ) { - this.addImage( img ); - } - - // get child background images - if ( typeof this.options.background == 'string' ) { - let children = elem.querySelectorAll( this.options.background ); - for ( let child of children ) { - this.addElementBackgroundImages( child ); - } - } -}; - -const reURL = /url\((['"])?(.*?)\1\)/gi; - -ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) { - let style = getComputedStyle( elem ); - // Firefox returns null if in a hidden iframe https://bugzil.la/548397 - if ( !style ) return; - - // get url inside url("...") - let matches = reURL.exec( style.backgroundImage ); - while ( matches !== null ) { - let url = matches && matches[2]; - if ( url ) { - this.addBackground( url, elem ); - } - matches = reURL.exec( style.backgroundImage ); - } -}; - -/** - * @param {Image} img - */ -ImagesLoaded.prototype.addImage = function( img ) { - let loadingImage = new LoadingImage( img ); - this.images.push( loadingImage ); -}; - -ImagesLoaded.prototype.addBackground = function( url, elem ) { - let background = new Background( url, elem ); - this.images.push( background ); -}; - -ImagesLoaded.prototype.check = function() { - this.progressedCount = 0; - this.hasAnyBroken = false; - // complete if no images - if ( !this.images.length ) { - this.complete(); - return; - } - - /* eslint-disable-next-line func-style */ - let onProgress = ( image, elem, message ) => { - // HACK - Chrome triggers event before object properties have changed. #83 - setTimeout( () => { - this.progress( image, elem, message ); - } ); - }; - - this.images.forEach( function( loadingImage ) { - loadingImage.once( 'progress', onProgress ); - loadingImage.check(); - } ); -}; - -ImagesLoaded.prototype.progress = function( image, elem, message ) { - this.progressedCount++; - this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded; - // progress event - this.emitEvent( 'progress', [ this, image, elem ] ); - if ( this.jqDeferred && this.jqDeferred.notify ) { - this.jqDeferred.notify( this, image ); - } - // check if completed - if ( this.progressedCount === this.images.length ) { - this.complete(); - } - - if ( this.options.debug && console ) { - console.log( `progress: ${message}`, image, elem ); - } -}; - -ImagesLoaded.prototype.complete = function() { - let eventName = this.hasAnyBroken ? 'fail' : 'done'; - this.isComplete = true; - this.emitEvent( eventName, [ this ] ); - this.emitEvent( 'always', [ this ] ); - if ( this.jqDeferred ) { - let jqMethod = this.hasAnyBroken ? 'reject' : 'resolve'; - this.jqDeferred[ jqMethod ]( this ); - } -}; - -// -------------------------- -------------------------- // - -function LoadingImage( img ) { - this.img = img; -} - -LoadingImage.prototype = Object.create( EvEmitter.prototype ); - -LoadingImage.prototype.check = function() { - // If complete is true and browser supports natural sizes, - // try to check for image status manually. - let isComplete = this.getIsImageComplete(); - if ( isComplete ) { - // report based on naturalWidth - this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' ); - return; - } - - // If none of the checks above matched, simulate loading on detached element. - this.proxyImage = new Image(); - // add crossOrigin attribute. #204 - if ( this.img.crossOrigin ) { - this.proxyImage.crossOrigin = this.img.crossOrigin; - } - this.proxyImage.addEventListener( 'load', this ); - this.proxyImage.addEventListener( 'error', this ); - // bind to image as well for Firefox. #191 - this.img.addEventListener( 'load', this ); - this.img.addEventListener( 'error', this ); - this.proxyImage.src = this.img.currentSrc || this.img.src; -}; - -LoadingImage.prototype.getIsImageComplete = function() { - // check for non-zero, non-undefined naturalWidth - // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671 - return this.img.complete && this.img.naturalWidth; -}; - -LoadingImage.prototype.confirm = function( isLoaded, message ) { - this.isLoaded = isLoaded; - let { parentNode } = this.img; - // emit progress with parent or self - let elem = parentNode.nodeName === 'PICTURE' ? parentNode : this.img; - this.emitEvent( 'progress', [ this, elem, message ] ); -}; - -// ----- events ----- // - -// trigger specified handler for event type -LoadingImage.prototype.handleEvent = function( event ) { - let method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -LoadingImage.prototype.onload = function() { - this.confirm( true, 'onload' ); - this.unbindEvents(); -}; - -LoadingImage.prototype.onerror = function() { - this.confirm( false, 'onerror' ); - this.unbindEvents(); -}; - -LoadingImage.prototype.unbindEvents = function() { - this.proxyImage.removeEventListener( 'load', this ); - this.proxyImage.removeEventListener( 'error', this ); - this.img.removeEventListener( 'load', this ); - this.img.removeEventListener( 'error', this ); -}; - -// -------------------------- Background -------------------------- // - -function Background( url, element ) { - this.url = url; - this.element = element; - this.img = new Image(); -} - -// inherit LoadingImage prototype -Background.prototype = Object.create( LoadingImage.prototype ); - -Background.prototype.check = function() { - this.img.addEventListener( 'load', this ); - this.img.addEventListener( 'error', this ); - this.img.src = this.url; - // check if image is already complete - let isComplete = this.getIsImageComplete(); - if ( isComplete ) { - this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' ); - this.unbindEvents(); - } -}; - -Background.prototype.unbindEvents = function() { - this.img.removeEventListener( 'load', this ); - this.img.removeEventListener( 'error', this ); -}; - -Background.prototype.confirm = function( isLoaded, message ) { - this.isLoaded = isLoaded; - this.emitEvent( 'progress', [ this, this.element, message ] ); -}; - -// -------------------------- jQuery -------------------------- // - -ImagesLoaded.makeJQueryPlugin = function( jQuery ) { - jQuery = jQuery || window.jQuery; - if ( !jQuery ) return; - - // set local variable - $ = jQuery; - // $().imagesLoaded() - $.fn.imagesLoaded = function( options, onAlways ) { - let instance = new ImagesLoaded( this, options, onAlways ); - return instance.jqDeferred.promise( $( this ) ); - }; -}; -// try making plugin -ImagesLoaded.makeJQueryPlugin(); - -// -------------------------- -------------------------- // - -return ImagesLoaded; - -} ); - - -/***/ }), - -/***/ "./node_modules/masonry-layout/masonry.js": -/*!************************************************!*\ - !*** ./node_modules/masonry-layout/masonry.js ***! - \************************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - * Masonry v4.2.2 - * Cascading grid layout library - * https://masonry.desandro.com - * MIT License - * by David DeSandro - */ - -( function( window, factory ) { - // universal module definition - /* jshint strict: false */ /*globals define, module, require */ - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! outlayer/outlayer */ "./node_modules/outlayer/outlayer.js"), - __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js") - ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( Outlayer, getSize ) { - -'use strict'; - -// -------------------------- masonryDefinition -------------------------- // - - // create an Outlayer layout class - var Masonry = Outlayer.create('masonry'); - // isFitWidth -> fitWidth - Masonry.compatOptions.fitWidth = 'isFitWidth'; - - var proto = Masonry.prototype; - - proto._resetLayout = function() { - this.getSize(); - this._getMeasurement( 'columnWidth', 'outerWidth' ); - this._getMeasurement( 'gutter', 'outerWidth' ); - this.measureColumns(); - - // reset column Y - this.colYs = []; - for ( var i=0; i < this.cols; i++ ) { - this.colYs.push( 0 ); - } - - this.maxY = 0; - this.horizontalColIndex = 0; - }; - - proto.measureColumns = function() { - this.getContainerWidth(); - // if columnWidth is 0, default to outerWidth of first item - if ( !this.columnWidth ) { - var firstItem = this.items[0]; - var firstItemElem = firstItem && firstItem.element; - // columnWidth fall back to item of first element - this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth || - // if first elem has no width, default to size of container - this.containerWidth; - } - - var columnWidth = this.columnWidth += this.gutter; - - // calculate columns - var containerWidth = this.containerWidth + this.gutter; - var cols = containerWidth / columnWidth; - // fix rounding errors, typically with gutters - var excess = columnWidth - containerWidth % columnWidth; - // if overshoot is less than a pixel, round up, otherwise floor it - var mathMethod = excess && excess < 1 ? 'round' : 'floor'; - cols = Math[ mathMethod ]( cols ); - this.cols = Math.max( cols, 1 ); - }; - - proto.getContainerWidth = function() { - // container is parent if fit width - var isFitWidth = this._getOption('fitWidth'); - var container = isFitWidth ? this.element.parentNode : this.element; - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var size = getSize( container ); - this.containerWidth = size && size.innerWidth; - }; - - proto._getItemLayoutPosition = function( item ) { - item.getSize(); - // how many columns does this brick span - var remainder = item.size.outerWidth % this.columnWidth; - var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil'; - // round if off by 1 pixel, otherwise use ceil - var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth ); - colSpan = Math.min( colSpan, this.cols ); - // use horizontal or top column position - var colPosMethod = this.options.horizontalOrder ? - '_getHorizontalColPosition' : '_getTopColPosition'; - var colPosition = this[ colPosMethod ]( colSpan, item ); - // position the brick - var position = { - x: this.columnWidth * colPosition.col, - y: colPosition.y - }; - // apply setHeight to necessary columns - var setHeight = colPosition.y + item.size.outerHeight; - var setMax = colSpan + colPosition.col; - for ( var i = colPosition.col; i < setMax; i++ ) { - this.colYs[i] = setHeight; - } - - return position; - }; - - proto._getTopColPosition = function( colSpan ) { - var colGroup = this._getTopColGroup( colSpan ); - // get the minimum Y value from the columns - var minimumY = Math.min.apply( Math, colGroup ); - - return { - col: colGroup.indexOf( minimumY ), - y: minimumY, - }; - }; - - /** - * @param {Number} colSpan - number of columns the element spans - * @returns {Array} colGroup - */ - proto._getTopColGroup = function( colSpan ) { - if ( colSpan < 2 ) { - // if brick spans only one column, use all the column Ys - return this.colYs; - } - - var colGroup = []; - // how many different places could this brick fit horizontally - var groupCount = this.cols + 1 - colSpan; - // for each group potential horizontal position - for ( var i = 0; i < groupCount; i++ ) { - colGroup[i] = this._getColGroupY( i, colSpan ); - } - return colGroup; - }; - - proto._getColGroupY = function( col, colSpan ) { - if ( colSpan < 2 ) { - return this.colYs[ col ]; - } - // make an array of colY values for that one group - var groupColYs = this.colYs.slice( col, col + colSpan ); - // and get the max value of the array - return Math.max.apply( Math, groupColYs ); - }; - - // get column position based on horizontal index. #873 - proto._getHorizontalColPosition = function( colSpan, item ) { - var col = this.horizontalColIndex % this.cols; - var isOver = colSpan > 1 && col + colSpan > this.cols; - // shift to next row if item can't fit on current row - col = isOver ? 0 : col; - // don't let zero-size items take up space - var hasSize = item.size.outerWidth && item.size.outerHeight; - this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex; - - return { - col: col, - y: this._getColGroupY( col, colSpan ), - }; - }; - - proto._manageStamp = function( stamp ) { - var stampSize = getSize( stamp ); - var offset = this._getElementOffset( stamp ); - // get the columns that this stamp affects - var isOriginLeft = this._getOption('originLeft'); - var firstX = isOriginLeft ? offset.left : offset.right; - var lastX = firstX + stampSize.outerWidth; - var firstCol = Math.floor( firstX / this.columnWidth ); - firstCol = Math.max( 0, firstCol ); - var lastCol = Math.floor( lastX / this.columnWidth ); - // lastCol should not go over if multiple of columnWidth #425 - lastCol -= lastX % this.columnWidth ? 0 : 1; - lastCol = Math.min( this.cols - 1, lastCol ); - // set colYs to bottom of the stamp - - var isOriginTop = this._getOption('originTop'); - var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) + - stampSize.outerHeight; - for ( var i = firstCol; i <= lastCol; i++ ) { - this.colYs[i] = Math.max( stampMaxY, this.colYs[i] ); - } - }; - - proto._getContainerSize = function() { - this.maxY = Math.max.apply( Math, this.colYs ); - var size = { - height: this.maxY - }; - - if ( this._getOption('fitWidth') ) { - size.width = this._getContainerFitWidth(); - } - - return size; - }; - - proto._getContainerFitWidth = function() { - var unusedCols = 0; - // count unused columns - var i = this.cols; - while ( --i ) { - if ( this.colYs[i] !== 0 ) { - break; - } - unusedCols++; - } - // fit container to columns that have been used - return ( this.cols - unusedCols ) * this.columnWidth - this.gutter; - }; - - proto.needsResizeLayout = function() { - var previousWidth = this.containerWidth; - this.getContainerWidth(); - return previousWidth != this.containerWidth; - }; - - return Masonry; - -})); - - -/***/ }), - -/***/ "./node_modules/outlayer/item.js": -/*!***************************************!*\ - !*** ./node_modules/outlayer/item.js ***! - \***************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * Outlayer Item - */ - -( function( window, factory ) { - // universal module definition - /* jshint strict: false */ /* globals define, module, require */ - if ( true ) { - // AMD - RequireJS - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js"), - __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js") - ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( EvEmitter, getSize ) { -'use strict'; - -// ----- helpers ----- // - -function isEmptyObj( obj ) { - for ( var prop in obj ) { - return false; - } - prop = null; - return true; -} - -// -------------------------- CSS3 support -------------------------- // - - -var docElemStyle = document.documentElement.style; - -var transitionProperty = typeof docElemStyle.transition == 'string' ? - 'transition' : 'WebkitTransition'; -var transformProperty = typeof docElemStyle.transform == 'string' ? - 'transform' : 'WebkitTransform'; - -var transitionEndEvent = { - WebkitTransition: 'webkitTransitionEnd', - transition: 'transitionend' -}[ transitionProperty ]; - -// cache all vendor properties that could have vendor prefix -var vendorProperties = { - transform: transformProperty, - transition: transitionProperty, - transitionDuration: transitionProperty + 'Duration', - transitionProperty: transitionProperty + 'Property', - transitionDelay: transitionProperty + 'Delay' -}; - -// -------------------------- Item -------------------------- // - -function Item( element, layout ) { - if ( !element ) { - return; - } - - this.element = element; - // parent layout class, i.e. Masonry, Isotope, or Packery - this.layout = layout; - this.position = { - x: 0, - y: 0 - }; - - this._create(); -} - -// inherit EvEmitter -var proto = Item.prototype = Object.create( EvEmitter.prototype ); -proto.constructor = Item; - -proto._create = function() { - // transition objects - this._transn = { - ingProperties: {}, - clean: {}, - onEnd: {} - }; - - this.css({ - position: 'absolute' - }); -}; - -// trigger specified handler for event type -proto.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -proto.getSize = function() { - this.size = getSize( this.element ); -}; - -/** - * apply CSS styles to element - * @param {Object} style - */ -proto.css = function( style ) { - var elemStyle = this.element.style; - - for ( var prop in style ) { - // use vendor property if available - var supportedProp = vendorProperties[ prop ] || prop; - elemStyle[ supportedProp ] = style[ prop ]; - } -}; - - // measure position, and sets it -proto.getPosition = function() { - var style = getComputedStyle( this.element ); - var isOriginLeft = this.layout._getOption('originLeft'); - var isOriginTop = this.layout._getOption('originTop'); - var xValue = style[ isOriginLeft ? 'left' : 'right' ]; - var yValue = style[ isOriginTop ? 'top' : 'bottom' ]; - var x = parseFloat( xValue ); - var y = parseFloat( yValue ); - // convert percent to pixels - var layoutSize = this.layout.size; - if ( xValue.indexOf('%') != -1 ) { - x = ( x / 100 ) * layoutSize.width; - } - if ( yValue.indexOf('%') != -1 ) { - y = ( y / 100 ) * layoutSize.height; - } - // clean up 'auto' or other non-integer values - x = isNaN( x ) ? 0 : x; - y = isNaN( y ) ? 0 : y; - // remove padding from measurement - x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight; - y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom; - - this.position.x = x; - this.position.y = y; -}; - -// set settled position, apply padding -proto.layoutPosition = function() { - var layoutSize = this.layout.size; - var style = {}; - var isOriginLeft = this.layout._getOption('originLeft'); - var isOriginTop = this.layout._getOption('originTop'); - - // x - var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight'; - var xProperty = isOriginLeft ? 'left' : 'right'; - var xResetProperty = isOriginLeft ? 'right' : 'left'; - - var x = this.position.x + layoutSize[ xPadding ]; - // set in percentage or pixels - style[ xProperty ] = this.getXValue( x ); - // reset other property - style[ xResetProperty ] = ''; - - // y - var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom'; - var yProperty = isOriginTop ? 'top' : 'bottom'; - var yResetProperty = isOriginTop ? 'bottom' : 'top'; - - var y = this.position.y + layoutSize[ yPadding ]; - // set in percentage or pixels - style[ yProperty ] = this.getYValue( y ); - // reset other property - style[ yResetProperty ] = ''; - - this.css( style ); - this.emitEvent( 'layout', [ this ] ); -}; - -proto.getXValue = function( x ) { - var isHorizontal = this.layout._getOption('horizontal'); - return this.layout.options.percentPosition && !isHorizontal ? - ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px'; -}; - -proto.getYValue = function( y ) { - var isHorizontal = this.layout._getOption('horizontal'); - return this.layout.options.percentPosition && isHorizontal ? - ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px'; -}; - -proto._transitionTo = function( x, y ) { - this.getPosition(); - // get current x & y from top/left - var curX = this.position.x; - var curY = this.position.y; - - var didNotMove = x == this.position.x && y == this.position.y; - - // save end position - this.setPosition( x, y ); - - // if did not move and not transitioning, just go to layout - if ( didNotMove && !this.isTransitioning ) { - this.layoutPosition(); - return; - } - - var transX = x - curX; - var transY = y - curY; - var transitionStyle = {}; - transitionStyle.transform = this.getTranslate( transX, transY ); - - this.transition({ - to: transitionStyle, - onTransitionEnd: { - transform: this.layoutPosition - }, - isCleaning: true - }); -}; - -proto.getTranslate = function( x, y ) { - // flip cooridinates if origin on right or bottom - var isOriginLeft = this.layout._getOption('originLeft'); - var isOriginTop = this.layout._getOption('originTop'); - x = isOriginLeft ? x : -x; - y = isOriginTop ? y : -y; - return 'translate3d(' + x + 'px, ' + y + 'px, 0)'; -}; - -// non transition + transform support -proto.goTo = function( x, y ) { - this.setPosition( x, y ); - this.layoutPosition(); -}; - -proto.moveTo = proto._transitionTo; - -proto.setPosition = function( x, y ) { - this.position.x = parseFloat( x ); - this.position.y = parseFloat( y ); -}; - -// ----- transition ----- // - -/** - * @param {Object} style - CSS - * @param {Function} onTransitionEnd - */ - -// non transition, just trigger callback -proto._nonTransition = function( args ) { - this.css( args.to ); - if ( args.isCleaning ) { - this._removeStyles( args.to ); - } - for ( var prop in args.onTransitionEnd ) { - args.onTransitionEnd[ prop ].call( this ); - } -}; - -/** - * proper transition - * @param {Object} args - arguments - * @param {Object} to - style to transition to - * @param {Object} from - style to start transition from - * @param {Boolean} isCleaning - removes transition styles after transition - * @param {Function} onTransitionEnd - callback - */ -proto.transition = function( args ) { - // redirect to nonTransition if no transition duration - if ( !parseFloat( this.layout.options.transitionDuration ) ) { - this._nonTransition( args ); - return; - } - - var _transition = this._transn; - // keep track of onTransitionEnd callback by css property - for ( var prop in args.onTransitionEnd ) { - _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ]; - } - // keep track of properties that are transitioning - for ( prop in args.to ) { - _transition.ingProperties[ prop ] = true; - // keep track of properties to clean up when transition is done - if ( args.isCleaning ) { - _transition.clean[ prop ] = true; - } - } - - // set from styles - if ( args.from ) { - this.css( args.from ); - // force redraw. http://blog.alexmaccaw.com/css-transitions - var h = this.element.offsetHeight; - // hack for JSHint to hush about unused var - h = null; - } - // enable transition - this.enableTransition( args.to ); - // set styles that are transitioning - this.css( args.to ); - - this.isTransitioning = true; - -}; - -// dash before all cap letters, including first for -// WebkitTransform => -webkit-transform -function toDashedAll( str ) { - return str.replace( /([A-Z])/g, function( $1 ) { - return '-' + $1.toLowerCase(); - }); -} - -var transitionProps = 'opacity,' + toDashedAll( transformProperty ); - -proto.enableTransition = function(/* style */) { - // HACK changing transitionProperty during a transition - // will cause transition to jump - if ( this.isTransitioning ) { - return; - } - - // make `transition: foo, bar, baz` from style object - // HACK un-comment this when enableTransition can work - // while a transition is happening - // var transitionValues = []; - // for ( var prop in style ) { - // // dash-ify camelCased properties like WebkitTransition - // prop = vendorProperties[ prop ] || prop; - // transitionValues.push( toDashedAll( prop ) ); - // } - // munge number to millisecond, to match stagger - var duration = this.layout.options.transitionDuration; - duration = typeof duration == 'number' ? duration + 'ms' : duration; - // enable transition styles - this.css({ - transitionProperty: transitionProps, - transitionDuration: duration, - transitionDelay: this.staggerDelay || 0 - }); - // listen for transition end event - this.element.addEventListener( transitionEndEvent, this, false ); -}; - -// ----- events ----- // - -proto.onwebkitTransitionEnd = function( event ) { - this.ontransitionend( event ); -}; - -proto.onotransitionend = function( event ) { - this.ontransitionend( event ); -}; - -// properties that I munge to make my life easier -var dashedVendorProperties = { - '-webkit-transform': 'transform' -}; - -proto.ontransitionend = function( event ) { - // disregard bubbled events from children - if ( event.target !== this.element ) { - return; - } - var _transition = this._transn; - // get property name of transitioned property, convert to prefix-free - var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName; - - // remove property that has completed transitioning - delete _transition.ingProperties[ propertyName ]; - // check if any properties are still transitioning - if ( isEmptyObj( _transition.ingProperties ) ) { - // all properties have completed transitioning - this.disableTransition(); - } - // clean style - if ( propertyName in _transition.clean ) { - // clean up style - this.element.style[ event.propertyName ] = ''; - delete _transition.clean[ propertyName ]; - } - // trigger onTransitionEnd callback - if ( propertyName in _transition.onEnd ) { - var onTransitionEnd = _transition.onEnd[ propertyName ]; - onTransitionEnd.call( this ); - delete _transition.onEnd[ propertyName ]; - } - - this.emitEvent( 'transitionEnd', [ this ] ); -}; - -proto.disableTransition = function() { - this.removeTransitionStyles(); - this.element.removeEventListener( transitionEndEvent, this, false ); - this.isTransitioning = false; -}; - -/** - * removes style property from element - * @param {Object} style -**/ -proto._removeStyles = function( style ) { - // clean up transition styles - var cleanStyle = {}; - for ( var prop in style ) { - cleanStyle[ prop ] = ''; - } - this.css( cleanStyle ); -}; - -var cleanTransitionStyle = { - transitionProperty: '', - transitionDuration: '', - transitionDelay: '' -}; - -proto.removeTransitionStyles = function() { - // remove transition - this.css( cleanTransitionStyle ); -}; - -// ----- stagger ----- // - -proto.stagger = function( delay ) { - delay = isNaN( delay ) ? 0 : delay; - this.staggerDelay = delay + 'ms'; -}; - -// ----- show/hide/remove ----- // - -// remove element from DOM -proto.removeElem = function() { - this.element.parentNode.removeChild( this.element ); - // remove display: none - this.css({ display: '' }); - this.emitEvent( 'remove', [ this ] ); -}; - -proto.remove = function() { - // just remove element if no transition support or no transition - if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) { - this.removeElem(); - return; - } - - // start transition - this.once( 'transitionEnd', function() { - this.removeElem(); - }); - this.hide(); -}; - -proto.reveal = function() { - delete this.isHidden; - // remove display: none - this.css({ display: '' }); - - var options = this.layout.options; - - var onTransitionEnd = {}; - var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle'); - onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd; - - this.transition({ - from: options.hiddenStyle, - to: options.visibleStyle, - isCleaning: true, - onTransitionEnd: onTransitionEnd - }); -}; - -proto.onRevealTransitionEnd = function() { - // check if still visible - // during transition, item may have been hidden - if ( !this.isHidden ) { - this.emitEvent('reveal'); - } -}; - -/** - * get style property use for hide/reveal transition end - * @param {String} styleProperty - hiddenStyle/visibleStyle - * @returns {String} - */ -proto.getHideRevealTransitionEndProperty = function( styleProperty ) { - var optionStyle = this.layout.options[ styleProperty ]; - // use opacity - if ( optionStyle.opacity ) { - return 'opacity'; - } - // get first property - for ( var prop in optionStyle ) { - return prop; - } -}; - -proto.hide = function() { - // set flag - this.isHidden = true; - // remove display: none - this.css({ display: '' }); - - var options = this.layout.options; - - var onTransitionEnd = {}; - var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle'); - onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd; - - this.transition({ - from: options.visibleStyle, - to: options.hiddenStyle, - // keep hidden stuff hidden - isCleaning: true, - onTransitionEnd: onTransitionEnd - }); -}; - -proto.onHideTransitionEnd = function() { - // check if still hidden - // during transition, item may have been un-hidden - if ( this.isHidden ) { - this.css({ display: 'none' }); - this.emitEvent('hide'); - } -}; - -proto.destroy = function() { - this.css({ - position: '', - left: '', - right: '', - top: '', - bottom: '', - transition: '', - transform: '' - }); -}; - -return Item; - -})); - - -/***/ }), - -/***/ "./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js": -/*!*********************************************************************!*\ - !*** ./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js ***! - \*********************************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * EvEmitter v1.1.0 - * Lil' event emitter - * MIT License - */ - -/* jshint unused: true, undef: true, strict: true */ - -( function( global, factory ) { - // universal module definition - /* jshint strict: false */ /* globals define, module, window */ - if ( true ) { - // AMD - RequireJS - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( typeof window != 'undefined' ? window : this, function() { - -"use strict"; - -function EvEmitter() {} - -var proto = EvEmitter.prototype; - -proto.on = function( eventName, listener ) { - if ( !eventName || !listener ) { - return; - } - // set events hash - var events = this._events = this._events || {}; - // set listeners array - var listeners = events[ eventName ] = events[ eventName ] || []; - // only add once - if ( listeners.indexOf( listener ) == -1 ) { - listeners.push( listener ); - } - - return this; -}; - -proto.once = function( eventName, listener ) { - if ( !eventName || !listener ) { - return; - } - // add event - this.on( eventName, listener ); - // set once flag - // set onceEvents hash - var onceEvents = this._onceEvents = this._onceEvents || {}; - // set onceListeners object - var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {}; - // set flag - onceListeners[ listener ] = true; - - return this; -}; - -proto.off = function( eventName, listener ) { - var listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) { - return; - } - var index = listeners.indexOf( listener ); - if ( index != -1 ) { - listeners.splice( index, 1 ); - } - - return this; -}; - -proto.emitEvent = function( eventName, args ) { - var listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) { - return; - } - // copy over to avoid interference if .off() in listener - listeners = listeners.slice(0); - args = args || []; - // once stuff - var onceListeners = this._onceEvents && this._onceEvents[ eventName ]; - - for ( var i=0; i < listeners.length; i++ ) { - var listener = listeners[i] - var isOnce = onceListeners && onceListeners[ listener ]; - if ( isOnce ) { - // remove listener - // remove before trigger to prevent recursion - this.off( eventName, listener ); - // unset once flag - delete onceListeners[ listener ]; - } - // trigger listener - listener.apply( this, args ); - } - - return this; -}; - -proto.allOff = function() { - delete this._events; - delete this._onceEvents; -}; - -return EvEmitter; - -})); - - -/***/ }), - -/***/ "./node_modules/outlayer/outlayer.js": -/*!*******************************************!*\ - !*** ./node_modules/outlayer/outlayer.js ***! - \*******************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - * Outlayer v2.1.1 - * the brains and guts of a layout library - * MIT license - */ - -( function( window, factory ) { - 'use strict'; - // universal module definition - /* jshint strict: false */ /* globals define, module, require */ - if ( true ) { - // AMD - RequireJS - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js"), - __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js"), - __webpack_require__(/*! fizzy-ui-utils/utils */ "./node_modules/fizzy-ui-utils/utils.js"), - __webpack_require__(/*! ./item */ "./node_modules/outlayer/item.js") - ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( EvEmitter, getSize, utils, Item ) { - return factory( window, EvEmitter, getSize, utils, Item); - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( window, EvEmitter, getSize, utils, Item ) { -'use strict'; - -// ----- vars ----- // - -var console = window.console; -var jQuery = window.jQuery; -var noop = function() {}; - -// -------------------------- Outlayer -------------------------- // - -// globally unique identifiers -var GUID = 0; -// internal store of all Outlayer intances -var instances = {}; - - -/** - * @param {Element, String} element - * @param {Object} options - * @constructor - */ -function Outlayer( element, options ) { - var queryElement = utils.getQueryElement( element ); - if ( !queryElement ) { - if ( console ) { - console.error( 'Bad element for ' + this.constructor.namespace + - ': ' + ( queryElement || element ) ); - } - return; - } - this.element = queryElement; - // add jQuery - if ( jQuery ) { - this.$element = jQuery( this.element ); - } - - // options - this.options = utils.extend( {}, this.constructor.defaults ); - this.option( options ); - - // add id for Outlayer.getFromElement - var id = ++GUID; - this.element.outlayerGUID = id; // expando - instances[ id ] = this; // associate via id - - // kick it off - this._create(); - - var isInitLayout = this._getOption('initLayout'); - if ( isInitLayout ) { - this.layout(); - } -} - -// settings are for internal use only -Outlayer.namespace = 'outlayer'; -Outlayer.Item = Item; - -// default options -Outlayer.defaults = { - containerStyle: { - position: 'relative' - }, - initLayout: true, - originLeft: true, - originTop: true, - resize: true, - resizeContainer: true, - // item options - transitionDuration: '0.4s', - hiddenStyle: { - opacity: 0, - transform: 'scale(0.001)' - }, - visibleStyle: { - opacity: 1, - transform: 'scale(1)' - } -}; - -var proto = Outlayer.prototype; -// inherit EvEmitter -utils.extend( proto, EvEmitter.prototype ); - -/** - * set options - * @param {Object} opts - */ -proto.option = function( opts ) { - utils.extend( this.options, opts ); -}; - -/** - * get backwards compatible option value, check old name - */ -proto._getOption = function( option ) { - var oldOption = this.constructor.compatOptions[ option ]; - return oldOption && this.options[ oldOption ] !== undefined ? - this.options[ oldOption ] : this.options[ option ]; -}; - -Outlayer.compatOptions = { - // currentName: oldName - initLayout: 'isInitLayout', - horizontal: 'isHorizontal', - layoutInstant: 'isLayoutInstant', - originLeft: 'isOriginLeft', - originTop: 'isOriginTop', - resize: 'isResizeBound', - resizeContainer: 'isResizingContainer' -}; - -proto._create = function() { - // get items from children - this.reloadItems(); - // elements that affect layout, but are not laid out - this.stamps = []; - this.stamp( this.options.stamp ); - // set container style - utils.extend( this.element.style, this.options.containerStyle ); - - // bind resize method - var canBindResize = this._getOption('resize'); - if ( canBindResize ) { - this.bindResize(); - } -}; - -// goes through all children again and gets bricks in proper order -proto.reloadItems = function() { - // collection of item elements - this.items = this._itemize( this.element.children ); -}; - - -/** - * turn elements into Outlayer.Items to be used in layout - * @param {Array or NodeList or HTMLElement} elems - * @returns {Array} items - collection of new Outlayer Items - */ -proto._itemize = function( elems ) { - - var itemElems = this._filterFindItemElements( elems ); - var Item = this.constructor.Item; - - // create new Outlayer Items for collection - var items = []; - for ( var i=0; i < itemElems.length; i++ ) { - var elem = itemElems[i]; - var item = new Item( elem, this ); - items.push( item ); - } - - return items; -}; - -/** - * get item elements to be used in layout - * @param {Array or NodeList or HTMLElement} elems - * @returns {Array} items - item elements - */ -proto._filterFindItemElements = function( elems ) { - return utils.filterFindElements( elems, this.options.itemSelector ); -}; - -/** - * getter method for getting item elements - * @returns {Array} elems - collection of item elements - */ -proto.getItemElements = function() { - return this.items.map( function( item ) { - return item.element; - }); -}; - -// ----- init & layout ----- // - -/** - * lays out all items - */ -proto.layout = function() { - this._resetLayout(); - this._manageStamps(); - - // don't animate first layout - var layoutInstant = this._getOption('layoutInstant'); - var isInstant = layoutInstant !== undefined ? - layoutInstant : !this._isLayoutInited; - this.layoutItems( this.items, isInstant ); - - // flag for initalized - this._isLayoutInited = true; -}; - -// _init is alias for layout -proto._init = proto.layout; - -/** - * logic before any new layout - */ -proto._resetLayout = function() { - this.getSize(); -}; - - -proto.getSize = function() { - this.size = getSize( this.element ); -}; - -/** - * get measurement from option, for columnWidth, rowHeight, gutter - * if option is String -> get element from selector string, & get size of element - * if option is Element -> get size of element - * else use option as a number - * - * @param {String} measurement - * @param {String} size - width or height - * @private - */ -proto._getMeasurement = function( measurement, size ) { - var option = this.options[ measurement ]; - var elem; - if ( !option ) { - // default to 0 - this[ measurement ] = 0; - } else { - // use option as an element - if ( typeof option == 'string' ) { - elem = this.element.querySelector( option ); - } else if ( option instanceof HTMLElement ) { - elem = option; - } - // use size of element, if element - this[ measurement ] = elem ? getSize( elem )[ size ] : option; - } -}; - -/** - * layout a collection of item elements - * @api public - */ -proto.layoutItems = function( items, isInstant ) { - items = this._getItemsForLayout( items ); - - this._layoutItems( items, isInstant ); - - this._postLayout(); -}; - -/** - * get the items to be laid out - * you may want to skip over some items - * @param {Array} items - * @returns {Array} items - */ -proto._getItemsForLayout = function( items ) { - return items.filter( function( item ) { - return !item.isIgnored; - }); -}; - -/** - * layout items - * @param {Array} items - * @param {Boolean} isInstant - */ -proto._layoutItems = function( items, isInstant ) { - this._emitCompleteOnItems( 'layout', items ); - - if ( !items || !items.length ) { - // no items, emit event with empty array - return; - } - - var queue = []; - - items.forEach( function( item ) { - // get x/y object from method - var position = this._getItemLayoutPosition( item ); - // enqueue - position.item = item; - position.isInstant = isInstant || item.isLayoutInstant; - queue.push( position ); - }, this ); - - this._processLayoutQueue( queue ); -}; - -/** - * get item layout position - * @param {Outlayer.Item} item - * @returns {Object} x and y position - */ -proto._getItemLayoutPosition = function( /* item */ ) { - return { - x: 0, - y: 0 - }; -}; - -/** - * iterate over array and position each item - * Reason being - separating this logic prevents 'layout invalidation' - * thx @paul_irish - * @param {Array} queue - */ -proto._processLayoutQueue = function( queue ) { - this.updateStagger(); - queue.forEach( function( obj, i ) { - this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i ); - }, this ); -}; - -// set stagger from option in milliseconds number -proto.updateStagger = function() { - var stagger = this.options.stagger; - if ( stagger === null || stagger === undefined ) { - this.stagger = 0; - return; - } - this.stagger = getMilliseconds( stagger ); - return this.stagger; -}; - -/** - * Sets position of item in DOM - * @param {Outlayer.Item} item - * @param {Number} x - horizontal position - * @param {Number} y - vertical position - * @param {Boolean} isInstant - disables transitions - */ -proto._positionItem = function( item, x, y, isInstant, i ) { - if ( isInstant ) { - // if not transition, just set CSS - item.goTo( x, y ); - } else { - item.stagger( i * this.stagger ); - item.moveTo( x, y ); - } -}; - -/** - * Any logic you want to do after each layout, - * i.e. size the container - */ -proto._postLayout = function() { - this.resizeContainer(); -}; - -proto.resizeContainer = function() { - var isResizingContainer = this._getOption('resizeContainer'); - if ( !isResizingContainer ) { - return; - } - var size = this._getContainerSize(); - if ( size ) { - this._setContainerMeasure( size.width, true ); - this._setContainerMeasure( size.height, false ); - } -}; - -/** - * Sets width or height of container if returned - * @returns {Object} size - * @param {Number} width - * @param {Number} height - */ -proto._getContainerSize = noop; - -/** - * @param {Number} measure - size of width or height - * @param {Boolean} isWidth - */ -proto._setContainerMeasure = function( measure, isWidth ) { - if ( measure === undefined ) { - return; - } - - var elemSize = this.size; - // add padding and border width if border box - if ( elemSize.isBorderBox ) { - measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight + - elemSize.borderLeftWidth + elemSize.borderRightWidth : - elemSize.paddingBottom + elemSize.paddingTop + - elemSize.borderTopWidth + elemSize.borderBottomWidth; - } - - measure = Math.max( measure, 0 ); - this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px'; -}; - -/** - * emit eventComplete on a collection of items events - * @param {String} eventName - * @param {Array} items - Outlayer.Items - */ -proto._emitCompleteOnItems = function( eventName, items ) { - var _this = this; - function onComplete() { - _this.dispatchEvent( eventName + 'Complete', null, [ items ] ); - } - - var count = items.length; - if ( !items || !count ) { - onComplete(); - return; - } - - var doneCount = 0; - function tick() { - doneCount++; - if ( doneCount == count ) { - onComplete(); - } - } - - // bind callback - items.forEach( function( item ) { - item.once( eventName, tick ); - }); -}; - -/** - * emits events via EvEmitter and jQuery events - * @param {String} type - name of event - * @param {Event} event - original event - * @param {Array} args - extra arguments - */ -proto.dispatchEvent = function( type, event, args ) { - // add original event to arguments - var emitArgs = event ? [ event ].concat( args ) : args; - this.emitEvent( type, emitArgs ); - - if ( jQuery ) { - // set this.$element - this.$element = this.$element || jQuery( this.element ); - if ( event ) { - // create jQuery event - var $event = jQuery.Event( event ); - $event.type = type; - this.$element.trigger( $event, args ); - } else { - // just trigger with type if no event available - this.$element.trigger( type, args ); - } - } -}; - -// -------------------------- ignore & stamps -------------------------- // - - -/** - * keep item in collection, but do not lay it out - * ignored items do not get skipped in layout - * @param {Element} elem - */ -proto.ignore = function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - item.isIgnored = true; - } -}; - -/** - * return item to layout collection - * @param {Element} elem - */ -proto.unignore = function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - delete item.isIgnored; - } -}; - -/** - * adds elements to stamps - * @param {NodeList, Array, Element, or String} elems - */ -proto.stamp = function( elems ) { - elems = this._find( elems ); - if ( !elems ) { - return; - } - - this.stamps = this.stamps.concat( elems ); - // ignore - elems.forEach( this.ignore, this ); -}; - -/** - * removes elements to stamps - * @param {NodeList, Array, or Element} elems - */ -proto.unstamp = function( elems ) { - elems = this._find( elems ); - if ( !elems ){ - return; - } - - elems.forEach( function( elem ) { - // filter out removed stamp elements - utils.removeFrom( this.stamps, elem ); - this.unignore( elem ); - }, this ); -}; - -/** - * finds child elements - * @param {NodeList, Array, Element, or String} elems - * @returns {Array} elems - */ -proto._find = function( elems ) { - if ( !elems ) { - return; - } - // if string, use argument as selector string - if ( typeof elems == 'string' ) { - elems = this.element.querySelectorAll( elems ); - } - elems = utils.makeArray( elems ); - return elems; -}; - -proto._manageStamps = function() { - if ( !this.stamps || !this.stamps.length ) { - return; - } - - this._getBoundingRect(); - - this.stamps.forEach( this._manageStamp, this ); -}; - -// update boundingLeft / Top -proto._getBoundingRect = function() { - // get bounding rect for container element - var boundingRect = this.element.getBoundingClientRect(); - var size = this.size; - this._boundingRect = { - left: boundingRect.left + size.paddingLeft + size.borderLeftWidth, - top: boundingRect.top + size.paddingTop + size.borderTopWidth, - right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ), - bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth ) - }; -}; - -/** - * @param {Element} stamp -**/ -proto._manageStamp = noop; - -/** - * get x/y position of element relative to container element - * @param {Element} elem - * @returns {Object} offset - has left, top, right, bottom - */ -proto._getElementOffset = function( elem ) { - var boundingRect = elem.getBoundingClientRect(); - var thisRect = this._boundingRect; - var size = getSize( elem ); - var offset = { - left: boundingRect.left - thisRect.left - size.marginLeft, - top: boundingRect.top - thisRect.top - size.marginTop, - right: thisRect.right - boundingRect.right - size.marginRight, - bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom - }; - return offset; -}; - -// -------------------------- resize -------------------------- // - -// enable event handlers for listeners -// i.e. resize -> onresize -proto.handleEvent = utils.handleEvent; - -/** - * Bind layout to window resizing - */ -proto.bindResize = function() { - window.addEventListener( 'resize', this ); - this.isResizeBound = true; -}; - -/** - * Unbind layout to window resizing - */ -proto.unbindResize = function() { - window.removeEventListener( 'resize', this ); - this.isResizeBound = false; -}; - -proto.onresize = function() { - this.resize(); -}; - -utils.debounceMethod( Outlayer, 'onresize', 100 ); - -proto.resize = function() { - // don't trigger if size did not change - // or if resize was unbound. See #9 - if ( !this.isResizeBound || !this.needsResizeLayout() ) { - return; - } - - this.layout(); -}; - -/** - * check if layout is needed post layout - * @returns Boolean - */ -proto.needsResizeLayout = function() { - var size = getSize( this.element ); - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var hasSizes = this.size && size; - return hasSizes && size.innerWidth !== this.size.innerWidth; -}; - -// -------------------------- methods -------------------------- // - -/** - * add items to Outlayer instance - * @param {Array or NodeList or Element} elems - * @returns {Array} items - Outlayer.Items -**/ -proto.addItems = function( elems ) { - var items = this._itemize( elems ); - // add items to collection - if ( items.length ) { - this.items = this.items.concat( items ); - } - return items; -}; - -/** - * Layout newly-appended item elements - * @param {Array or NodeList or Element} elems - */ -proto.appended = function( elems ) { - var items = this.addItems( elems ); - if ( !items.length ) { - return; - } - // layout and reveal just the new items - this.layoutItems( items, true ); - this.reveal( items ); -}; - -/** - * Layout prepended elements - * @param {Array or NodeList or Element} elems - */ -proto.prepended = function( elems ) { - var items = this._itemize( elems ); - if ( !items.length ) { - return; - } - // add items to beginning of collection - var previousItems = this.items.slice(0); - this.items = items.concat( previousItems ); - // start new layout - this._resetLayout(); - this._manageStamps(); - // layout new stuff without transition - this.layoutItems( items, true ); - this.reveal( items ); - // layout previous items - this.layoutItems( previousItems ); -}; - -/** - * reveal a collection of items - * @param {Array of Outlayer.Items} items - */ -proto.reveal = function( items ) { - this._emitCompleteOnItems( 'reveal', items ); - if ( !items || !items.length ) { - return; - } - var stagger = this.updateStagger(); - items.forEach( function( item, i ) { - item.stagger( i * stagger ); - item.reveal(); - }); -}; - -/** - * hide a collection of items - * @param {Array of Outlayer.Items} items - */ -proto.hide = function( items ) { - this._emitCompleteOnItems( 'hide', items ); - if ( !items || !items.length ) { - return; - } - var stagger = this.updateStagger(); - items.forEach( function( item, i ) { - item.stagger( i * stagger ); - item.hide(); - }); -}; - -/** - * reveal item elements - * @param {Array}, {Element}, {NodeList} items - */ -proto.revealItemElements = function( elems ) { - var items = this.getItems( elems ); - this.reveal( items ); -}; - -/** - * hide item elements - * @param {Array}, {Element}, {NodeList} items - */ -proto.hideItemElements = function( elems ) { - var items = this.getItems( elems ); - this.hide( items ); -}; - -/** - * get Outlayer.Item, given an Element - * @param {Element} elem - * @param {Function} callback - * @returns {Outlayer.Item} item - */ -proto.getItem = function( elem ) { - // loop through items to get the one that matches - for ( var i=0; i < this.items.length; i++ ) { - var item = this.items[i]; - if ( item.element == elem ) { - // return item - return item; - } - } -}; - -/** - * get collection of Outlayer.Items, given Elements - * @param {Array} elems - * @returns {Array} items - Outlayer.Items - */ -proto.getItems = function( elems ) { - elems = utils.makeArray( elems ); - var items = []; - elems.forEach( function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - items.push( item ); - } - }, this ); - - return items; -}; - -/** - * remove element(s) from instance and DOM - * @param {Array or NodeList or Element} elems - */ -proto.remove = function( elems ) { - var removeItems = this.getItems( elems ); - - this._emitCompleteOnItems( 'remove', removeItems ); - - // bail if no items to remove - if ( !removeItems || !removeItems.length ) { - return; - } - - removeItems.forEach( function( item ) { - item.remove(); - // remove item from collection - utils.removeFrom( this.items, item ); - }, this ); -}; - -// ----- destroy ----- // - -// remove and disable Outlayer instance -proto.destroy = function() { - // clean up dynamic styles - var style = this.element.style; - style.height = ''; - style.position = ''; - style.width = ''; - // destroy items - this.items.forEach( function( item ) { - item.destroy(); - }); - - this.unbindResize(); - - var id = this.element.outlayerGUID; - delete instances[ id ]; // remove reference to instance by id - delete this.element.outlayerGUID; - // remove data for jQuery - if ( jQuery ) { - jQuery.removeData( this.element, this.constructor.namespace ); - } - -}; - -// -------------------------- data -------------------------- // - -/** - * get Outlayer instance from element - * @param {Element} elem - * @returns {Outlayer} - */ -Outlayer.data = function( elem ) { - elem = utils.getQueryElement( elem ); - var id = elem && elem.outlayerGUID; - return id && instances[ id ]; -}; - - -// -------------------------- create Outlayer class -------------------------- // - -/** - * create a layout class - * @param {String} namespace - */ -Outlayer.create = function( namespace, options ) { - // sub-class Outlayer - var Layout = subclass( Outlayer ); - // apply new options and compatOptions - Layout.defaults = utils.extend( {}, Outlayer.defaults ); - utils.extend( Layout.defaults, options ); - Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions ); - - Layout.namespace = namespace; - - Layout.data = Outlayer.data; - - // sub-class Item - Layout.Item = subclass( Item ); - - // -------------------------- declarative -------------------------- // - - utils.htmlInit( Layout, namespace ); - - // -------------------------- jQuery bridge -------------------------- // - - // make into jQuery plugin - if ( jQuery && jQuery.bridget ) { - jQuery.bridget( namespace, Layout ); - } - - return Layout; -}; - -function subclass( Parent ) { - function SubClass() { - Parent.apply( this, arguments ); - } - - SubClass.prototype = Object.create( Parent.prototype ); - SubClass.prototype.constructor = SubClass; - - return SubClass; -} - -// ----- helpers ----- // - -// how many milliseconds are in each unit -var msUnits = { - ms: 1, - s: 1000 -}; - -// munge time-like parameter into millisecond number -// '0.4s' -> 40 -function getMilliseconds( time ) { - if ( typeof time == 'number' ) { - return time; - } - var matches = time.match( /(^\d*\.?\d*)(\w*)/ ); - var num = matches && matches[1]; - var unit = matches && matches[2]; - if ( !num.length ) { - return 0; - } - num = parseFloat( num ); - var mult = msUnits[ unit ] || 1; - return num * mult; -} - -// ----- fin ----- // - -// back in global -Outlayer.Item = Item; - -return Outlayer; - -})); - - -/***/ }), - -/***/ "./src/img/logos/giphy-powered.png": -/*!*****************************************!*\ - !*** ./src/img/logos/giphy-powered.png ***! - \*****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -module.exports = __webpack_require__.p + "images/giphy-powered.9748c37d.png"; - -/***/ }), - -/***/ "react": -/*!************************!*\ - !*** external "React" ***! - \************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["React"]; - -/***/ }), - -/***/ "@wordpress/blocks": -/*!********************************!*\ - !*** external ["wp","blocks"] ***! - \********************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["blocks"]; - -/***/ }), - -/***/ "@wordpress/data": -/*!******************************!*\ - !*** external ["wp","data"] ***! - \******************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["data"]; - -/***/ }), - -/***/ "@wordpress/element": -/*!*********************************!*\ - !*** external ["wp","element"] ***! - \*********************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["element"]; - -/***/ }), - -/***/ "@wordpress/i18n": -/*!******************************!*\ - !*** external ["wp","i18n"] ***! - \******************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["i18n"]; - -/***/ }), - -/***/ "?9157": -/*!************************!*\ - !*** crypto (ignored) ***! - \************************/ -/***/ (() => { - -/* (ignored) */ - -/***/ }), - -/***/ "./node_modules/classnames/index.js": -/*!******************************************!*\ - !*** ./node_modules/classnames/index.js ***! - \******************************************/ -/***/ ((module, exports) => { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/* global define */ - -(function () { - 'use strict'; - - var hasOwn = {}.hasOwnProperty; - - function classNames () { - var classes = ''; - - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - if (arg) { - classes = appendClass(classes, parseValue(arg)); - } - } - - return classes; - } - - function parseValue (arg) { - if (typeof arg === 'string' || typeof arg === 'number') { - return arg; - } - - if (typeof arg !== 'object') { - return ''; - } - - if (Array.isArray(arg)) { - return classNames.apply(null, arg); - } - - if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { - return arg.toString(); - } - - var classes = ''; - - for (var key in arg) { - if (hasOwn.call(arg, key) && arg[key]) { - classes = appendClass(classes, key); - } - } - - return classes; - } - - function appendClass (value, newClass) { - if (!newClass) { - return value; - } - - if (value) { - return value + ' ' + newClass; - } - - return value + newClass; - } - - if ( true && module.exports) { - classNames.default = classNames; - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return classNames; - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}()); - - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/adapters.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/adapters/adapters.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _http_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./http.js */ "./node_modules/axios/lib/helpers/null.js"); -/* harmony import */ var _xhr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./xhr.js */ "./node_modules/axios/lib/adapters/xhr.js"); -/* harmony import */ var _fetch_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fetch.js */ "./node_modules/axios/lib/adapters/fetch.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - - - - - - -const knownAdapters = { - http: _http_js__WEBPACK_IMPORTED_MODULE_0__["default"], - xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_1__["default"], - fetch: _fetch_js__WEBPACK_IMPORTED_MODULE_2__["default"] -} - -_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(knownAdapters, (fn, value) => { - if (fn) { - try { - Object.defineProperty(fn, 'name', {value}); - } catch (e) { - // eslint-disable-next-line no-empty - } - Object.defineProperty(fn, 'adapterName', {value}); - } -}); - -const renderReason = (reason) => `- ${reason}`; - -const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(adapter) || adapter === null || adapter === false; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - getAdapter: (adapters) => { - adapters = _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isArray(adapters) ? adapters : [adapters]; - - const {length} = adapters; - let nameOrAdapter; - let adapter; - - const rejectedReasons = {}; - - for (let i = 0; i < length; i++) { - nameOrAdapter = adapters[i]; - let id; - - adapter = nameOrAdapter; - - if (!isResolvedHandle(nameOrAdapter)) { - adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; - - if (adapter === undefined) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"](`Unknown adapter '${id}'`); - } - } - - if (adapter) { - break; - } - - rejectedReasons[id || '#' + i] = adapter; - } - - if (!adapter) { - - const reasons = Object.entries(rejectedReasons) - .map(([id, state]) => `adapter ${id} ` + - (state === false ? 'is not supported by the environment' : 'is not available in the build') - ); - - let s = length ? - (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : - 'as no adapter specified'; - - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"]( - `There is no suitable adapter to dispatch the request ` + s, - 'ERR_NOT_SUPPORT' - ); - } - - return adapter; - }, - adapters: knownAdapters -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/fetch.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/adapters/fetch.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/composeSignals.js */ "./node_modules/axios/lib/helpers/composeSignals.js"); -/* harmony import */ var _helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/trackStream.js */ "./node_modules/axios/lib/helpers/trackStream.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../helpers/progressEventReducer.js */ "./node_modules/axios/lib/helpers/progressEventReducer.js"); -/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/resolveConfig.js */ "./node_modules/axios/lib/helpers/resolveConfig.js"); -/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/settle.js */ "./node_modules/axios/lib/core/settle.js"); - - - - - - - - - - -const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function'; -const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function'; - -// used only inside the fetch adapter -const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? - ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : - async (str) => new Uint8Array(await new Response(str).arrayBuffer()) -); - -const test = (fn, ...args) => { - try { - return !!fn(...args); - } catch (e) { - return false - } -} - -const supportsRequestStream = isReadableStreamSupported && test(() => { - let duplexAccessed = false; - - const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, { - body: new ReadableStream(), - method: 'POST', - get duplex() { - duplexAccessed = true; - return 'half'; - }, - }).headers.has('Content-Type'); - - return duplexAccessed && !hasContentType; -}); - -const DEFAULT_CHUNK_SIZE = 64 * 1024; - -const supportsResponseStream = isReadableStreamSupported && - test(() => _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReadableStream(new Response('').body)); - - -const resolvers = { - stream: supportsResponseStream && ((res) => res.body) -}; - -isFetchSupported && (((res) => { - ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => { - !resolvers[type] && (resolvers[type] = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(res[type]) ? (res) => res[type]() : - (_, config) => { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](`Response type '${type}' is not supported`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT, config); - }) - }); -})(new Response)); - -const getBodyLength = async (body) => { - if (body == null) { - return 0; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isBlob(body)) { - return body.size; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isSpecCompliantForm(body)) { - const _request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, { - method: 'POST', - body, - }); - return (await _request.arrayBuffer()).byteLength; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBufferView(body) || _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBuffer(body)) { - return body.byteLength; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isURLSearchParams(body)) { - body = body + ''; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(body)) { - return (await encodeText(body)).byteLength; - } -} - -const resolveBodyLength = async (headers, body) => { - const length = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(headers.getContentLength()); - - return length == null ? getBodyLength(body) : length; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isFetchSupported && (async (config) => { - let { - url, - method, - data, - signal, - cancelToken, - timeout, - onDownloadProgress, - onUploadProgress, - responseType, - headers, - withCredentials = 'same-origin', - fetchOptions - } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(config); - - responseType = responseType ? (responseType + '').toLowerCase() : 'text'; - - let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__["default"])([signal, cancelToken && cancelToken.toAbortSignal()], timeout); - - let request; - - const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { - composedSignal.unsubscribe(); - }); - - let requestContentLength; - - try { - if ( - onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' && - (requestContentLength = await resolveBodyLength(headers, data)) !== 0 - ) { - let _request = new Request(url, { - method: 'POST', - body: data, - duplex: "half" - }); - - let contentTypeHeader; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { - headers.setContentType(contentTypeHeader) - } - - if (_request.body) { - const [onProgress, flush] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)( - requestContentLength, - (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onUploadProgress)) - ); - - data = (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); - } - } - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(withCredentials)) { - withCredentials = withCredentials ? 'include' : 'omit'; - } - - // Cloudflare Workers throws when credentials are defined - // see https://github.com/cloudflare/workerd/issues/902 - const isCredentialsSupported = "credentials" in Request.prototype; - request = new Request(url, { - ...fetchOptions, - signal: composedSignal, - method: method.toUpperCase(), - headers: headers.normalize().toJSON(), - body: data, - duplex: "half", - credentials: isCredentialsSupported ? withCredentials : undefined - }); - - let response = await fetch(request); - - const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); - - if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) { - const options = {}; - - ['status', 'statusText', 'headers'].forEach(prop => { - options[prop] = response[prop]; - }); - - const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length')); - - const [onProgress, flush] = onDownloadProgress && (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)( - responseContentLength, - (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onDownloadProgress), true) - ) || []; - - response = new Response( - (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { - flush && flush(); - unsubscribe && unsubscribe(); - }), - options - ); - } - - responseType = responseType || 'text'; - - let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].findKey(resolvers, responseType) || 'text'](response, config); - - !isStreamResponse && unsubscribe && unsubscribe(); - - return await new Promise((resolve, reject) => { - (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_7__["default"])(resolve, reject, { - data: responseData, - headers: _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].from(response.headers), - status: response.status, - statusText: response.statusText, - config, - request - }) - }) - } catch (err) { - unsubscribe && unsubscribe(); - - if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) { - throw Object.assign( - new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NETWORK, config, request), - { - cause: err.cause || err - } - ) - } - - throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(err, err && err.code, config, request); - } -})); - - - - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/xhr.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/adapters/xhr.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../core/settle.js */ "./node_modules/axios/lib/core/settle.js"); -/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaults/transitional.js */ "./node_modules/axios/lib/defaults/transitional.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../helpers/parseProtocol.js */ "./node_modules/axios/lib/helpers/parseProtocol.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/progressEventReducer.js */ "./node_modules/axios/lib/helpers/progressEventReducer.js"); -/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/resolveConfig.js */ "./node_modules/axios/lib/helpers/resolveConfig.js"); - - - - - - - - - - - -const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported && function (config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_0__["default"])(config); - let requestData = _config.data; - const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(_config.headers).normalize(); - let {responseType, onUploadProgress, onDownloadProgress} = _config; - let onCanceled; - let uploadThrottled, downloadThrottled; - let flushUpload, flushDownload; - - function done() { - flushUpload && flushUpload(); // flush events - flushDownload && flushDownload(); // flush events - - _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); - - _config.signal && _config.signal.removeEventListener('abort', onCanceled); - } - - let request = new XMLHttpRequest(); - - request.open(_config.method.toUpperCase(), _config.url, true); - - // Set the request timeout in MS - request.timeout = _config.timeout; - - function onloadend() { - if (!request) { - return; - } - // Prepare the response - const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from( - 'getAllResponseHeaders' in request && request.getAllResponseHeaders() - ); - const responseData = !responseType || responseType === 'text' || responseType === 'json' ? - request.responseText : request.response; - const response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config, - request - }; - - (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(function _resolve(value) { - resolve(value); - done(); - }, function _reject(err) { - reject(err); - done(); - }, response); - - // Clean up request - request = null; - } - - if ('onloadend' in request) { - // Use onloadend if available - request.onloadend = onloadend; - } else { - // Listen for ready state to emulate onloadend - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - // readystate handler is calling before onerror or ontimeout handlers, - // so we should call onloadend on the next 'tick' - setTimeout(onloadend); - }; - } - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, config, request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_NETWORK, config, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; - const transitional = _config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_4__["default"]; - if (_config.timeoutErrorMessage) { - timeoutErrorMessage = _config.timeoutErrorMessage; - } - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]( - timeoutErrorMessage, - transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, - config, - request)); - - // Clean up request - request = null; - }; - - // Remove Content-Type if data is undefined - requestData === undefined && requestHeaders.setContentType(null); - - // Add headers to the request - if ('setRequestHeader' in request) { - _utils_js__WEBPACK_IMPORTED_MODULE_5__["default"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { - request.setRequestHeader(key, val); - }); - } - - // Add withCredentials to request if needed - if (!_utils_js__WEBPACK_IMPORTED_MODULE_5__["default"].isUndefined(_config.withCredentials)) { - request.withCredentials = !!_config.withCredentials; - } - - // Add responseType to request if needed - if (responseType && responseType !== 'json') { - request.responseType = _config.responseType; - } - - // Handle progress if needed - if (onDownloadProgress) { - ([downloadThrottled, flushDownload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)(onDownloadProgress, true)); - request.addEventListener('progress', downloadThrottled); - } - - // Not all browsers support upload events - if (onUploadProgress && request.upload) { - ([uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)(onUploadProgress)); - - request.upload.addEventListener('progress', uploadThrottled); - - request.upload.addEventListener('loadend', flushUpload); - } - - if (_config.cancelToken || _config.signal) { - // Handle cancellation - // eslint-disable-next-line func-names - onCanceled = cancel => { - if (!request) { - return; - } - reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_7__["default"](null, config, request) : cancel); - request.abort(); - request = null; - }; - - _config.cancelToken && _config.cancelToken.subscribe(onCanceled); - if (_config.signal) { - _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); - } - } - - const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_config.url); - - if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_9__["default"].protocols.indexOf(protocol) === -1) { - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Unsupported protocol ' + protocol + ':', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_BAD_REQUEST, config)); - return; - } - - - // Send the request - request.send(requestData || null); - }); -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/axios.js": -/*!*****************************************!*\ - !*** ./node_modules/axios/lib/axios.js ***! - \*****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js"); -/* harmony import */ var _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/Axios.js */ "./node_modules/axios/lib/core/Axios.js"); -/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); -/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); -/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js"); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cancel/CancelToken.js */ "./node_modules/axios/lib/cancel/CancelToken.js"); -/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js"); -/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./env/data.js */ "./node_modules/axios/lib/env/data.js"); -/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/spread.js */ "./node_modules/axios/lib/helpers/spread.js"); -/* harmony import */ var _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/isAxiosError.js */ "./node_modules/axios/lib/helpers/isAxiosError.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js"); -/* harmony import */ var _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers/HttpStatusCode.js */ "./node_modules/axios/lib/helpers/HttpStatusCode.js"); - - - - - - - - - - - - - - - - - - - - -/** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * - * @returns {Axios} A new instance of Axios - */ -function createInstance(defaultConfig) { - const context = new _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"](defaultConfig); - const instance = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.request, context); - - // Copy axios.prototype to instance - _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype, context, {allOwnKeys: true}); - - // Copy context to instance - _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, context, null, {allOwnKeys: true}); - - // Factory for creating new instances - instance.create = function create(instanceConfig) { - return createInstance((0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(defaultConfig, instanceConfig)); - }; - - return instance; -} - -// Create the default instance to be exported -const axios = createInstance(_defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"]); - -// Expose Axios class to allow class inheritance -axios.Axios = _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"]; - -// Expose Cancel & CancelToken -axios.CanceledError = _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__["default"]; -axios.CancelToken = _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__["default"]; -axios.isCancel = _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__["default"]; -axios.VERSION = _env_data_js__WEBPACK_IMPORTED_MODULE_8__.VERSION; -axios.toFormData = _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__["default"]; - -// Expose AxiosError class -axios.AxiosError = _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__["default"]; - -// alias for CanceledError for backward compatibility -axios.Cancel = axios.CanceledError; - -// Expose all/spread -axios.all = function all(promises) { - return Promise.all(promises); -}; - -axios.spread = _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__["default"]; - -// Expose isAxiosError -axios.isAxiosError = _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__["default"]; - -// Expose mergeConfig -axios.mergeConfig = _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"]; - -axios.AxiosHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__["default"]; - -axios.formToJSON = thing => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isHTMLForm(thing) ? new FormData(thing) : thing); - -axios.getAdapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__["default"].getAdapter; - -axios.HttpStatusCode = _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__["default"]; - -axios.default = axios; - -// this module should only have a default export -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (axios); - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/CancelToken.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/cancel/CancelToken.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); - - - - -/** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @param {Function} executor The executor function. - * - * @returns {CancelToken} - */ -class CancelToken { - constructor(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - let resolvePromise; - - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - const token = this; - - // eslint-disable-next-line func-names - this.promise.then(cancel => { - if (!token._listeners) return; - - let i = token._listeners.length; - - while (i-- > 0) { - token._listeners[i](cancel); - } - token._listeners = null; - }); - - // eslint-disable-next-line func-names - this.promise.then = onfulfilled => { - let _resolve; - // eslint-disable-next-line func-names - const promise = new Promise(resolve => { - token.subscribe(resolve); - _resolve = resolve; - }).then(onfulfilled); - - promise.cancel = function reject() { - token.unsubscribe(_resolve); - }; - - return promise; - }; - - executor(function cancel(message, config, request) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](message, config, request); - resolvePromise(token.reason); - }); - } - - /** - * Throws a `CanceledError` if cancellation has been requested. - */ - throwIfRequested() { - if (this.reason) { - throw this.reason; - } - } - - /** - * Subscribe to the cancel signal - */ - - subscribe(listener) { - if (this.reason) { - listener(this.reason); - return; - } - - if (this._listeners) { - this._listeners.push(listener); - } else { - this._listeners = [listener]; - } - } - - /** - * Unsubscribe from the cancel signal - */ - - unsubscribe(listener) { - if (!this._listeners) { - return; - } - const index = this._listeners.indexOf(listener); - if (index !== -1) { - this._listeners.splice(index, 1); - } - } - - toAbortSignal() { - const controller = new AbortController(); - - const abort = (err) => { - controller.abort(err); - }; - - this.subscribe(abort); - - controller.signal.unsubscribe = () => this.unsubscribe(abort); - - return controller.signal; - } - - /** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ - static source() { - let cancel; - const token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token, - cancel - }; - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CancelToken); - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/CanceledError.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/cancel/CanceledError.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - - -/** - * A `CanceledError` is an object that is thrown when an operation is canceled. - * - * @param {string=} message The message. - * @param {Object=} config The config. - * @param {Object=} request The request. - * - * @returns {CanceledError} The created error. - */ -function CanceledError(message, config, request) { - // eslint-disable-next-line no-eq-null,eqeqeq - _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, message == null ? 'canceled' : message, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_CANCELED, config, request); - this.name = 'CanceledError'; -} - -_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].inherits(CanceledError, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"], { - __CANCEL__: true -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CanceledError); - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/isCancel.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/cancel/isCancel.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ isCancel) -/* harmony export */ }); - - -function isCancel(value) { - return !!(value && value.__CANCEL__); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/Axios.js": -/*!**********************************************!*\ - !*** ./node_modules/axios/lib/core/Axios.js ***! - \**********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js"); -/* harmony import */ var _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InterceptorManager.js */ "./node_modules/axios/lib/core/InterceptorManager.js"); -/* harmony import */ var _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dispatchRequest.js */ "./node_modules/axios/lib/core/dispatchRequest.js"); -/* harmony import */ var _mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); -/* harmony import */ var _buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js"); -/* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/validator.js */ "./node_modules/axios/lib/helpers/validator.js"); -/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - - - - - - - - - - - -const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].validators; - -/** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - * - * @return {Axios} A new instance of Axios - */ -class Axios { - constructor(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"](), - response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"]() - }; - } - - /** - * Dispatch a request - * - * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) - * @param {?Object} config - * - * @returns {Promise} The Promise to be fulfilled - */ - async request(configOrUrl, config) { - try { - return await this._request(configOrUrl, config); - } catch (err) { - if (err instanceof Error) { - let dummy; - - Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error()); - - // slice off the Error: ... line - const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; - try { - if (!err.stack) { - err.stack = stack; - // match without the 2 top stack lines - } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) { - err.stack += '\n' + stack - } - } catch (e) { - // ignore the case where "stack" is an un-writable property - } - } - - throw err; - } - } - - _request(configOrUrl, config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof configOrUrl === 'string') { - config = config || {}; - config.url = configOrUrl; - } else { - config = configOrUrl || {}; - } - - config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config); - - const {transitional, paramsSerializer, headers} = config; - - if (transitional !== undefined) { - _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(transitional, { - silentJSONParsing: validators.transitional(validators.boolean), - forcedJSONParsing: validators.transitional(validators.boolean), - clarifyTimeoutError: validators.transitional(validators.boolean) - }, false); - } - - if (paramsSerializer != null) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(paramsSerializer)) { - config.paramsSerializer = { - serialize: paramsSerializer - } - } else { - _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(paramsSerializer, { - encode: validators.function, - serialize: validators.function - }, true); - } - } - - // Set config.method - config.method = (config.method || this.defaults.method || 'get').toLowerCase(); - - // Flatten headers - let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].merge( - headers.common, - headers[config.method] - ); - - headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - (method) => { - delete headers[method]; - } - ); - - config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].concat(contextHeaders, headers); - - // filter out skipped interceptors - const requestInterceptorChain = []; - let synchronousRequestInterceptors = true; - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { - return; - } - - synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - const responseInterceptorChain = []; - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); - }); - - let promise; - let i = 0; - let len; - - if (!synchronousRequestInterceptors) { - const chain = [_dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].bind(this), undefined]; - chain.unshift.apply(chain, requestInterceptorChain); - chain.push.apply(chain, responseInterceptorChain); - len = chain.length; - - promise = Promise.resolve(config); - - while (i < len) { - promise = promise.then(chain[i++], chain[i++]); - } - - return promise; - } - - len = requestInterceptorChain.length; - - let newConfig = config; - - i = 0; - - while (i < len) { - const onFulfilled = requestInterceptorChain[i++]; - const onRejected = requestInterceptorChain[i++]; - try { - newConfig = onFulfilled(newConfig); - } catch (error) { - onRejected.call(this, error); - break; - } - } - - try { - promise = _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].call(this, newConfig); - } catch (error) { - return Promise.reject(error); - } - - i = 0; - len = responseInterceptorChain.length; - - while (i < len) { - promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); - } - - return promise; - } - - getUri(config) { - config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config); - const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__["default"])(config.baseURL, config.url); - return (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(fullPath, config.params, config.paramsSerializer); - } -} - -// Provide aliases for supported request methods -_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, { - method, - url, - data: (config || {}).data - })); - }; -}); - -_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - - function generateHTTPMethod(isForm) { - return function httpMethod(url, data, config) { - return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, { - method, - headers: isForm ? { - 'Content-Type': 'multipart/form-data' - } : {}, - url, - data - })); - }; - } - - Axios.prototype[method] = generateHTTPMethod(); - - Axios.prototype[method + 'Form'] = generateHTTPMethod(true); -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Axios); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/AxiosError.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/core/AxiosError.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [config] The config. - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * - * @returns {Error} The created error. - */ -function AxiosError(message, code, config, request, response) { - Error.call(this); - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = (new Error()).stack; - } - - this.message = message; - this.name = 'AxiosError'; - code && (this.code = code); - config && (this.config = config); - request && (this.request = request); - if (response) { - this.response = response; - this.status = response.status ? response.status : null; - } -} - -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].inherits(AxiosError, Error, { - toJSON: function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(this.config), - code: this.code, - status: this.status - }; - } -}); - -const prototype = AxiosError.prototype; -const descriptors = {}; - -[ - 'ERR_BAD_OPTION_VALUE', - 'ERR_BAD_OPTION', - 'ECONNABORTED', - 'ETIMEDOUT', - 'ERR_NETWORK', - 'ERR_FR_TOO_MANY_REDIRECTS', - 'ERR_DEPRECATED', - 'ERR_BAD_RESPONSE', - 'ERR_BAD_REQUEST', - 'ERR_CANCELED', - 'ERR_NOT_SUPPORT', - 'ERR_INVALID_URL' -// eslint-disable-next-line func-names -].forEach(code => { - descriptors[code] = {value: code}; -}); - -Object.defineProperties(AxiosError, descriptors); -Object.defineProperty(prototype, 'isAxiosError', {value: true}); - -// eslint-disable-next-line func-names -AxiosError.from = (error, code, config, request, response, customProps) => { - const axiosError = Object.create(prototype); - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(error, axiosError, function filter(obj) { - return obj !== Error.prototype; - }, prop => { - return prop !== 'isAxiosError'; - }); - - AxiosError.call(axiosError, error.message, code, config, request, response); - - axiosError.cause = error; - - axiosError.name = error.name; - - customProps && Object.assign(axiosError, customProps); - - return axiosError; -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/AxiosHeaders.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/core/AxiosHeaders.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/parseHeaders.js */ "./node_modules/axios/lib/helpers/parseHeaders.js"); - - - - - -const $internals = Symbol('internals'); - -function normalizeHeader(header) { - return header && String(header).trim().toLowerCase(); -} - -function normalizeValue(value) { - if (value === false || value == null) { - return value; - } - - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : String(value); -} - -function parseTokens(str) { - const tokens = Object.create(null); - const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; - let match; - - while ((match = tokensRE.exec(str))) { - tokens[match[1]] = match[2]; - } - - return tokens; -} - -const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); - -function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(filter)) { - return filter.call(this, value, header); - } - - if (isHeaderNameFilter) { - value = header; - } - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(value)) return; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(filter)) { - return value.indexOf(filter) !== -1; - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(filter)) { - return filter.test(value); - } -} - -function formatHeader(header) { - return header.trim() - .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { - return char.toUpperCase() + str; - }); -} - -function buildAccessors(obj, header) { - const accessorName = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toCamelCase(' ' + header); - - ['get', 'set', 'has'].forEach(methodName => { - Object.defineProperty(obj, methodName + accessorName, { - value: function(arg1, arg2, arg3) { - return this[methodName].call(this, header, arg1, arg2, arg3); - }, - configurable: true - }); - }); -} - -class AxiosHeaders { - constructor(headers) { - headers && this.set(headers); - } - - set(header, valueOrRewrite, rewrite) { - const self = this; - - function setHeader(_value, _header, _rewrite) { - const lHeader = normalizeHeader(_header); - - if (!lHeader) { - throw new Error('header name must be a non-empty string'); - } - - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, lHeader); - - if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { - self[key || _header] = normalizeValue(_value); - } - } - - const setHeaders = (headers, _rewrite) => - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(header) || header instanceof this.constructor) { - setHeaders(header, valueOrRewrite) - } else if(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { - setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"])(header), valueOrRewrite); - } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHeaders(header)) { - for (const [key, value] of header.entries()) { - setHeader(value, key, rewrite); - } - } else { - header != null && setHeader(valueOrRewrite, header, rewrite); - } - - return this; - } - - get(header, parser) { - header = normalizeHeader(header); - - if (header) { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header); - - if (key) { - const value = this[key]; - - if (!parser) { - return value; - } - - if (parser === true) { - return parseTokens(value); - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(parser)) { - return parser.call(this, value, key); - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(parser)) { - return parser.exec(value); - } - - throw new TypeError('parser must be boolean|regexp|function'); - } - } - } - - has(header, matcher) { - header = normalizeHeader(header); - - if (header) { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header); - - return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); - } - - return false; - } - - delete(header, matcher) { - const self = this; - let deleted = false; - - function deleteHeader(_header) { - _header = normalizeHeader(_header); - - if (_header) { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, _header); - - if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { - delete self[key]; - - deleted = true; - } - } - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header)) { - header.forEach(deleteHeader); - } else { - deleteHeader(header); - } - - return deleted; - } - - clear(matcher) { - const keys = Object.keys(this); - let i = keys.length; - let deleted = false; - - while (i--) { - const key = keys[i]; - if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { - delete this[key]; - deleted = true; - } - } - - return deleted; - } - - normalize(format) { - const self = this; - const headers = {}; - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(headers, header); - - if (key) { - self[key] = normalizeValue(value); - delete self[header]; - return; - } - - const normalized = format ? formatHeader(header) : String(header).trim(); - - if (normalized !== header) { - delete self[header]; - } - - self[normalized] = normalizeValue(value); - - headers[normalized] = true; - }); - - return this; - } - - concat(...targets) { - return this.constructor.concat(this, ...targets); - } - - toJSON(asStrings) { - const obj = Object.create(null); - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => { - value != null && value !== false && (obj[header] = asStrings && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.join(', ') : value); - }); - - return obj; - } - - [Symbol.iterator]() { - return Object.entries(this.toJSON())[Symbol.iterator](); - } - - toString() { - return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); - } - - get [Symbol.toStringTag]() { - return 'AxiosHeaders'; - } - - static from(thing) { - return thing instanceof this ? thing : new this(thing); - } - - static concat(first, ...targets) { - const computed = new this(first); - - targets.forEach((target) => computed.set(target)); - - return computed; - } - - static accessor(header) { - const internals = this[$internals] = (this[$internals] = { - accessors: {} - }); - - const accessors = internals.accessors; - const prototype = this.prototype; - - function defineAccessor(_header) { - const lHeader = normalizeHeader(_header); - - if (!accessors[lHeader]) { - buildAccessors(prototype, _header); - accessors[lHeader] = true; - } - } - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); - - return this; - } -} - -AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); - -// reserved names hotfix -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => { - let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` - return { - get: () => value, - set(headerValue) { - this[mapped] = headerValue; - } - } -}); - -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosHeaders); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/InterceptorManager.js": -/*!***********************************************************!*\ - !*** ./node_modules/axios/lib/core/InterceptorManager.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -class InterceptorManager { - constructor() { - this.handlers = []; - } - - /** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ - use(fulfilled, rejected, options) { - this.handlers.push({ - fulfilled, - rejected, - synchronous: options ? options.synchronous : false, - runWhen: options ? options.runWhen : null - }); - return this.handlers.length - 1; - } - - /** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - * - * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise - */ - eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } - } - - /** - * Clear all interceptors from the stack - * - * @returns {void} - */ - clear() { - if (this.handlers) { - this.handlers = []; - } - } - - /** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - * - * @returns {void} - */ - forEach(fn) { - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InterceptorManager); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/buildFullPath.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/core/buildFullPath.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ buildFullPath) -/* harmony export */ }); -/* harmony import */ var _helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/isAbsoluteURL.js */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js"); -/* harmony import */ var _helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/combineURLs.js */ "./node_modules/axios/lib/helpers/combineURLs.js"); - - - - - -/** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * - * @returns {string} The combined full path - */ -function buildFullPath(baseURL, requestedURL) { - if (baseURL && !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL)) { - return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL); - } - return requestedURL; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/dispatchRequest.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/core/dispatchRequest.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ dispatchRequest) -/* harmony export */ }); -/* harmony import */ var _transformData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transformData.js */ "./node_modules/axios/lib/core/transformData.js"); -/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js"); -/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js"); - - - - - - - - - -/** - * Throws a `CanceledError` if cancellation has been requested. - * - * @param {Object} config The config that is to be used for the request - * - * @returns {void} - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } - - if (config.signal && config.signal.aborted) { - throw new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](null, config); - } -} - -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * - * @returns {Promise} The Promise to be fulfilled - */ -function dispatchRequest(config) { - throwIfCancellationRequested(config); - - config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(config.headers); - - // Transform request data - config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( - config, - config.transformRequest - ); - - if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { - config.headers.setContentType('application/x-www-form-urlencoded', false); - } - - const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].adapter); - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( - config, - config.transformResponse, - response - ); - - response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(response.headers); - - return response; - }, function onAdapterRejection(reason) { - if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__["default"])(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( - config, - config.transformResponse, - reason.response - ); - reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(reason.response.headers); - } - } - - return Promise.reject(reason); - }); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/mergeConfig.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/core/mergeConfig.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ mergeConfig) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - - - - - -const headersToObject = (thing) => thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? { ...thing } : thing; - -/** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * - * @returns {Object} New object resulting from merging config2 to config1 - */ -function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - const config = {}; - - function getMergedValue(target, source, caseless) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) { - return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call({caseless}, target, source); - } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) { - return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge({}, source); - } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArray(source)) { - return source.slice(); - } - return source; - } - - // eslint-disable-next-line consistent-return - function mergeDeepProperties(a, b, caseless) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { - return getMergedValue(a, b, caseless); - } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) { - return getMergedValue(undefined, a, caseless); - } - } - - // eslint-disable-next-line consistent-return - function valueFromConfig2(a, b) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { - return getMergedValue(undefined, b); - } - } - - // eslint-disable-next-line consistent-return - function defaultToConfig2(a, b) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { - return getMergedValue(undefined, b); - } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) { - return getMergedValue(undefined, a); - } - } - - // eslint-disable-next-line consistent-return - function mergeDirectKeys(a, b, prop) { - if (prop in config2) { - return getMergedValue(a, b); - } else if (prop in config1) { - return getMergedValue(undefined, a); - } - } - - const mergeMap = { - url: valueFromConfig2, - method: valueFromConfig2, - data: valueFromConfig2, - baseURL: defaultToConfig2, - transformRequest: defaultToConfig2, - transformResponse: defaultToConfig2, - paramsSerializer: defaultToConfig2, - timeout: defaultToConfig2, - timeoutMessage: defaultToConfig2, - withCredentials: defaultToConfig2, - withXSRFToken: defaultToConfig2, - adapter: defaultToConfig2, - responseType: defaultToConfig2, - xsrfCookieName: defaultToConfig2, - xsrfHeaderName: defaultToConfig2, - onUploadProgress: defaultToConfig2, - onDownloadProgress: defaultToConfig2, - decompress: defaultToConfig2, - maxContentLength: defaultToConfig2, - maxBodyLength: defaultToConfig2, - beforeRedirect: defaultToConfig2, - transport: defaultToConfig2, - httpAgent: defaultToConfig2, - httpsAgent: defaultToConfig2, - cancelToken: defaultToConfig2, - socketPath: defaultToConfig2, - responseEncoding: defaultToConfig2, - validateStatus: mergeDirectKeys, - headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true) - }; - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { - const merge = mergeMap[prop] || mergeDeepProperties; - const configValue = merge(config1[prop], config2[prop], prop); - (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); - }); - - return config; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/settle.js": -/*!***********************************************!*\ - !*** ./node_modules/axios/lib/core/settle.js ***! - \***********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ settle) -/* harmony export */ }); -/* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - - - - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - * - * @returns {object} The response. - */ -function settle(resolve, reject, response) { - const validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"]( - 'Request failed with status code ' + response.status, - [_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST, _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], - response.config, - response.request, - response - )); - } -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/transformData.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/core/transformData.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ transformData) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - - - - - - -/** - * Transform the data for a request or a response - * - * @param {Array|Function} fns A single function or Array of functions - * @param {?Object} response The response object - * - * @returns {*} The resulting transformed data - */ -function transformData(fns, response) { - const config = this || _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__["default"]; - const context = response || config; - const headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(context.headers); - let data = context.data; - - _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(fns, function transform(fn) { - data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); - }); - - headers.normalize(); - - return data; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/defaults/index.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/defaults/index.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _transitional_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transitional.js */ "./node_modules/axios/lib/defaults/transitional.js"); -/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -/* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/toURLEncodedForm.js */ "./node_modules/axios/lib/helpers/toURLEncodedForm.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js"); - - - - - - - - - - -/** - * It takes a string, tries to parse it, and if it fails, it returns the stringified version - * of the input - * - * @param {any} rawValue - The value to be stringified. - * @param {Function} parser - A function that parses a string into a JavaScript object. - * @param {Function} encoder - A function that takes a value and returns a string. - * - * @returns {string} A stringified version of the rawValue. - */ -function stringifySafely(rawValue, parser, encoder) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(rawValue)) { - try { - (parser || JSON.parse)(rawValue); - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].trim(rawValue); - } catch (e) { - if (e.name !== 'SyntaxError') { - throw e; - } - } - } - - return (encoder || JSON.stringify)(rawValue); -} - -const defaults = { - - transitional: _transitional_js__WEBPACK_IMPORTED_MODULE_1__["default"], - - adapter: ['xhr', 'http', 'fetch'], - - transformRequest: [function transformRequest(data, headers) { - const contentType = headers.getContentType() || ''; - const hasJSONContentType = contentType.indexOf('application/json') > -1; - const isObjectPayload = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(data); - - if (isObjectPayload && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(data)) { - data = new FormData(data); - } - - const isFormData = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(data); - - if (isFormData) { - return hasJSONContentType ? JSON.stringify((0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__["default"])(data)) : data; - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStream(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFile(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data) - ) { - return data; - } - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBufferView(data)) { - return data.buffer; - } - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(data)) { - headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); - return data.toString(); - } - - let isFileList; - - if (isObjectPayload) { - if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { - return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__["default"])(data, this.formSerializer).toString(); - } - - if ((isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { - const _FormData = this.env && this.env.FormData; - - return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__["default"])( - isFileList ? {'files[]': data} : data, - _FormData && new _FormData(), - this.formSerializer - ); - } - } - - if (isObjectPayload || hasJSONContentType ) { - headers.setContentType('application/json', false); - return stringifySafely(data); - } - - return data; - }], - - transformResponse: [function transformResponse(data) { - const transitional = this.transitional || defaults.transitional; - const forcedJSONParsing = transitional && transitional.forcedJSONParsing; - const JSONRequested = this.responseType === 'json'; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isResponse(data) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)) { - return data; - } - - if (data && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { - const silentJSONParsing = transitional && transitional.silentJSONParsing; - const strictJSONParsing = !silentJSONParsing && JSONRequested; - - try { - return JSON.parse(data); - } catch (e) { - if (strictJSONParsing) { - if (e.name === 'SyntaxError') { - throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].ERR_BAD_RESPONSE, this, null, this.response); - } - throw e; - } - } - } - - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - maxBodyLength: -1, - - env: { - FormData: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.FormData, - Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.Blob - }, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - }, - - headers: { - common: { - 'Accept': 'application/json, text/plain, */*', - 'Content-Type': undefined - } - } -}; - -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { - defaults.headers[method] = {}; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); - - -/***/ }), - -/***/ "./node_modules/axios/lib/defaults/transitional.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/defaults/transitional.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - silentJSONParsing: true, - forcedJSONParsing: true, - clarifyTimeoutError: false -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/env/data.js": -/*!********************************************!*\ - !*** ./node_modules/axios/lib/env/data.js ***! - \********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ VERSION: () => (/* binding */ VERSION) -/* harmony export */ }); -const VERSION = "1.7.7"; - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js": -/*!****************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/AxiosURLSearchParams.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); - - - - -/** - * It encodes a string by replacing all characters that are not in the unreserved set with - * their percent-encoded equivalents - * - * @param {string} str - The string to encode. - * - * @returns {string} The encoded string. - */ -function encode(str) { - const charMap = { - '!': '%21', - "'": '%27', - '(': '%28', - ')': '%29', - '~': '%7E', - '%20': '+', - '%00': '\x00' - }; - return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { - return charMap[match]; - }); -} - -/** - * It takes a params object and converts it to a FormData object - * - * @param {Object} params - The parameters to be converted to a FormData object. - * @param {Object} options - The options object passed to the Axios constructor. - * - * @returns {void} - */ -function AxiosURLSearchParams(params, options) { - this._pairs = []; - - params && (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, this, options); -} - -const prototype = AxiosURLSearchParams.prototype; - -prototype.append = function append(name, value) { - this._pairs.push([name, value]); -}; - -prototype.toString = function toString(encoder) { - const _encode = encoder ? function(value) { - return encoder.call(this, value, encode); - } : encode; - - return this._pairs.map(function each(pair) { - return _encode(pair[0]) + '=' + _encode(pair[1]); - }, '').join('&'); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosURLSearchParams); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/HttpStatusCode.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/HttpStatusCode.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -const HttpStatusCode = { - Continue: 100, - SwitchingProtocols: 101, - Processing: 102, - EarlyHints: 103, - Ok: 200, - Created: 201, - Accepted: 202, - NonAuthoritativeInformation: 203, - NoContent: 204, - ResetContent: 205, - PartialContent: 206, - MultiStatus: 207, - AlreadyReported: 208, - ImUsed: 226, - MultipleChoices: 300, - MovedPermanently: 301, - Found: 302, - SeeOther: 303, - NotModified: 304, - UseProxy: 305, - Unused: 306, - TemporaryRedirect: 307, - PermanentRedirect: 308, - BadRequest: 400, - Unauthorized: 401, - PaymentRequired: 402, - Forbidden: 403, - NotFound: 404, - MethodNotAllowed: 405, - NotAcceptable: 406, - ProxyAuthenticationRequired: 407, - RequestTimeout: 408, - Conflict: 409, - Gone: 410, - LengthRequired: 411, - PreconditionFailed: 412, - PayloadTooLarge: 413, - UriTooLong: 414, - UnsupportedMediaType: 415, - RangeNotSatisfiable: 416, - ExpectationFailed: 417, - ImATeapot: 418, - MisdirectedRequest: 421, - UnprocessableEntity: 422, - Locked: 423, - FailedDependency: 424, - TooEarly: 425, - UpgradeRequired: 426, - PreconditionRequired: 428, - TooManyRequests: 429, - RequestHeaderFieldsTooLarge: 431, - UnavailableForLegalReasons: 451, - InternalServerError: 500, - NotImplemented: 501, - BadGateway: 502, - ServiceUnavailable: 503, - GatewayTimeout: 504, - HttpVersionNotSupported: 505, - VariantAlsoNegotiates: 506, - InsufficientStorage: 507, - LoopDetected: 508, - NotExtended: 510, - NetworkAuthenticationRequired: 511, -}; - -Object.entries(HttpStatusCode).forEach(([key, value]) => { - HttpStatusCode[value] = key; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HttpStatusCode); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/bind.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/helpers/bind.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ bind) -/* harmony export */ }); - - -function bind(fn, thisArg) { - return function wrap() { - return fn.apply(thisArg, arguments); - }; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/buildURL.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/buildURL.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ buildURL) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js"); - - - - - -/** - * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their - * URI encoded counterparts - * - * @param {string} val The value to be encoded. - * - * @returns {string} The encoded value. - */ -function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @param {?object} options - * - * @returns {string} The formatted url - */ -function buildURL(url, params, options) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - const _encode = options && options.encode || encode; - - const serializeFn = options && options.serialize; - - let serializedParams; - - if (serializeFn) { - serializedParams = serializeFn(params, options); - } else { - serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(params) ? - params.toString() : - new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"](params, options).toString(_encode); - } - - if (serializedParams) { - const hashmarkIndex = url.indexOf("#"); - - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/combineURLs.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/combineURLs.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ combineURLs) -/* harmony export */ }); - - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * - * @returns {string} The combined URL - */ -function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/composeSignals.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/composeSignals.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -const composeSignals = (signals, timeout) => { - const {length} = (signals = signals ? signals.filter(Boolean) : []); - - if (timeout || length) { - let controller = new AbortController(); - - let aborted; - - const onabort = function (reason) { - if (!aborted) { - aborted = true; - unsubscribe(); - const err = reason instanceof Error ? reason : this.reason; - controller.abort(err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? err : new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_1__["default"](err instanceof Error ? err.message : err)); - } - } - - let timer = timeout && setTimeout(() => { - timer = null; - onabort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](`timeout ${timeout} of ms exceeded`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ETIMEDOUT)) - }, timeout) - - const unsubscribe = () => { - if (signals) { - timer && clearTimeout(timer); - timer = null; - signals.forEach(signal => { - signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort); - }); - signals = null; - } - } - - signals.forEach((signal) => signal.addEventListener('abort', onabort)); - - const {signal} = controller; - - signal.unsubscribe = () => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(unsubscribe); - - return signal; - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (composeSignals); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/cookies.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/helpers/cookies.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ? - - // Standard browser envs support document.cookie - { - write(name, value, expires, path, domain, secure) { - const cookie = [name + '=' + encodeURIComponent(value)]; - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(path) && cookie.push('path=' + path); - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(domain) && cookie.push('domain=' + domain); - - secure === true && cookie.push('secure'); - - document.cookie = cookie.join('; '); - }, - - read(name) { - const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove(name) { - this.write(name, '', Date.now() - 86400000); - } - } - - : - - // Non-standard browser env (web workers, react-native) lack needed support. - { - write() {}, - read() { - return null; - }, - remove() {} - }); - - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/formDataToJSON.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/formDataToJSON.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -/** - * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] - * - * @param {string} name - The name of the property to get. - * - * @returns An array of strings. - */ -function parsePropPath(name) { - // foo[x][y][z] - // foo.x.y.z - // foo-x-y-z - // foo x y z - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map(match => { - return match[0] === '[]' ? '' : match[1] || match[0]; - }); -} - -/** - * Convert an array to an object. - * - * @param {Array} arr - The array to convert to an object. - * - * @returns An object with the same keys and values as the array. - */ -function arrayToObject(arr) { - const obj = {}; - const keys = Object.keys(arr); - let i; - const len = keys.length; - let key; - for (i = 0; i < len; i++) { - key = keys[i]; - obj[key] = arr[key]; - } - return obj; -} - -/** - * It takes a FormData object and returns a JavaScript object - * - * @param {string} formData The FormData object to convert to JSON. - * - * @returns {Object | null} The converted object. - */ -function formDataToJSON(formData) { - function buildPath(path, value, target, index) { - let name = path[index++]; - - if (name === '__proto__') return true; - - const isNumericKey = Number.isFinite(+name); - const isLast = index >= path.length; - name = !name && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target) ? target.length : name; - - if (isLast) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name)) { - target[name] = [target[name], value]; - } else { - target[name] = value; - } - - return !isNumericKey; - } - - if (!target[name] || !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(target[name])) { - target[name] = []; - } - - const result = buildPath(path, value, target[name], index); - - if (result && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target[name])) { - target[name] = arrayToObject(target[name]); - } - - return !isNumericKey; - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(formData) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(formData.entries)) { - const obj = {}; - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEachEntry(formData, (name, value) => { - buildPath(parsePropPath(name), value, obj, 0); - }); - - return obj; - } - - return null; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (formDataToJSON); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ isAbsoluteURL) -/* harmony export */ }); - - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isAxiosError.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isAxiosError.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ isAxiosError) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -/** - * Determines whether the payload is an error thrown by Axios - * - * @param {*} payload The value to test - * - * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false - */ -function isAxiosError(payload) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(payload) && (payload.isAxiosError === true); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js": -/*!***********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); - - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ? - -// Standard browser envs have full support of the APIs needed to test -// whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - const msie = _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent); - const urlParsingNode = document.createElement('a'); - let originURL; - - /** - * Parse a URL to discover its components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - let href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - const parsed = (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })()); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/null.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/helpers/null.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -// eslint-disable-next-line strict -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (null); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/parseHeaders.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -// RawAxiosHeaders whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toObjectSet([ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]); - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} rawHeaders Headers needing to be parsed - * - * @returns {Object} Headers parsed into an object - */ -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rawHeaders => { - const parsed = {}; - let key; - let val; - let i; - - rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { - i = line.indexOf(':'); - key = line.substring(0, i).trim().toLowerCase(); - val = line.substring(i + 1).trim(); - - if (!key || (parsed[key] && ignoreDuplicateOf[key])) { - return; - } - - if (key === 'set-cookie') { - if (parsed[key]) { - parsed[key].push(val); - } else { - parsed[key] = [val]; - } - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - }); - - return parsed; -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/parseProtocol.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/parseProtocol.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ parseProtocol) -/* harmony export */ }); - - -function parseProtocol(url) { - const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); - return match && match[1] || ''; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/progressEventReducer.js": -/*!****************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/progressEventReducer.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ asyncDecorator: () => (/* binding */ asyncDecorator), -/* harmony export */ progressEventDecorator: () => (/* binding */ progressEventDecorator), -/* harmony export */ progressEventReducer: () => (/* binding */ progressEventReducer) -/* harmony export */ }); -/* harmony import */ var _speedometer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./speedometer.js */ "./node_modules/axios/lib/helpers/speedometer.js"); -/* harmony import */ var _throttle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./throttle.js */ "./node_modules/axios/lib/helpers/throttle.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -const progressEventReducer = (listener, isDownloadStream, freq = 3) => { - let bytesNotified = 0; - const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250); - - return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e => { - const loaded = e.loaded; - const total = e.lengthComputable ? e.total : undefined; - const progressBytes = loaded - bytesNotified; - const rate = _speedometer(progressBytes); - const inRange = loaded <= total; - - bytesNotified = loaded; - - const data = { - loaded, - total, - progress: total ? (loaded / total) : undefined, - bytes: progressBytes, - rate: rate ? rate : undefined, - estimated: rate && total && inRange ? (total - loaded) / rate : undefined, - event: e, - lengthComputable: total != null, - [isDownloadStream ? 'download' : 'upload']: true - }; - - listener(data); - }, freq); -} - -const progressEventDecorator = (total, throttled) => { - const lengthComputable = total != null; - - return [(loaded) => throttled[0]({ - lengthComputable, - total, - loaded - }), throttled[1]]; -} - -const asyncDecorator = (fn) => (...args) => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(() => fn(...args)); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/resolveConfig.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/resolveConfig.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./isURLSameOrigin.js */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js"); -/* harmony import */ var _cookies_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cookies.js */ "./node_modules/axios/lib/helpers/cookies.js"); -/* harmony import */ var _core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js"); -/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _buildURL_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js"); - - - - - - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((config) => { - const newConfig = (0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, config); - - let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig; - - newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(headers); - - newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__["default"])(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer); - - // HTTP basic authentication - if (auth) { - headers.set('Authorization', 'Basic ' + - btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')) - ); - } - - let contentType; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_4__["default"].isFormData(data)) { - if (_platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserWebWorkerEnv) { - headers.setContentType(undefined); // Let the browser set it - } else if ((contentType = headers.getContentType()) !== false) { - // fix semicolon duplication issue for ReactNative FormData implementation - const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; - headers.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); - } - } - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - - if (_platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserEnv) { - withXSRFToken && _utils_js__WEBPACK_IMPORTED_MODULE_4__["default"].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); - - if (withXSRFToken || (withXSRFToken !== false && (0,_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_6__["default"])(newConfig.url))) { - // Add xsrf header - const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__WEBPACK_IMPORTED_MODULE_7__["default"].read(xsrfCookieName); - - if (xsrfValue) { - headers.set(xsrfHeaderName, xsrfValue); - } - } - } - - return newConfig; -}); - - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/speedometer.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/speedometer.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/** - * Calculate data maxRate - * @param {Number} [samplesCount= 10] - * @param {Number} [min= 1000] - * @returns {Function} - */ -function speedometer(samplesCount, min) { - samplesCount = samplesCount || 10; - const bytes = new Array(samplesCount); - const timestamps = new Array(samplesCount); - let head = 0; - let tail = 0; - let firstSampleTS; - - min = min !== undefined ? min : 1000; - - return function push(chunkLength) { - const now = Date.now(); - - const startedAt = timestamps[tail]; - - if (!firstSampleTS) { - firstSampleTS = now; - } - - bytes[head] = chunkLength; - timestamps[head] = now; - - let i = tail; - let bytesCount = 0; - - while (i !== head) { - bytesCount += bytes[i++]; - i = i % samplesCount; - } - - head = (head + 1) % samplesCount; - - if (head === tail) { - tail = (tail + 1) % samplesCount; - } - - if (now - firstSampleTS < min) { - return; - } - - const passed = startedAt && now - startedAt; - - return passed ? Math.round(bytesCount * 1000 / passed) : undefined; - }; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (speedometer); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/spread.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/helpers/spread.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ spread) -/* harmony export */ }); - - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * - * @returns {Function} - */ -function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/throttle.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/throttle.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Throttle decorator - * @param {Function} fn - * @param {Number} freq - * @return {Function} - */ -function throttle(fn, freq) { - let timestamp = 0; - let threshold = 1000 / freq; - let lastArgs; - let timer; - - const invoke = (args, now = Date.now()) => { - timestamp = now; - lastArgs = null; - if (timer) { - clearTimeout(timer); - timer = null; - } - fn.apply(null, args); - } - - const throttled = (...args) => { - const now = Date.now(); - const passed = now - timestamp; - if ( passed >= threshold) { - invoke(args, now); - } else { - lastArgs = args; - if (!timer) { - timer = setTimeout(() => { - timer = null; - invoke(lastArgs) - }, threshold - passed); - } - } - } - - const flush = () => lastArgs && invoke(lastArgs); - - return [throttled, flush]; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (throttle); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/toFormData.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/toFormData.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/node/classes/FormData.js */ "./node_modules/axios/lib/helpers/null.js"); - - - - -// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored - - -/** - * Determines if the given thing is a array or js object. - * - * @param {string} thing - The object or array to be visited. - * - * @returns {boolean} - */ -function isVisitable(thing) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(thing) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(thing); -} - -/** - * It removes the brackets from the end of a string - * - * @param {string} key - The key of the parameter. - * - * @returns {string} the key without the brackets. - */ -function removeBrackets(key) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]') ? key.slice(0, -2) : key; -} - -/** - * It takes a path, a key, and a boolean, and returns a string - * - * @param {string} path - The path to the current key. - * @param {string} key - The key of the current object being iterated over. - * @param {string} dots - If true, the key will be rendered with dots instead of brackets. - * - * @returns {string} The path to the current key. - */ -function renderKey(path, key, dots) { - if (!path) return key; - return path.concat(key).map(function each(token, i) { - // eslint-disable-next-line no-param-reassign - token = removeBrackets(token); - return !dots && i ? '[' + token + ']' : token; - }).join(dots ? '.' : ''); -} - -/** - * If the array is an array and none of its elements are visitable, then it's a flat array. - * - * @param {Array} arr - The array to check - * - * @returns {boolean} - */ -function isFlatArray(arr) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(arr) && !arr.some(isVisitable); -} - -const predicates = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"], {}, null, function filter(prop) { - return /^is[A-Z]/.test(prop); -}); - -/** - * Convert a data object to FormData - * - * @param {Object} obj - * @param {?Object} [formData] - * @param {?Object} [options] - * @param {Function} [options.visitor] - * @param {Boolean} [options.metaTokens = true] - * @param {Boolean} [options.dots = false] - * @param {?Boolean} [options.indexes = false] - * - * @returns {Object} - **/ - -/** - * It converts an object into a FormData object - * - * @param {Object} obj - The object to convert to form data. - * @param {string} formData - The FormData object to append to. - * @param {Object} options - * - * @returns - */ -function toFormData(obj, formData, options) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) { - throw new TypeError('target must be an object'); - } - - // eslint-disable-next-line no-param-reassign - formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"] || FormData)(); - - // eslint-disable-next-line no-param-reassign - options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(options, { - metaTokens: true, - dots: false, - indexes: false - }, false, function defined(option, source) { - // eslint-disable-next-line no-eq-null,eqeqeq - return !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(source[option]); - }); - - const metaTokens = options.metaTokens; - // eslint-disable-next-line no-use-before-define - const visitor = options.visitor || defaultVisitor; - const dots = options.dots; - const indexes = options.indexes; - const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; - const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData); - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) { - throw new TypeError('visitor must be a function'); - } - - function convertValue(value) { - if (value === null) return ''; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isDate(value)) { - return value.toISOString(); - } - - if (!useBlob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(value)) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Blob is not supported. Use a Buffer instead.'); - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isTypedArray(value)) { - return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); - } - - return value; - } - - /** - * Default visitor. - * - * @param {*} value - * @param {String|Number} key - * @param {Array} path - * @this {FormData} - * - * @returns {boolean} return true to visit the each prop of the value recursively - */ - function defaultVisitor(value, key, path) { - let arr = value; - - if (value && !path && typeof value === 'object') { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '{}')) { - // eslint-disable-next-line no-param-reassign - key = metaTokens ? key : key.slice(0, -2); - // eslint-disable-next-line no-param-reassign - value = JSON.stringify(value); - } else if ( - (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) && isFlatArray(value)) || - ((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value)) - )) { - // eslint-disable-next-line no-param-reassign - key = removeBrackets(key); - - arr.forEach(function each(el, index) { - !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && formData.append( - // eslint-disable-next-line no-nested-ternary - indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), - convertValue(el) - ); - }); - return false; - } - } - - if (isVisitable(value)) { - return true; - } - - formData.append(renderKey(path, key, dots), convertValue(value)); - - return false; - } - - const stack = []; - - const exposedHelpers = Object.assign(predicates, { - defaultVisitor, - convertValue, - isVisitable - }); - - function build(value, path) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value)) return; - - if (stack.indexOf(value) !== -1) { - throw Error('Circular reference detected in ' + path.join('.')); - } - - stack.push(value); - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(value, function each(el, key) { - const result = !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && visitor.call( - formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(key) ? key.trim() : key, path, exposedHelpers - ); - - if (result === true) { - build(el, path ? path.concat(key) : [key]); - } - }); - - stack.pop(); - } - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) { - throw new TypeError('data must be an object'); - } - - build(obj); - - return formData; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toFormData); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/toURLEncodedForm.js": -/*!************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/toURLEncodedForm.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ toURLEncodedForm) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); - - - - - - -function toURLEncodedForm(data, options) { - return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].classes.URLSearchParams(), Object.assign({ - visitor: function(value, key, path, helpers) { - if (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isBuffer(value)) { - this.append(key, value.toString('base64')); - return false; - } - - return helpers.defaultVisitor.apply(this, arguments); - } - }, options)); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/trackStream.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/trackStream.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ readBytes: () => (/* binding */ readBytes), -/* harmony export */ streamChunk: () => (/* binding */ streamChunk), -/* harmony export */ trackStream: () => (/* binding */ trackStream) -/* harmony export */ }); - -const streamChunk = function* (chunk, chunkSize) { - let len = chunk.byteLength; - - if (!chunkSize || len < chunkSize) { - yield chunk; - return; - } - - let pos = 0; - let end; - - while (pos < len) { - end = pos + chunkSize; - yield chunk.slice(pos, end); - pos = end; - } -} - -const readBytes = async function* (iterable, chunkSize) { - for await (const chunk of readStream(iterable)) { - yield* streamChunk(chunk, chunkSize); - } -} - -const readStream = async function* (stream) { - if (stream[Symbol.asyncIterator]) { - yield* stream; - return; - } - - const reader = stream.getReader(); - try { - for (;;) { - const {done, value} = await reader.read(); - if (done) { - break; - } - yield value; - } - } finally { - await reader.cancel(); - } -} - -const trackStream = (stream, chunkSize, onProgress, onFinish) => { - const iterator = readBytes(stream, chunkSize); - - let bytes = 0; - let done; - let _onFinish = (e) => { - if (!done) { - done = true; - onFinish && onFinish(e); - } - } - - return new ReadableStream({ - async pull(controller) { - try { - const {done, value} = await iterator.next(); - - if (done) { - _onFinish(); - controller.close(); - return; - } - - let len = value.byteLength; - if (onProgress) { - let loadedBytes = bytes += len; - onProgress(loadedBytes); - } - controller.enqueue(new Uint8Array(value)); - } catch (err) { - _onFinish(err); - throw err; - } - }, - cancel(reason) { - _onFinish(reason); - return iterator.return(); - } - }, { - highWaterMark: 2 - }) -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/validator.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/validator.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../env/data.js */ "./node_modules/axios/lib/env/data.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - - - - - -const validators = {}; - -// eslint-disable-next-line func-names -['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { - validators[type] = function validator(thing) { - return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; - }; -}); - -const deprecatedWarnings = {}; - -/** - * Transitional option validator - * - * @param {function|boolean?} validator - set to false if the transitional option has been removed - * @param {string?} version - deprecated version / removed since version - * @param {string?} message - some message with additional info - * - * @returns {function} - */ -validators.transitional = function transitional(validator, version, message) { - function formatMessage(opt, desc) { - return '[Axios v' + _env_data_js__WEBPACK_IMPORTED_MODULE_0__.VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); - } - - // eslint-disable-next-line func-names - return (value, opt, opts) => { - if (validator === false) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]( - formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), - _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_DEPRECATED - ); - } - - if (version && !deprecatedWarnings[opt]) { - deprecatedWarnings[opt] = true; - // eslint-disable-next-line no-console - console.warn( - formatMessage( - opt, - ' has been deprecated since v' + version + ' and will be removed in the near future' - ) - ); - } - - return validator ? validator(value, opt, opts) : true; - }; -}; - -/** - * Assert object's properties type - * - * @param {object} options - * @param {object} schema - * @param {boolean?} allowUnknown - * - * @returns {object} - */ - -function assertOptions(options, schema, allowUnknown) { - if (typeof options !== 'object') { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('options must be an object', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE); - } - const keys = Object.keys(options); - let i = keys.length; - while (i-- > 0) { - const opt = keys[i]; - const validator = schema[opt]; - if (validator) { - const value = options[opt]; - const result = value === undefined || validator(value, opt, options); - if (result !== true) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('option ' + opt + ' must be ' + result, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE); - } - continue; - } - if (allowUnknown !== true) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('Unknown option ' + opt, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION); - } - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - assertOptions, - validators -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/classes/Blob.js": -/*!*****************************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/classes/Blob.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof Blob !== 'undefined' ? Blob : null); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/classes/FormData.js": -/*!*********************************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/classes/FormData.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof FormData !== 'undefined' ? FormData : null); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js": -/*!****************************************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js ***! - \****************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/index.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"); -/* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/FormData.js */ "./node_modules/axios/lib/platform/browser/classes/FormData.js"); -/* harmony import */ var _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./classes/Blob.js */ "./node_modules/axios/lib/platform/browser/classes/Blob.js"); - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - isBrowser: true, - classes: { - URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"], - FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"], - Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"] - }, - protocols: ['http', 'https', 'file', 'blob', 'url', 'data'] -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/common/utils.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/platform/common/utils.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ hasBrowserEnv: () => (/* binding */ hasBrowserEnv), -/* harmony export */ hasStandardBrowserEnv: () => (/* binding */ hasStandardBrowserEnv), -/* harmony export */ hasStandardBrowserWebWorkerEnv: () => (/* binding */ hasStandardBrowserWebWorkerEnv), -/* harmony export */ navigator: () => (/* binding */ _navigator), -/* harmony export */ origin: () => (/* binding */ origin) -/* harmony export */ }); -const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; - -const _navigator = typeof navigator === 'object' && navigator || undefined; - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - * - * @returns {boolean} - */ -const hasStandardBrowserEnv = hasBrowserEnv && - (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); - -/** - * Determine if we're running in a standard browser webWorker environment - * - * Although the `isStandardBrowserEnv` method indicates that - * `allows axios to run in a web worker`, the WebWorker will still be - * filtered out due to its judgment standard - * `typeof window !== 'undefined' && typeof document !== 'undefined'`. - * This leads to a problem when axios post `FormData` in webWorker - */ -const hasStandardBrowserWebWorkerEnv = (() => { - return ( - typeof WorkerGlobalScope !== 'undefined' && - // eslint-disable-next-line no-undef - self instanceof WorkerGlobalScope && - typeof self.importScripts === 'function' - ); -})(); - -const origin = hasBrowserEnv && window.location.href || 'http://localhost'; - - - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/index.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/platform/index.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _node_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node/index.js */ "./node_modules/axios/lib/platform/browser/index.js"); -/* harmony import */ var _common_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/utils.js */ "./node_modules/axios/lib/platform/common/utils.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - ..._common_utils_js__WEBPACK_IMPORTED_MODULE_0__, - ..._node_index_js__WEBPACK_IMPORTED_MODULE_1__["default"] -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/utils.js": -/*!*****************************************!*\ - !*** ./node_modules/axios/lib/utils.js ***! - \*****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js"); - - - - -// utils is a library of generic helper functions non-specific to axios - -const {toString} = Object.prototype; -const {getPrototypeOf} = Object; - -const kindOf = (cache => thing => { - const str = toString.call(thing); - return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); -})(Object.create(null)); - -const kindOfTest = (type) => { - type = type.toLowerCase(); - return (thing) => kindOf(thing) === type -} - -const typeOfTest = type => thing => typeof thing === type; - -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * - * @returns {boolean} True if value is an Array, otherwise false - */ -const {isArray} = Array; - -/** - * Determine if a value is undefined - * - * @param {*} val The value to test - * - * @returns {boolean} True if the value is undefined, otherwise false - */ -const isUndefined = typeOfTest('undefined'); - -/** - * Determine if a value is a Buffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Buffer, otherwise false - */ -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); -} - -/** - * Determine if a value is an ArrayBuffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -const isArrayBuffer = kindOfTest('ArrayBuffer'); - - -/** - * Determine if a value is a view on an ArrayBuffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - let result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); - } - return result; -} - -/** - * Determine if a value is a String - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a String, otherwise false - */ -const isString = typeOfTest('string'); - -/** - * Determine if a value is a Function - * - * @param {*} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -const isFunction = typeOfTest('function'); - -/** - * Determine if a value is a Number - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Number, otherwise false - */ -const isNumber = typeOfTest('number'); - -/** - * Determine if a value is an Object - * - * @param {*} thing The value to test - * - * @returns {boolean} True if value is an Object, otherwise false - */ -const isObject = (thing) => thing !== null && typeof thing === 'object'; - -/** - * Determine if a value is a Boolean - * - * @param {*} thing The value to test - * @returns {boolean} True if value is a Boolean, otherwise false - */ -const isBoolean = thing => thing === true || thing === false; - -/** - * Determine if a value is a plain Object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a plain Object, otherwise false - */ -const isPlainObject = (val) => { - if (kindOf(val) !== 'object') { - return false; - } - - const prototype = getPrototypeOf(val); - return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); -} - -/** - * Determine if a value is a Date - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Date, otherwise false - */ -const isDate = kindOfTest('Date'); - -/** - * Determine if a value is a File - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a File, otherwise false - */ -const isFile = kindOfTest('File'); - -/** - * Determine if a value is a Blob - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Blob, otherwise false - */ -const isBlob = kindOfTest('Blob'); - -/** - * Determine if a value is a FileList - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a File, otherwise false - */ -const isFileList = kindOfTest('FileList'); - -/** - * Determine if a value is a Stream - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Stream, otherwise false - */ -const isStream = (val) => isObject(val) && isFunction(val.pipe); - -/** - * Determine if a value is a FormData - * - * @param {*} thing The value to test - * - * @returns {boolean} True if value is an FormData, otherwise false - */ -const isFormData = (thing) => { - let kind; - return thing && ( - (typeof FormData === 'function' && thing instanceof FormData) || ( - isFunction(thing.append) && ( - (kind = kindOf(thing)) === 'formdata' || - // detect form-data instance - (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') - ) - ) - ) -} - -/** - * Determine if a value is a URLSearchParams object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -const isURLSearchParams = kindOfTest('URLSearchParams'); - -const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest); - -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * - * @returns {String} The String freed of excess whitespace - */ -const trim = (str) => str.trim ? - str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - * - * @param {Boolean} [allOwnKeys = false] - * @returns {any} - */ -function forEach(obj, fn, {allOwnKeys = false} = {}) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - let i; - let l; - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); - const len = keys.length; - let key; - - for (i = 0; i < len; i++) { - key = keys[i]; - fn.call(null, obj[key], key, obj); - } - } -} - -function findKey(obj, key) { - key = key.toLowerCase(); - const keys = Object.keys(obj); - let i = keys.length; - let _key; - while (i-- > 0) { - _key = keys[i]; - if (key === _key.toLowerCase()) { - return _key; - } - } - return null; -} - -const _global = (() => { - /*eslint no-undef:0*/ - if (typeof globalThis !== "undefined") return globalThis; - return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global) -})(); - -const isContextDefined = (context) => !isUndefined(context) && context !== _global; - -/** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - const {caseless} = isContextDefined(this) && this || {}; - const result = {}; - const assignValue = (val, key) => { - const targetKey = caseless && findKey(result, key) || key; - if (isPlainObject(result[targetKey]) && isPlainObject(val)) { - result[targetKey] = merge(result[targetKey], val); - } else if (isPlainObject(val)) { - result[targetKey] = merge({}, val); - } else if (isArray(val)) { - result[targetKey] = val.slice(); - } else { - result[targetKey] = val; - } - } - - for (let i = 0, l = arguments.length; i < l; i++) { - arguments[i] && forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * - * @param {Boolean} [allOwnKeys] - * @returns {Object} The resulting value of object a - */ -const extend = (a, b, thisArg, {allOwnKeys}= {}) => { - forEach(b, (val, key) => { - if (thisArg && isFunction(val)) { - a[key] = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__["default"])(val, thisArg); - } else { - a[key] = val; - } - }, {allOwnKeys}); - return a; -} - -/** - * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - * - * @param {string} content with BOM - * - * @returns {string} content value without BOM - */ -const stripBOM = (content) => { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -} - -/** - * Inherit the prototype methods from one constructor into another - * @param {function} constructor - * @param {function} superConstructor - * @param {object} [props] - * @param {object} [descriptors] - * - * @returns {void} - */ -const inherits = (constructor, superConstructor, props, descriptors) => { - constructor.prototype = Object.create(superConstructor.prototype, descriptors); - constructor.prototype.constructor = constructor; - Object.defineProperty(constructor, 'super', { - value: superConstructor.prototype - }); - props && Object.assign(constructor.prototype, props); -} - -/** - * Resolve object with deep prototype chain to a flat object - * @param {Object} sourceObj source object - * @param {Object} [destObj] - * @param {Function|Boolean} [filter] - * @param {Function} [propFilter] - * - * @returns {Object} - */ -const toFlatObject = (sourceObj, destObj, filter, propFilter) => { - let props; - let i; - let prop; - const merged = {}; - - destObj = destObj || {}; - // eslint-disable-next-line no-eq-null,eqeqeq - if (sourceObj == null) return destObj; - - do { - props = Object.getOwnPropertyNames(sourceObj); - i = props.length; - while (i-- > 0) { - prop = props[i]; - if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { - destObj[prop] = sourceObj[prop]; - merged[prop] = true; - } - } - sourceObj = filter !== false && getPrototypeOf(sourceObj); - } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); - - return destObj; -} - -/** - * Determines whether a string ends with the characters of a specified string - * - * @param {String} str - * @param {String} searchString - * @param {Number} [position= 0] - * - * @returns {boolean} - */ -const endsWith = (str, searchString, position) => { - str = String(str); - if (position === undefined || position > str.length) { - position = str.length; - } - position -= searchString.length; - const lastIndex = str.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; -} - - -/** - * Returns new array from array like object or null if failed - * - * @param {*} [thing] - * - * @returns {?Array} - */ -const toArray = (thing) => { - if (!thing) return null; - if (isArray(thing)) return thing; - let i = thing.length; - if (!isNumber(i)) return null; - const arr = new Array(i); - while (i-- > 0) { - arr[i] = thing[i]; - } - return arr; -} - -/** - * Checking if the Uint8Array exists and if it does, it returns a function that checks if the - * thing passed in is an instance of Uint8Array - * - * @param {TypedArray} - * - * @returns {Array} - */ -// eslint-disable-next-line func-names -const isTypedArray = (TypedArray => { - // eslint-disable-next-line func-names - return thing => { - return TypedArray && thing instanceof TypedArray; - }; -})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); - -/** - * For each entry in the object, call the function with the key and value. - * - * @param {Object} obj - The object to iterate over. - * @param {Function} fn - The function to call for each entry. - * - * @returns {void} - */ -const forEachEntry = (obj, fn) => { - const generator = obj && obj[Symbol.iterator]; - - const iterator = generator.call(obj); - - let result; - - while ((result = iterator.next()) && !result.done) { - const pair = result.value; - fn.call(obj, pair[0], pair[1]); - } -} - -/** - * It takes a regular expression and a string, and returns an array of all the matches - * - * @param {string} regExp - The regular expression to match against. - * @param {string} str - The string to search. - * - * @returns {Array} - */ -const matchAll = (regExp, str) => { - let matches; - const arr = []; - - while ((matches = regExp.exec(str)) !== null) { - arr.push(matches); - } - - return arr; -} - -/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ -const isHTMLForm = kindOfTest('HTMLFormElement'); - -const toCamelCase = str => { - return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, - function replacer(m, p1, p2) { - return p1.toUpperCase() + p2; - } - ); -}; - -/* Creating a function that will check if an object has a property. */ -const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); - -/** - * Determine if a value is a RegExp object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a RegExp object, otherwise false - */ -const isRegExp = kindOfTest('RegExp'); - -const reduceDescriptors = (obj, reducer) => { - const descriptors = Object.getOwnPropertyDescriptors(obj); - const reducedDescriptors = {}; - - forEach(descriptors, (descriptor, name) => { - let ret; - if ((ret = reducer(descriptor, name, obj)) !== false) { - reducedDescriptors[name] = ret || descriptor; - } - }); - - Object.defineProperties(obj, reducedDescriptors); -} - -/** - * Makes all methods read-only - * @param {Object} obj - */ - -const freezeMethods = (obj) => { - reduceDescriptors(obj, (descriptor, name) => { - // skip restricted props in strict mode - if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { - return false; - } - - const value = obj[name]; - - if (!isFunction(value)) return; - - descriptor.enumerable = false; - - if ('writable' in descriptor) { - descriptor.writable = false; - return; - } - - if (!descriptor.set) { - descriptor.set = () => { - throw Error('Can not rewrite read-only method \'' + name + '\''); - }; - } - }); -} - -const toObjectSet = (arrayOrString, delimiter) => { - const obj = {}; - - const define = (arr) => { - arr.forEach(value => { - obj[value] = true; - }); - } - - isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); - - return obj; -} - -const noop = () => {} - -const toFiniteNumber = (value, defaultValue) => { - return value != null && Number.isFinite(value = +value) ? value : defaultValue; -} - -const ALPHA = 'abcdefghijklmnopqrstuvwxyz' - -const DIGIT = '0123456789'; - -const ALPHABET = { - DIGIT, - ALPHA, - ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT -} - -const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str = ''; - const {length} = alphabet; - while (size--) { - str += alphabet[Math.random() * length|0] - } - - return str; -} - -/** - * If the thing is a FormData object, return true, otherwise return false. - * - * @param {unknown} thing - The thing to check. - * - * @returns {boolean} - */ -function isSpecCompliantForm(thing) { - return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]); -} - -const toJSONObject = (obj) => { - const stack = new Array(10); - - const visit = (source, i) => { - - if (isObject(source)) { - if (stack.indexOf(source) >= 0) { - return; - } - - if(!('toJSON' in source)) { - stack[i] = source; - const target = isArray(source) ? [] : {}; - - forEach(source, (value, key) => { - const reducedValue = visit(value, i + 1); - !isUndefined(reducedValue) && (target[key] = reducedValue); - }); - - stack[i] = undefined; - - return target; - } - } - - return source; - } - - return visit(obj, 0); -} - -const isAsyncFn = kindOfTest('AsyncFunction'); - -const isThenable = (thing) => - thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); - -// original code -// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 - -const _setImmediate = ((setImmediateSupported, postMessageSupported) => { - if (setImmediateSupported) { - return setImmediate; - } - - return postMessageSupported ? ((token, callbacks) => { - _global.addEventListener("message", ({source, data}) => { - if (source === _global && data === token) { - callbacks.length && callbacks.shift()(); - } - }, false); - - return (cb) => { - callbacks.push(cb); - _global.postMessage(token, "*"); - } - })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); -})( - typeof setImmediate === 'function', - isFunction(_global.postMessage) -); - -const asap = typeof queueMicrotask !== 'undefined' ? - queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate); - -// ********************* - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - isArray, - isArrayBuffer, - isBuffer, - isFormData, - isArrayBufferView, - isString, - isNumber, - isBoolean, - isObject, - isPlainObject, - isReadableStream, - isRequest, - isResponse, - isHeaders, - isUndefined, - isDate, - isFile, - isBlob, - isRegExp, - isFunction, - isStream, - isURLSearchParams, - isTypedArray, - isFileList, - forEach, - merge, - extend, - trim, - stripBOM, - inherits, - toFlatObject, - kindOf, - kindOfTest, - endsWith, - toArray, - forEachEntry, - matchAll, - isHTMLForm, - hasOwnProperty, - hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection - reduceDescriptors, - freezeMethods, - toObjectSet, - toCamelCase, - noop, - toFiniteNumber, - findKey, - global: _global, - isContextDefined, - ALPHABET, - generateString, - isSpecCompliantForm, - toJSONObject, - isAsyncFn, - isThenable, - setImmediate: _setImmediate, - asap -}); - - -/***/ }), - -/***/ "./node_modules/react-intersection-observer/dist/index.mjs": -/*!*****************************************************************!*\ - !*** ./node_modules/react-intersection-observer/dist/index.mjs ***! - \*****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ InView: () => (/* binding */ InView), -/* harmony export */ defaultFallbackInView: () => (/* binding */ defaultFallbackInView), -/* harmony export */ observe: () => (/* binding */ observe), -/* harmony export */ useInView: () => (/* binding */ useInView) -/* harmony export */ }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); -"use client"; -var __defProp = Object.defineProperty; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); - -// src/InView.tsx - - -// src/observe.ts -var observerMap = /* @__PURE__ */ new Map(); -var RootIds = /* @__PURE__ */ new WeakMap(); -var rootId = 0; -var unsupportedValue = void 0; -function defaultFallbackInView(inView) { - unsupportedValue = inView; -} -function getRootId(root) { - if (!root) return "0"; - if (RootIds.has(root)) return RootIds.get(root); - rootId += 1; - RootIds.set(root, rootId.toString()); - return RootIds.get(root); -} -function optionsToId(options) { - return Object.keys(options).sort().filter( - (key) => options[key] !== void 0 - ).map((key) => { - return `${key}_${key === "root" ? getRootId(options.root) : options[key]}`; - }).toString(); -} -function createObserver(options) { - const id = optionsToId(options); - let instance = observerMap.get(id); - if (!instance) { - const elements = /* @__PURE__ */ new Map(); - let thresholds; - const observer = new IntersectionObserver((entries) => { - entries.forEach((entry) => { - var _a; - const inView = entry.isIntersecting && thresholds.some((threshold) => entry.intersectionRatio >= threshold); - if (options.trackVisibility && typeof entry.isVisible === "undefined") { - entry.isVisible = inView; - } - (_a = elements.get(entry.target)) == null ? void 0 : _a.forEach((callback) => { - callback(inView, entry); - }); - }); - }, options); - thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]); - instance = { - id, - observer, - elements - }; - observerMap.set(id, instance); - } - return instance; -} -function observe(element, callback, options = {}, fallbackInView = unsupportedValue) { - if (typeof window.IntersectionObserver === "undefined" && fallbackInView !== void 0) { - const bounds = element.getBoundingClientRect(); - callback(fallbackInView, { - isIntersecting: fallbackInView, - target: element, - intersectionRatio: typeof options.threshold === "number" ? options.threshold : 0, - time: 0, - boundingClientRect: bounds, - intersectionRect: bounds, - rootBounds: bounds - }); - return () => { - }; - } - const { id, observer, elements } = createObserver(options); - const callbacks = elements.get(element) || []; - if (!elements.has(element)) { - elements.set(element, callbacks); - } - callbacks.push(callback); - observer.observe(element); - return function unobserve() { - callbacks.splice(callbacks.indexOf(callback), 1); - if (callbacks.length === 0) { - elements.delete(element); - observer.unobserve(element); - } - if (elements.size === 0) { - observer.disconnect(); - observerMap.delete(id); - } - }; -} - -// src/InView.tsx -function isPlainChildren(props) { - return typeof props.children !== "function"; -} -var InView = class extends react__WEBPACK_IMPORTED_MODULE_0__.Component { - constructor(props) { - super(props); - __publicField(this, "node", null); - __publicField(this, "_unobserveCb", null); - __publicField(this, "handleNode", (node) => { - if (this.node) { - this.unobserve(); - if (!node && !this.props.triggerOnce && !this.props.skip) { - this.setState({ inView: !!this.props.initialInView, entry: void 0 }); - } - } - this.node = node ? node : null; - this.observeNode(); - }); - __publicField(this, "handleChange", (inView, entry) => { - if (inView && this.props.triggerOnce) { - this.unobserve(); - } - if (!isPlainChildren(this.props)) { - this.setState({ inView, entry }); - } - if (this.props.onChange) { - this.props.onChange(inView, entry); - } - }); - this.state = { - inView: !!props.initialInView, - entry: void 0 - }; - } - componentDidMount() { - this.unobserve(); - this.observeNode(); - } - componentDidUpdate(prevProps) { - if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) { - this.unobserve(); - this.observeNode(); - } - } - componentWillUnmount() { - this.unobserve(); - } - observeNode() { - if (!this.node || this.props.skip) return; - const { - threshold, - root, - rootMargin, - trackVisibility, - delay, - fallbackInView - } = this.props; - this._unobserveCb = observe( - this.node, - this.handleChange, - { - threshold, - root, - rootMargin, - // @ts-ignore - trackVisibility, - // @ts-ignore - delay - }, - fallbackInView - ); - } - unobserve() { - if (this._unobserveCb) { - this._unobserveCb(); - this._unobserveCb = null; - } - } - render() { - const { children } = this.props; - if (typeof children === "function") { - const { inView, entry } = this.state; - return children({ inView, entry, ref: this.handleNode }); - } - const { - as, - triggerOnce, - threshold, - root, - rootMargin, - onChange, - skip, - trackVisibility, - delay, - initialInView, - fallbackInView, - ...props - } = this.props; - return react__WEBPACK_IMPORTED_MODULE_0__.createElement( - as || "div", - { ref: this.handleNode, ...props }, - children - ); - } -}; - -// src/useInView.tsx - -function useInView({ - threshold, - delay, - trackVisibility, - rootMargin, - root, - triggerOnce, - skip, - initialInView, - fallbackInView, - onChange -} = {}) { - var _a; - const [ref, setRef] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); - const callback = react__WEBPACK_IMPORTED_MODULE_0__.useRef(); - const [state, setState] = react__WEBPACK_IMPORTED_MODULE_0__.useState({ - inView: !!initialInView, - entry: void 0 - }); - callback.current = onChange; - react__WEBPACK_IMPORTED_MODULE_0__.useEffect( - () => { - if (skip || !ref) return; - let unobserve; - unobserve = observe( - ref, - (inView, entry) => { - setState({ - inView, - entry - }); - if (callback.current) callback.current(inView, entry); - if (entry.isIntersecting && triggerOnce && unobserve) { - unobserve(); - unobserve = void 0; - } - }, - { - root, - rootMargin, - threshold, - // @ts-ignore - trackVisibility, - // @ts-ignore - delay - }, - fallbackInView - ); - return () => { - if (unobserve) { - unobserve(); - } - }; - }, - // We break the rule here, because we aren't including the actual `threshold` variable - // eslint-disable-next-line react-hooks/exhaustive-deps - [ - // If the threshold is an array, convert it to a string, so it won't change between renders. - Array.isArray(threshold) ? threshold.toString() : threshold, - ref, - root, - rootMargin, - triggerOnce, - skip, - trackVisibility, - fallbackInView, - delay - ] - ); - const entryTarget = (_a = state.entry) == null ? void 0 : _a.target; - const previousEntryTarget = react__WEBPACK_IMPORTED_MODULE_0__.useRef(); - if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) { - previousEntryTarget.current = entryTarget; - setState({ - inView: !!initialInView, - entry: void 0 - }); - } - const result = [setRef, state.inView, state.entry]; - result.ref = result[0]; - result.inView = result[1]; - result.entry = result[2]; - return result; -} - -//# sourceMappingURL=index.mjs.map - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/compat get default export */ -/******/ (() => { -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = (module) => { -/******/ var getter = module && module.__esModule ? -/******/ () => (module['default']) : -/******/ () => (module); -/******/ __webpack_require__.d(getter, { a: getter }); -/******/ return getter; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/global */ -/******/ (() => { -/******/ __webpack_require__.g = (function() { -/******/ if (typeof globalThis === 'object') return globalThis; -/******/ try { -/******/ return this || new Function('return this')(); -/******/ } catch (e) { -/******/ if (typeof window === 'object') return window; -/******/ } -/******/ })(); -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/publicPath */ -/******/ (() => { -/******/ var scriptUrl; -/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; -/******/ var document = __webpack_require__.g.document; -/******/ if (!scriptUrl && document) { -/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') -/******/ scriptUrl = document.currentScript.src; -/******/ if (!scriptUrl) { -/******/ var scripts = document.getElementsByTagName("script"); -/******/ if(scripts.length) { -/******/ var i = scripts.length - 1; -/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; -/******/ } -/******/ } -/******/ } -/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration -/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. -/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); -/******/ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); -/******/ __webpack_require__.p = scriptUrl + "../"; -/******/ })(); -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. -(() => { -"use strict"; -/*!*******************************!*\ - !*** ./src/js/media-modal.js ***! - \*******************************/ -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _components_InstantImages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/InstantImages */ "./src/js/components/InstantImages.js"); -/* harmony import */ var _functions_buildURL__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./functions/buildURL */ "./src/js/functions/buildURL.js"); -/* harmony import */ var _functions_consoleStatus__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./functions/consoleStatus */ "./src/js/functions/consoleStatus.js"); -/* harmony import */ var _functions_getProvider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./functions/getProvider */ "./src/js/functions/getProvider.js"); -/* harmony import */ var _functions_getQueryParams__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./functions/getQueryParams */ "./src/js/functions/getQueryParams.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _functions_session__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./functions/session */ "./src/js/functions/session.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } -function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } - - - - - - - - - -// Global vars -var activeFrameId = ''; -var activeFrame = ''; - -// Load MediaFrame deps -var oldMediaFrame = wp.media.view.MediaFrame.Post; -var oldMediaFrameSelect = wp.media.view.MediaFrame.Select; - -// Create Instant Images Tabs -wp.media.view.MediaFrame.Select = oldMediaFrameSelect.extend({ - // Tab / Router - browseRouter: function browseRouter(routerView) { - var _instant_img_localize; - oldMediaFrameSelect.prototype.browseRouter.apply(this, arguments); - routerView.set({ - instantimages: { - text: (_instant_img_localize = instant_img_localize) === null || _instant_img_localize === void 0 ? void 0 : _instant_img_localize.instant_images, - // eslint-disable-line no-undef - priority: 120 - } - }); - }, - // Handlers - bindHandlers: function bindHandlers() { - oldMediaFrameSelect.prototype.bindHandlers.apply(this, arguments); - this.on('content:create:instantimages', this.frameContent, this); - }, - /** - * Render callback for the content region in the `browse` mode. - */ - frameContent: function frameContent() { - var state = this.state(); - // Get active frame - if (state) { - activeFrameId = state.id; - activeFrame = state.frame.el; - } - }, - /** - * Get the current frame. - * - * @param {string} id The ID. - */ - getFrame: function getFrame(id) { - return this.states.findWhere({ - id: id - }); - } -}); -wp.media.view.MediaFrame.Post = oldMediaFrame.extend({ - // Tab / Router - browseRouter: function browseRouter(routerView) { - var _instant_img_localize2; - oldMediaFrameSelect.prototype.browseRouter.apply(this, arguments); - routerView.set({ - instantimages: { - text: (_instant_img_localize2 = instant_img_localize) === null || _instant_img_localize2 === void 0 ? void 0 : _instant_img_localize2.instant_images, - // eslint-disable-line no-undef - priority: 120 - } - }); - }, - // Handlers - bindHandlers: function bindHandlers() { - oldMediaFrame.prototype.bindHandlers.apply(this, arguments); - this.on('content:create:instantimages', this.frameContent, this); - }, - /** - * Render callback for the content region in the `browse` mode. - */ - frameContent: function frameContent() { - var state = this.state(); - // Get active frame - if (state) { - activeFrameId = state.id; - activeFrame = state.frame.el; - } - }, - getFrame: function getFrame(id) { - return this.states.findWhere({ - id: id - }); - } -}); - -// Render Instant Images -var instantImagesMediaTab = function instantImagesMediaTab() { - if (!activeFrame) { - return false; // Exit if not a frame. - } - var modal = activeFrame.querySelector('.media-frame-content'); // Get all media modals - if (!modal) { - return false; // Exit if not modal. - } - modal.innerHTML = ''; // Clear any existing modals. - - var html = createWrapperHTML(); // Create HTML wrapper - modal.appendChild(html); // Append Instant Images to modal. - - var element = modal.querySelector('#instant-images-media-router-' + activeFrameId); - if (!element) { - return false; // Exit if not element. - } - getMediaModalProvider(element); -}; - -/** - * Get the provider before initializing Instant Images. - * - * @param {Element} element The Instant Images HTML element to initialize. - */ -var getMediaModalProvider = /*#__PURE__*/function () { - var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(element) { - var provider, params, url, sessionData, response, status, headers, results, _results$error, error; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - // Get provider and options from settings. - provider = (0,_functions_getProvider__WEBPACK_IMPORTED_MODULE_4__["default"])(); // Build URL. - params = (0,_functions_getQueryParams__WEBPACK_IMPORTED_MODULE_5__["default"])(provider); - url = (0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_2__["default"])('photos', params); // Get session storage. - sessionData = (0,_functions_session__WEBPACK_IMPORTED_MODULE_7__.getSession)(url); - if (!sessionData) { - _context.next = 8; - break; - } - // Display results from session. - renderApp(element, provider, sessionData, null); - _context.next = 26; - break; - case 8: - _context.next = 10; - return fetch(url); - case 10: - response = _context.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_6__.checkRateLimit)(headers); - _context.prev = 13; - _context.next = 16; - return response.json(); - case 16: - results = _context.sent; - _results$error = results.error, error = _results$error === void 0 ? null : _results$error; - renderApp(element, provider, results, error); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_7__.saveSession)(url, results); - _context.next = 26; - break; - case 22: - _context.prev = 22; - _context.t0 = _context["catch"](13); - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_3__["default"])(provider, status); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_7__.deleteSession)(url); - case 26: - case "end": - return _context.stop(); - } - }, _callee, null, [[13, 22]]); - })); - return function getMediaModalProvider(_x) { - return _ref.apply(this, arguments); - }; -}(); - -/** - * Render the main Instant Images App component. - * - * @param {Element} element The Instant Images HTML element to initialize. - * @param {string} provider The verified provider. - * @param {Array} results The API results. - * @param {object|null} error The API error object. - */ -var renderApp = function renderApp(element, provider, results, error) { - if (_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createRoot) { - var root = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createRoot)(element); - root.render(/*#__PURE__*/React.createElement(_components_InstantImages__WEBPACK_IMPORTED_MODULE_1__["default"], { - editor: "media-modal", - data: results, - container: element, - api_error: error, - provider: provider - })); - } else { - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)(/*#__PURE__*/React.createElement(_components_InstantImages__WEBPACK_IMPORTED_MODULE_1__["default"], { - editor: "media-modal", - data: results, - container: element, - api_error: error, - provider: provider - }), element); - } -}; - -/** - * Create HTML markup to wrap Instant Images. - * - * @return {Element} Create the HTML markup for the media modal. - */ -var createWrapperHTML = function createWrapperHTML() { - var wrapper = document.createElement('div'); - wrapper.classList.add('instant-img-container'); - var container = document.createElement('div'); - container.classList.add('instant-images-wrapper'); - var frame = document.createElement('div'); - frame.setAttribute('id', 'instant-images-media-router-' + activeFrameId); - container.appendChild(frame); - wrapper.appendChild(container); - return wrapper; -}; - -// Document Ready -jQuery(document).ready(function ($) { - if (wp.media) { - // Open - wp.media.view.Modal.prototype.on('open', function () { - if (!activeFrame) { - return false; - } - var selectedTab = activeFrame.querySelector('.media-router button.media-menu-item.active'); - if (selectedTab && selectedTab.id === 'menu-item-instantimages') { - instantImagesMediaTab(); - } - }); - - // Click Handler - $(document).on('click', '.media-router button.media-menu-item', function () { - var selectedTab = activeFrame.querySelector('.media-router button.media-menu-item.active'); - if (selectedTab && selectedTab.id === 'menu-item-instantimages') { - instantImagesMediaTab(); - } - }); - } -}); -})(); - -/******/ })() -; -//# sourceMappingURL=index.js.map \ No newline at end of file +(()=>{var e={955:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],a=[],s=[],c=[],l=[],u=[],f=[],h=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var m=e[n],v=e[m],g=e[v],y=257*e[p]^16843008*p;a[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,c[n]=y<<8|y>>>24,l[n]=y,y=16843009*g^65537*v^257*m^16843008*n,u[p]=y<<24|y>>>8,f[p]=y<<16|y>>>16,h[p]=y<<8|y>>>24,d[p]=y,n?(n=m^e[e[e[g^m]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a6&&a%n==4&&(l=i[l>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l]):(l=i[(l=l<<8|l>>>24)>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l],l^=p[a/n|0]<<24),o[a]=o[a-n]^l);for(var s=this._invKeySchedule=[],c=0;c>>24]]^f[i[l>>>16&255]]^h[i[l>>>8&255]]^d[i[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,l,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,f,h,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,a,s){for(var c=this._nRounds,l=e[t]^n[0],u=e[t+1]^n[1],f=e[t+2]^n[2],h=e[t+3]^n[3],d=4,p=1;p>>24]^i[u>>>16&255]^o[f>>>8&255]^a[255&h]^n[d++],v=r[u>>>24]^i[f>>>16&255]^o[h>>>8&255]^a[255&l]^n[d++],g=r[f>>>24]^i[h>>>16&255]^o[l>>>8&255]^a[255&u]^n[d++],y=r[h>>>24]^i[l>>>16&255]^o[u>>>8&255]^a[255&f]^n[d++];l=m,u=v,f=g,h=y}m=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^n[d++],v=(s[u>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&l])^n[d++],g=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^n[d++],y=(s[h>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&f])^n[d++],e[t]=m,e[t+1]=v,e[t+2]=g,e[t+3]=y},keySize:8});e.AES=t._createHelper(m)}(),r.AES)},3128:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.BlockCipher,n=e.algo;const i=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function c(e,t){let n=t>>24&255,r=t>>16&255,i=t>>8&255,o=255&t,a=e.sbox[0][n]+e.sbox[1][r];return a^=e.sbox[2][i],a+=e.sbox[3][o],a}function l(e,t,n){let r,o=t,a=n;for(let t=0;t=n&&(r=0);let i=0,s=0,c=0;for(let t=0;t<18;t+=2)c=l(e,i,s),i=c.left,s=c.right,e.pbox[t]=i,e.pbox[t+1]=s;for(let t=0;t<4;t++)for(let n=0;n<256;n+=2)c=l(e,i,s),i=c.left,s=c.right,e.sbox[t][n]=i,e.sbox[t][n+1]=s}(s,t,n)}},encryptBlock:function(e,t){var n=l(s,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},decryptBlock:function(e,t){var n=function(e,t,n){let r,i=t,o=n;for(let t=17;t>1;--t)i^=e.pbox[t],o=c(e,i)^o,r=i,i=o,o=r;return r=i,i=o,o=r,o^=e.pbox[1],i^=e.pbox[0],{left:i,right:o}}(s,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=t._createHelper(u)}(),r.Blowfish)},7165:function(e,t,n){var r,i,o,a,s,c,l,u,f,h,d,p,m,v,g,y,b,_,w;e.exports=(r=n(9021),n(9506),void(r.lib.Cipher||(i=r,o=i.lib,a=o.Base,s=o.WordArray,c=o.BufferedBlockAlgorithm,l=i.enc,l.Utf8,u=l.Base64,f=i.algo.EvpKDF,h=o.Cipher=c.extend({cfg:a.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){c.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?w:b}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),o.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),d=i.mode={},p=o.BlockCipherMode=a.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),m=d.CBC=function(){var e=p.extend();function t(e,t,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},o.BlockCipher=h.extend({cfg:h.cfg.extend({mode:m,padding:v}),reset:function(){var e;h.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),g=o.CipherParams=a.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),y=(i.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?s.create([1398893684,1701076831]).concat(n).concat(t):t).toString(u)},parse:function(e){var t,n=u.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=s.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:t})}},b=o.SerializableCipher=a.extend({cfg:a.extend({format:y}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),a=i.cfg;return g.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=(i.kdf={}).OpenSSL={execute:function(e,t,n,r,i){if(r||(r=s.random(8)),i)o=f.create({keySize:t+n,hasher:i}).compute(e,r);else var o=f.create({keySize:t+n}).compute(e,r);var a=s.create(o.words.slice(t),4*n);return o.sigBytes=4*t,g.create({key:o,iv:a,salt:r})}},w=o.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:_}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=i.iv;var o=b.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=i.iv,b.decrypt.call(this,e,t,i.key,r)}}))))},9021:function(e,t,n){var r;e.exports=(r=r||function(e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),"undefined"!=typeof self&&self.crypto&&(t=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(t=globalThis.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&void 0!==n.g&&n.g.crypto&&(t=n.g.crypto),!t)try{t=n(477)}catch(e){}var r=function(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},a=o.lib={},s=a.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new c.init(n,t/2)}},f=l.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new c.init(n,t)}},h=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},d=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),l=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,u=e.min(4*l,o);if(l){for(var f=0;f>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var c=r.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i>>6-a%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return o.create(r,i)}(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},r.enc.Base64)},4725:function(e,t,n){var r,i,o;e.exports=(r=n(9021),o=(i=r).lib.WordArray,i.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var n=e.words,r=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,c=0;c<4&&a+.75*c>>6*(3-c)&63));var l=i.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("")},parse:function(e,t){void 0===t&&(t=!0);var n=e.length,r=t?this._safe_map:this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var a=0;a>>6-a%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return o.create(r,i)}(e,n,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},r.enc.Base64url)},5503:function(e,t,n){var r;e.exports=(r=n(9021),function(){var e=r,t=e.lib.WordArray,n=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var n=e.length,r=[],i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(r,2*n)}},n.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var n=e.length,r=[],o=0;o>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(r,2*n)}}}(),r.enc.Utf16)},9506:function(e,t,n){var r,i,o,a,s,c,l,u;e.exports=(u=n(9021),n(5471),n(1025),o=(i=(r=u).lib).Base,a=i.WordArray,c=(s=r.algo).MD5,l=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,i=r.hasher.create(),o=a.create(),s=o.words,c=r.keySize,l=r.iterations;s.lengthr&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),s=i.words,c=a.words,l=0;l>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)};n.prototype=e}}(),r.lib.WordArray)},4636:function(e,t,n){var r;e.exports=(r=n(9021),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var c=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],c=e[t+1],d=e[t+2],p=e[t+3],m=e[t+4],v=e[t+5],g=e[t+6],y=e[t+7],b=e[t+8],_=e[t+9],w=e[t+10],E=e[t+11],S=e[t+12],R=e[t+13],x=e[t+14],k=e[t+15],O=o[0],C=o[1],A=o[2],L=o[3];O=l(O,C,A,L,a,7,s[0]),L=l(L,O,C,A,c,12,s[1]),A=l(A,L,O,C,d,17,s[2]),C=l(C,A,L,O,p,22,s[3]),O=l(O,C,A,L,m,7,s[4]),L=l(L,O,C,A,v,12,s[5]),A=l(A,L,O,C,g,17,s[6]),C=l(C,A,L,O,y,22,s[7]),O=l(O,C,A,L,b,7,s[8]),L=l(L,O,C,A,_,12,s[9]),A=l(A,L,O,C,w,17,s[10]),C=l(C,A,L,O,E,22,s[11]),O=l(O,C,A,L,S,7,s[12]),L=l(L,O,C,A,R,12,s[13]),A=l(A,L,O,C,x,17,s[14]),O=u(O,C=l(C,A,L,O,k,22,s[15]),A,L,c,5,s[16]),L=u(L,O,C,A,g,9,s[17]),A=u(A,L,O,C,E,14,s[18]),C=u(C,A,L,O,a,20,s[19]),O=u(O,C,A,L,v,5,s[20]),L=u(L,O,C,A,w,9,s[21]),A=u(A,L,O,C,k,14,s[22]),C=u(C,A,L,O,m,20,s[23]),O=u(O,C,A,L,_,5,s[24]),L=u(L,O,C,A,x,9,s[25]),A=u(A,L,O,C,p,14,s[26]),C=u(C,A,L,O,b,20,s[27]),O=u(O,C,A,L,R,5,s[28]),L=u(L,O,C,A,d,9,s[29]),A=u(A,L,O,C,y,14,s[30]),O=f(O,C=u(C,A,L,O,S,20,s[31]),A,L,v,4,s[32]),L=f(L,O,C,A,b,11,s[33]),A=f(A,L,O,C,E,16,s[34]),C=f(C,A,L,O,x,23,s[35]),O=f(O,C,A,L,c,4,s[36]),L=f(L,O,C,A,m,11,s[37]),A=f(A,L,O,C,y,16,s[38]),C=f(C,A,L,O,w,23,s[39]),O=f(O,C,A,L,R,4,s[40]),L=f(L,O,C,A,a,11,s[41]),A=f(A,L,O,C,p,16,s[42]),C=f(C,A,L,O,g,23,s[43]),O=f(O,C,A,L,_,4,s[44]),L=f(L,O,C,A,S,11,s[45]),A=f(A,L,O,C,k,16,s[46]),O=h(O,C=f(C,A,L,O,d,23,s[47]),A,L,a,6,s[48]),L=h(L,O,C,A,y,10,s[49]),A=h(A,L,O,C,x,15,s[50]),C=h(C,A,L,O,v,21,s[51]),O=h(O,C,A,L,S,6,s[52]),L=h(L,O,C,A,p,10,s[53]),A=h(A,L,O,C,w,15,s[54]),C=h(C,A,L,O,c,21,s[55]),O=h(O,C,A,L,b,6,s[56]),L=h(L,O,C,A,k,10,s[57]),A=h(A,L,O,C,g,15,s[58]),C=h(C,A,L,O,R,21,s[59]),O=h(O,C,A,L,m,6,s[60]),L=h(L,O,C,A,E,10,s[61]),A=h(A,L,O,C,d,15,s[62]),C=h(C,A,L,O,_,21,s[63]),o[0]=o[0]+O|0,o[1]=o[1]+C|0,o[2]=o[2]+A|0,o[3]=o[3]+L|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+i+a;return(s<>>32-o)+t}function u(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+i+a;return(s<>>32-o)+t}function f(e,t,n,r,i,o,a){var s=e+(t^n^r)+i+a;return(s<>>32-o)+t}function h(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+i+a;return(s<>>32-o)+t}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)}(Math),r.MD5)},2169:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();function t(e,t,n,r){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var a=0;a>24))e+=1<<24;else{var t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}return e}var n=e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(a);var s=a.slice(0);r.encryptBlock(s,0);for(var c=0;c>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Ansix923)},4905:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)},482:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)},8124:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},2155:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},r.pad.ZeroPadding)},19:function(e,t,n){var r,i,o,a,s,c,l,u,f;e.exports=(f=n(9021),n(3009),n(1025),o=(i=(r=f).lib).Base,a=i.WordArray,c=(s=r.algo).SHA256,l=s.HMAC,u=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=l.create(n.hasher,e),i=a.create(),o=a.create([1]),s=i.words,c=o.words,u=n.keySize,f=n.iterations;s.length>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=l>>>16|4294901760&u,h=u<<16|65535&l;for(r[0]^=l,r[1]^=f,r[2]^=u,r[3]^=h,r[4]^=l,r[5]^=f,r[6]^=u,r[7]^=h,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)},6298:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)c.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var o=t.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=l>>>16|4294901760&u,h=u<<16|65535&l;for(i[0]^=l,i[1]^=f,i[2]^=u,i[3]^=h,i[4]^=l,i[5]^=f,i[6]^=u,i[7]^=h,n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)},7193:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var a=i%n,s=t[a>>>2]>>>24-a%4*8&255;o=(o+r[i]+s)%256;var c=r[i];r[i]=r[o],r[o]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}e.RC4=t._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),r.RC4)},8056:function(e,t,n){var r;e.exports=(r=n(9021),function(){var e=r,t=e.lib,n=t.WordArray,i=t.Hasher,o=e.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),f=n.create([1352829926,1548603684,1836072691,2053994217,0]),h=o.RIPEMD160=i.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,h,b,_,w,E,S,R,x,k,O,C=this._hash.words,A=u.words,L=f.words,B=a.words,N=s.words,j=c.words,T=l.words;for(E=o=C[0],S=h=C[1],R=b=C[2],x=_=C[3],k=w=C[4],n=0;n<80;n+=1)O=o+e[t+B[n]]|0,O+=n<16?d(h,b,_)+A[0]:n<32?p(h,b,_)+A[1]:n<48?m(h,b,_)+A[2]:n<64?v(h,b,_)+A[3]:g(h,b,_)+A[4],O=(O=y(O|=0,j[n]))+w|0,o=w,w=_,_=y(b,10),b=h,h=O,O=E+e[t+N[n]]|0,O+=n<16?g(S,R,x)+L[0]:n<32?v(S,R,x)+L[1]:n<48?m(S,R,x)+L[2]:n<64?p(S,R,x)+L[3]:d(S,R,x)+L[4],O=(O=y(O|=0,T[n]))+k|0,E=k,k=x,x=y(R,10),R=S,S=O;O=C[1]+b+x|0,C[1]=C[2]+_+k|0,C[2]=C[3]+w+E|0,C[3]=C[4]+o+S|0,C[4]=C[0]+h+R|0,C[0]=O},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,n){return e^t^n}function p(e,t,n){return e&t|~e&n}function m(e,t,n){return(e|~t)^n}function v(e,t,n){return e&n|t&~n}function g(e,t,n){return e^(t|~n)}function y(e,t){return e<>>32-t}e.RIPEMD160=i._createHelper(h),e.HmacRIPEMD160=i._createHmacHelper(h)}(Math),r.RIPEMD160)},5471:function(e,t,n){var r,i,o,a,s,c,l,u;e.exports=(i=(r=u=n(9021)).lib,o=i.WordArray,a=i.Hasher,s=r.algo,c=[],l=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=0;l<80;l++){if(l<16)c[l]=0|e[t+l];else{var u=c[l-3]^c[l-8]^c[l-14]^c[l-16];c[l]=u<<1|u>>>31}var f=(r<<5|r>>>27)+s+c[l];f+=l<20?1518500249+(i&o|~i&a):l<40?1859775393+(i^o^a):l<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=a._createHelper(l),r.HmacSHA1=a._createHmacHelper(l),u.SHA1)},6308:function(e,t,n){var r,i,o,a,s,c;e.exports=(c=n(9021),n(3009),i=(r=c).lib.WordArray,o=r.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),r.SHA224=a._createHelper(s),r.HmacSHA224=a._createHmacHelper(s),c.SHA224)},3009:function(e,t,n){var r;e.exports=(r=n(9021),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[],c=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=n(e.pow(r,.5))),c[i]=n(e.pow(r,1/3)),i++),r++}();var l=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=0;d<64;d++){if(d<16)l[d]=0|e[t+d];else{var p=l[d-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=l[d-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;l[d]=m+l[d-7]+g+l[d-16]}var y=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),_=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&f)+c[d]+l[d];h=f,f=u,u=s,s=a+_|0,a=o,o=i,i=r,r=_+(b+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+f|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),r.SHA256)},5953:function(e,t,n){var r;e.exports=(r=n(9021),n(3240),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.x64.Word,s=t.algo,c=[],l=[],u=[];!function(){for(var e=1,t=0,n=0;n<24;n++){c[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)l[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,f=0,h=0;h<7;h++){if(1&i){var d=(1<>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(C=n[i]).high^=a,C.low^=o}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var d=0,p=0,m=0;m<5;m++)d^=(C=n[h+5*m]).high,p^=C.low;var v=f[h];v.high=d,v.low=p}for(h=0;h<5;h++){var g=f[(h+4)%5],y=f[(h+1)%5],b=y.high,_=y.low;for(d=g.high^(b<<1|_>>>31),p=g.low^(_<<1|b>>>31),m=0;m<5;m++)(C=n[h+5*m]).high^=d,C.low^=p}for(var w=1;w<25;w++){var E=(C=n[w]).high,S=C.low,R=c[w];R<32?(d=E<>>32-R,p=S<>>32-R):(d=S<>>64-R,p=E<>>64-R);var x=f[l[w]];x.high=d,x.low=p}var k=f[0],O=n[0];for(k.high=O.high,k.low=O.low,h=0;h<5;h++)for(m=0;m<5;m++){var C=n[w=h+5*m],A=f[w],L=f[(h+1)%5+5*m],B=f[(h+2)%5+5*m];C.high=A.high^~L.high&B.high,C.low=A.low^~L.low&B.low}C=n[0];var N=u[s];C.high^=N.high,C.low^=N.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,c=s/8,l=[],u=0;u>>24)|4278255360&(h<<24|h>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),l.push(d),l.push(h)}return new i.init(l,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=o._createHelper(h),t.HmacSHA3=o._createHmacHelper(h)}(Math),r.SHA3)},9557:function(e,t,n){var r,i,o,a,s,c,l,u;e.exports=(u=n(9021),n(3240),n(1380),i=(r=u).x64,o=i.Word,a=i.WordArray,s=r.algo,c=s.SHA512,l=s.SHA384=c.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var e=c._doFinalize.call(this);return e.sigBytes-=16,e}}),r.SHA384=c._createHelper(l),r.HmacSHA384=c._createHmacHelper(l),u.SHA384)},1380:function(e,t,n){var r;e.exports=(r=n(9021),n(3240),function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],l=[];!function(){for(var e=0;e<80;e++)l[e]=s()}();var u=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=r.high,p=r.low,m=i.high,v=i.low,g=o.high,y=o.low,b=a.high,_=a.low,w=s.high,E=s.low,S=u.high,R=u.low,x=f.high,k=f.low,O=h.high,C=h.low,A=d,L=p,B=m,N=v,j=g,T=y,P=b,z=_,I=w,M=E,D=S,F=R,H=x,W=k,U=O,q=C,V=0;V<80;V++){var G,Y,J=l[V];if(V<16)Y=J.high=0|e[t+2*V],G=J.low=0|e[t+2*V+1];else{var K=l[V-15],$=K.high,X=K.low,Z=($>>>1|X<<31)^($>>>8|X<<24)^$>>>7,Q=(X>>>1|$<<31)^(X>>>8|$<<24)^(X>>>7|$<<25),ee=l[V-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=l[V-7],ae=oe.high,se=oe.low,ce=l[V-16],le=ce.high,ue=ce.low;Y=(Y=(Y=Z+ae+((G=Q+se)>>>0>>0?1:0))+re+((G+=ie)>>>0>>0?1:0))+le+((G+=ue)>>>0>>0?1:0),J.high=Y,J.low=G}var fe,he=I&D^~I&H,de=M&F^~M&W,pe=A&B^A&j^B&j,me=L&N^L&T^N&T,ve=(A>>>28|L<<4)^(A<<30|L>>>2)^(A<<25|L>>>7),ge=(L>>>28|A<<4)^(L<<30|A>>>2)^(L<<25|A>>>7),ye=(I>>>14|M<<18)^(I>>>18|M<<14)^(I<<23|M>>>9),be=(M>>>14|I<<18)^(M>>>18|I<<14)^(M<<23|I>>>9),_e=c[V],we=_e.high,Ee=_e.low,Se=U+ye+((fe=q+be)>>>0>>0?1:0),Re=ge+me;U=H,q=W,H=D,W=F,D=I,F=M,I=P+(Se=(Se=(Se=Se+he+((fe+=de)>>>0>>0?1:0))+we+((fe+=Ee)>>>0>>0?1:0))+Y+((fe+=G)>>>0>>0?1:0))+((M=z+fe|0)>>>0>>0?1:0)|0,P=j,z=T,j=B,T=N,B=A,N=L,A=Se+(ve+pe+(Re>>>0>>0?1:0))+((L=fe+Re|0)>>>0>>0?1:0)|0}p=r.low=p+L,r.high=d+A+(p>>>0>>0?1:0),v=i.low=v+N,i.high=m+B+(v>>>0>>0?1:0),y=o.low=y+T,o.high=g+j+(y>>>0>>0?1:0),_=a.low=_+z,a.high=b+P+(_>>>0>>0?1:0),E=s.low=E+M,s.high=w+I+(E>>>0>>0?1:0),R=u.low=R+F,u.high=S+D+(R>>>0>>0?1:0),k=f.low=k+W,f.high=x+H+(k>>>0>>0?1:0),C=h.low=C+q,h.high=O+U+(C>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(u),e.HmacSHA512=t._createHmacHelper(u)}(),r.SHA512)},7628:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=a[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var l=i[o]=[],u=c[o];for(n=0;n<24;n++)l[n/6|0]|=t[(s[n]-1+u)%28]<<31-n%6,l[4+(n/6|0)]|=t[28+(s[n+24]-1+u)%28]<<31-n%6;for(l[0]=l[0]<<1|l[0]>>>31,n=1;n<7;n++)l[n]=l[n]>>>4*(n-1)+3;l[7]=l[7]<<5|l[7]>>>27}var f=this._invSubKeys=[];for(n=0;n<16;n++)f[n]=i[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,a=this._rBlock,s=0,c=0;c<8;c++)s|=l[c][((a^i[c])&u[c])>>>0];this._lBlock=a,this._rBlock=o^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,h.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=f.createEncryptor(n.create(t)),this._des2=f.createEncryptor(n.create(r)),this._des3=f.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),r.TripleDES)},3240:function(e,t,n){var r,i,o,a,s,c;e.exports=(r=n(9021),o=(i=r).lib,a=o.Base,s=o.WordArray,(c=i.x64={}).Word=a.extend({init:function(e,t){this.high=e,this.low=t}}),c.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r{var r,i;!function(o,a){"use strict";void 0===(i="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=i)}(window,(function(){"use strict";var e=function(){var e=window.Element.prototype;if(e.matches)return"matches";if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],n=0;n{var r,i;!function(o){r=[n(9786)],i=function(e){return function(e,t){"use strict";var n={extend:function(e,t){for(var n in t)e[n]=t[n];return e},modulo:function(e,t){return(e%t+t)%t}},r=Array.prototype.slice;n.makeArray=function(e){return Array.isArray(e)?e:null==e?[]:"object"==typeof e&&"number"==typeof e.length?r.call(e):[e]},n.removeFrom=function(e,t){var n=e.indexOf(t);-1!=n&&e.splice(n,1)},n.getParent=function(e,n){for(;e.parentNode&&e!=document.body;)if(e=e.parentNode,t(e,n))return e},n.getQueryElement=function(e){return"string"==typeof e?document.querySelector(e):e},n.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},n.filterFindElements=function(e,r){e=n.makeArray(e);var i=[];return e.forEach((function(e){if(e instanceof HTMLElement)if(r){t(e,r)&&i.push(e);for(var n=e.querySelectorAll(r),o=0;o{var r,i;window,void 0===(i="function"==typeof(r=function(){"use strict";function e(e){var t=parseFloat(e);return-1==e.indexOf("%")&&!isNaN(t)&&t}var t="undefined"==typeof console?function(){}:function(e){console.error(e)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],r=n.length;function i(e){var n=getComputedStyle(e);return n||t("Style returned "+n+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),n}var o,a=!1;function s(t){if(function(){if(!a){a=!0;var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(t);var r=i(t);o=200==Math.round(e(r.width)),s.isBoxSizeOuter=o,n.removeChild(t)}}(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var c=i(t);if("none"==c.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t{setTimeout((()=>{this.progress(e,t,n)}))};this.images.forEach((function(t){t.once("progress",e),t.check()}))},i.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&r&&r.log(`progress: ${n}`,e,t)},i.prototype.complete=function(){let e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){let e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},s.prototype=Object.create(t.prototype),s.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},s.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},s.prototype.confirm=function(e,t){this.isLoaded=e;let{parentNode:n}=this.img,r="PICTURE"===n.nodeName?n:this.img;this.emitEvent("progress",[this,r,t])},s.prototype.handleEvent=function(e){let t="on"+e.type;this[t]&&this[t](e)},s.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},s.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},s.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype=Object.create(s.prototype),c.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},c.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},i.makeJQueryPlugin=function(t){(t=t||e.jQuery)&&(n=t,n.fn.imagesLoaded=function(e,t){return new i(this,e,t).jqDeferred.promise(n(this))})},i.makeJQueryPlugin(),i}))},6994:(e,t,n)=>{var r,i,o;window,i=[n(2831),n(1485)],void 0===(o="function"==typeof(r=function(e,t){"use strict";var n=e.create("masonry");n.compatOptions.fitWidth="isFitWidth";var r=n.prototype;return r._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var e=0;e1&&n+e>this.cols?0:n;var r=t.size.outerWidth&&t.size.outerHeight;return this.horizontalColIndex=r?n+e:this.horizontalColIndex,{col:n,y:this._getColGroupY(n,e)}},r._manageStamp=function(e){var n=t(e),r=this._getElementOffset(e),i=this._getOption("originLeft")?r.left:r.right,o=i+n.outerWidth,a=Math.floor(i/this.columnWidth);a=Math.max(0,a);var s=Math.floor(o/this.columnWidth);s-=o%this.columnWidth?0:1,s=Math.min(this.cols-1,s);for(var c=(this._getOption("originTop")?r.top:r.bottom)+n.outerHeight,l=a;l<=s;l++)this.colYs[l]=Math.max(c,this.colYs[l])},r._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var e={height:this.maxY};return this._getOption("fitWidth")&&(e.width=this._getContainerFitWidth()),e},r._getContainerFitWidth=function(){for(var e=0,t=this.cols;--t&&0===this.colYs[t];)e++;return(this.cols-e)*this.columnWidth-this.gutter},r.needsResizeLayout=function(){var e=this.containerWidth;return this.getContainerWidth(),e!=this.containerWidth},n})?r.apply(t,i):r)||(e.exports=o)},3169:(e,t,n)=>{var r,i,o;window,i=[n(7738),n(1485)],void 0===(o="function"==typeof(r=function(e,t){"use strict";var n=document.documentElement.style,r="string"==typeof n.transition?"transition":"WebkitTransition",i="string"==typeof n.transform?"transform":"WebkitTransform",o={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],a={transform:i,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"};function s(e,t){e&&(this.element=e,this.layout=t,this.position={x:0,y:0},this._create())}var c=s.prototype=Object.create(e.prototype);c.constructor=s,c._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},c.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.getSize=function(){this.size=t(this.element)},c.css=function(e){var t=this.element.style;for(var n in e)t[a[n]||n]=e[n]},c.getPosition=function(){var e=getComputedStyle(this.element),t=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),r=e[t?"left":"right"],i=e[n?"top":"bottom"],o=parseFloat(r),a=parseFloat(i),s=this.layout.size;-1!=r.indexOf("%")&&(o=o/100*s.width),-1!=i.indexOf("%")&&(a=a/100*s.height),o=isNaN(o)?0:o,a=isNaN(a)?0:a,o-=t?s.paddingLeft:s.paddingRight,a-=n?s.paddingTop:s.paddingBottom,this.position.x=o,this.position.y=a},c.layoutPosition=function(){var e=this.layout.size,t={},n=this.layout._getOption("originLeft"),r=this.layout._getOption("originTop"),i=n?"paddingLeft":"paddingRight",o=n?"left":"right",a=n?"right":"left",s=this.position.x+e[i];t[o]=this.getXValue(s),t[a]="";var c=r?"paddingTop":"paddingBottom",l=r?"top":"bottom",u=r?"bottom":"top",f=this.position.y+e[c];t[l]=this.getYValue(f),t[u]="",this.css(t),this.emitEvent("layout",[this])},c.getXValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!t?e/this.layout.size.width*100+"%":e+"px"},c.getYValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&t?e/this.layout.size.height*100+"%":e+"px"},c._transitionTo=function(e,t){this.getPosition();var n=this.position.x,r=this.position.y,i=e==this.position.x&&t==this.position.y;if(this.setPosition(e,t),!i||this.isTransitioning){var o=e-n,a=t-r,s={};s.transform=this.getTranslate(o,a),this.transition({to:s,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},c.getTranslate=function(e,t){return"translate3d("+(e=this.layout._getOption("originLeft")?e:-e)+"px, "+(t=this.layout._getOption("originTop")?t:-t)+"px, 0)"},c.goTo=function(e,t){this.setPosition(e,t),this.layoutPosition()},c.moveTo=c._transitionTo,c.setPosition=function(e,t){this.position.x=parseFloat(e),this.position.y=parseFloat(t)},c._nonTransition=function(e){for(var t in this.css(e.to),e.isCleaning&&this._removeStyles(e.to),e.onTransitionEnd)e.onTransitionEnd[t].call(this)},c.transition=function(e){if(parseFloat(this.layout.options.transitionDuration)){var t=this._transn;for(var n in e.onTransitionEnd)t.onEnd[n]=e.onTransitionEnd[n];for(n in e.to)t.ingProperties[n]=!0,e.isCleaning&&(t.clean[n]=!0);e.from&&(this.css(e.from),this.element.offsetHeight),this.enableTransition(e.to),this.css(e.to),this.isTransitioning=!0}else this._nonTransition(e)};var l="opacity,"+i.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}));c.enableTransition=function(){if(!this.isTransitioning){var e=this.layout.options.transitionDuration;e="number"==typeof e?e+"ms":e,this.css({transitionProperty:l,transitionDuration:e,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(o,this,!1)}},c.onwebkitTransitionEnd=function(e){this.ontransitionend(e)},c.onotransitionend=function(e){this.ontransitionend(e)};var u={"-webkit-transform":"transform"};c.ontransitionend=function(e){if(e.target===this.element){var t=this._transn,n=u[e.propertyName]||e.propertyName;delete t.ingProperties[n],function(e){for(var t in e)return!1;return!0}(t.ingProperties)&&this.disableTransition(),n in t.clean&&(this.element.style[e.propertyName]="",delete t.clean[n]),n in t.onEnd&&(t.onEnd[n].call(this),delete t.onEnd[n]),this.emitEvent("transitionEnd",[this])}},c.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},c._removeStyles=function(e){var t={};for(var n in e)t[n]="";this.css(t)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return c.removeTransitionStyles=function(){this.css(f)},c.stagger=function(e){e=isNaN(e)?0:e,this.staggerDelay=e+"ms"},c.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},c.remove=function(){r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",(function(){this.removeElem()})),this.hide()):this.removeElem()},c.reveal=function(){delete this.isHidden,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:e.hiddenStyle,to:e.visibleStyle,isCleaning:!0,onTransitionEnd:t})},c.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},c.getHideRevealTransitionEndProperty=function(e){var t=this.layout.options[e];if(t.opacity)return"opacity";for(var n in t)return n},c.hide=function(){this.isHidden=!0,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:e.visibleStyle,to:e.hiddenStyle,isCleaning:!0,onTransitionEnd:t})},c.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},c.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},s})?r.apply(t,i):r)||(e.exports=o)},7738:function(e,t,n){var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},r=n[e]=n[e]||[];return-1==r.indexOf(t)&&r.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var r=n.indexOf(t);return-1!=r&&n.splice(r,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var r=this._onceEvents&&this._onceEvents[e],i=0;i{var r,i;!function(o){"use strict";r=[n(7738),n(1485),n(977),n(3169)],i=function(e,t,n,r){return function(e,t,n,r,i){var o=e.console,a=e.jQuery,s=function(){},c=0,l={};function u(e,t){var n=r.getQueryElement(e);if(n){this.element=n,a&&(this.$element=a(this.element)),this.options=r.extend({},this.constructor.defaults),this.option(t);var i=++c;this.element.outlayerGUID=i,l[i]=this,this._create(),this._getOption("initLayout")&&this.layout()}else o&&o.error("Bad element for "+this.constructor.namespace+": "+(n||e))}u.namespace="outlayer",u.Item=i,u.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=u.prototype;function h(e){function t(){e.apply(this,arguments)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t}r.extend(f,t.prototype),f.option=function(e){r.extend(this.options,e)},f._getOption=function(e){var t=this.constructor.compatOptions[e];return t&&void 0!==this.options[t]?this.options[t]:this.options[e]},u.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),r.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(e){for(var t=this._filterFindItemElements(e),n=this.constructor.Item,r=[],i=0;i{},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=r[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e+"../"})(),(()=>{"use strict";var e={};n.r(e),n.d(e,{hasBrowserEnv:()=>he,hasStandardBrowserEnv:()=>pe,hasStandardBrowserWebWorkerEnv:()=>me,navigator:()=>de,origin:()=>ve});const t=window.wp.element;function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:o}=Object,a=(s=Object.create(null),e=>{const t=i.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())});var s;const c=e=>(e=e.toLowerCase(),t=>a(t)===e),l=e=>t=>typeof t===e,{isArray:u}=Array,f=l("undefined"),h=c("ArrayBuffer"),d=l("string"),p=l("function"),m=l("number"),v=e=>null!==e&&"object"==typeof e,g=e=>{if("object"!==a(e))return!1;const t=o(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},y=c("Date"),b=c("File"),_=c("Blob"),w=c("FileList"),E=c("URLSearchParams"),[S,R,x,k]=["ReadableStream","Request","Response","Headers"].map(c);function O(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),u(e))for(r=0,i=e.length;r0;)if(r=n[i],t===r.toLowerCase())return r;return null}const A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,L=e=>!f(e)&&e!==A,B=(N="undefined"!=typeof Uint8Array&&o(Uint8Array),e=>N&&e instanceof N);var N;const j=c("HTMLFormElement"),T=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),P=c("RegExp"),z=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};O(n,((n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)})),Object.defineProperties(e,r)},I="abcdefghijklmnopqrstuvwxyz",M="0123456789",D={DIGIT:M,ALPHA:I,ALPHA_DIGIT:I+I.toUpperCase()+M},F=c("AsyncFunction"),H=(W="function"==typeof setImmediate,U=p(A.postMessage),W?setImmediate:U?(q=`axios@${Math.random()}`,V=[],A.addEventListener("message",(({source:e,data:t})=>{e===A&&t===q&&V.length&&V.shift()()}),!1),e=>{V.push(e),A.postMessage(q,"*")}):e=>setTimeout(e));var W,U,q,V;const G="undefined"!=typeof queueMicrotask?queueMicrotask.bind(A):"undefined"!=typeof process&&process.nextTick||H,Y={isArray:u,isArrayBuffer:h,isBuffer:function(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||p(e.append)&&("formdata"===(t=a(e))||"object"===t&&p(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer),t},isString:d,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:v,isPlainObject:g,isReadableStream:S,isRequest:R,isResponse:x,isHeaders:k,isUndefined:f,isDate:y,isFile:b,isBlob:_,isRegExp:P,isFunction:p,isStream:e=>v(e)&&p(e.pipe),isURLSearchParams:E,isTypedArray:B,isFileList:w,forEach:O,merge:function e(){const{caseless:t}=L(this)&&this||{},n={},r=(r,i)=>{const o=t&&C(n,i)||i;g(n[o])&&g(r)?n[o]=e(n[o],r):g(r)?n[o]=e({},r):u(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e(O(t,((t,i)=>{n&&p(t)?e[i]=r(t,n):e[i]=t}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,a,s;const c={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)s=i[a],r&&!r(s,e,t)||c[s]||(t[s]=e[s],c[s]=!0);e=!1!==n&&o(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(u(e))return e;let t=e.length;if(!m(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:j,hasOwnProperty:T,hasOwnProp:T,reduceDescriptors:z,freezeMethods:e=>{z(e,((t,n)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];p(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return u(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:C,global:A,isContextDefined:L,ALPHABET:D,generateString:(e=16,t=D.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&p(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(v(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=u(e)?[]:{};return O(e,((e,t)=>{const o=n(e,r+1);!f(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:F,isThenable:e=>e&&(v(e)||p(e))&&p(e.then)&&p(e.catch),setImmediate:H,asap:G};function J(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}Y.inherits(J,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Y.toJSONObject(this.config),code:this.code,status:this.status}}});const K=J.prototype,$={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{$[e]={value:e}})),Object.defineProperties(J,$),Object.defineProperty(K,"isAxiosError",{value:!0}),J.from=(e,t,n,r,i,o)=>{const a=Object.create(K);return Y.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),J.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const X=J;function Z(e){return Y.isPlainObject(e)||Y.isArray(e)}function Q(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function ee(e,t,n){return e?e.concat(t).map((function(e,t){return e=Q(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const te=Y.toFlatObject(Y,{},null,(function(e){return/^is[A-Z]/.test(e)})),ne=function(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Y.isUndefined(t[e])}))).metaTokens,i=n.visitor||l,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Y.isSpecCompliantForm(t);if(!Y.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Y.isDate(e))return e.toISOString();if(!s&&Y.isBlob(e))throw new X("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(e)||Y.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let s=e;if(e&&!i&&"object"==typeof e)if(Y.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Y.isArray(e)&&function(e){return Y.isArray(e)&&!e.some(Z)}(e)||(Y.isFileList(e)||Y.endsWith(n,"[]"))&&(s=Y.toArray(e)))return n=Q(n),s.forEach((function(e,r){!Y.isUndefined(e)&&null!==e&&t.append(!0===a?ee([n],r,o):null===a?n:n+"[]",c(e))})),!1;return!!Z(e)||(t.append(ee(i,n,o),c(e)),!1)}const u=[],f=Object.assign(te,{defaultVisitor:l,convertValue:c,isVisitable:Z});if(!Y.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Y.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Y.forEach(n,(function(n,o){!0===(!(Y.isUndefined(n)||null===n)&&i.call(t,n,Y.isString(o)?o.trim():o,r,f))&&e(n,r?r.concat(o):[o])})),u.pop()}}(e),t};function re(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ie(e,t){this._pairs=[],e&&ne(e,this,t)}const oe=ie.prototype;oe.append=function(e,t){this._pairs.push([e,t])},oe.toString=function(e){const t=e?function(t){return e.call(this,t,re)}:re;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ae=ie;function se(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ce(e,t,n){if(!t)return e;const r=n&&n.encode||se,i=n&&n.serialize;let o;if(o=i?i(t,n):Y.isURLSearchParams(t)?t.toString():new ae(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const le=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Y.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ue={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ae,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},he="undefined"!=typeof window&&"undefined"!=typeof document,de="object"==typeof navigator&&navigator||void 0,pe=he&&(!de||["ReactNative","NativeScript","NS"].indexOf(de.product)<0),me="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ve=he&&window.location.href||"http://localhost",ge={...e,...fe},ye=function(e){function t(e,n,r,i){let o=e[i++];if("__proto__"===o)return!0;const a=Number.isFinite(+o),s=i>=e.length;return o=!o&&Y.isArray(r)?r.length:o,s?(Y.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):(r[o]&&Y.isObject(r[o])||(r[o]=[]),t(e,n,r[o],i)&&Y.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r{t(function(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},be={transitional:ue,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=Y.isObject(e);if(i&&Y.isHTMLForm(e)&&(e=new FormData(e)),Y.isFormData(e))return r?JSON.stringify(ye(e)):e;if(Y.isArrayBuffer(e)||Y.isBuffer(e)||Y.isStream(e)||Y.isFile(e)||Y.isBlob(e)||Y.isReadableStream(e))return e;if(Y.isArrayBufferView(e))return e.buffer;if(Y.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ne(e,new ge.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ge.isNode&&Y.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=Y.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ne(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e){if(Y.isString(e))try{return(0,JSON.parse)(e),Y.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||be.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Y.isResponse(e)||Y.isReadableStream(e))return e;if(e&&Y.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw X.from(e,X.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Y.forEach(["delete","get","head","post","put","patch"],(e=>{be.headers[e]={}}));const _e=be,we=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ee=Symbol("internals");function Se(e){return e&&String(e).trim().toLowerCase()}function Re(e){return!1===e||null==e?e:Y.isArray(e)?e.map(Re):String(e)}function xe(e,t,n,r,i){return Y.isFunction(r)?r.call(this,t,n):(i&&(t=n),Y.isString(t)?Y.isString(r)?-1!==t.indexOf(r):Y.isRegExp(r)?r.test(t):void 0:void 0)}class ke{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Se(t);if(!i)throw new Error("header name must be a non-empty string");const o=Y.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=Re(e))}const o=(e,t)=>Y.forEach(e,((e,n)=>i(e,n,t)));if(Y.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(Y.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&we[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(Y.isHeaders(e))for(const[t,r]of e.entries())i(r,t,n);else null!=e&&i(t,e,n);return this}get(e,t){if(e=Se(e)){const n=Y.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Y.isFunction(t))return t.call(this,e,n);if(Y.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Se(e)){const n=Y.findKey(this,e);return!(!n||void 0===this[n]||t&&!xe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Se(e)){const i=Y.findKey(n,e);!i||t&&!xe(0,n[i],i,t)||(delete n[i],r=!0)}}return Y.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!xe(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return Y.forEach(this,((r,i)=>{const o=Y.findKey(n,i);if(o)return t[o]=Re(r),void delete t[i];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();a!==i&&delete t[i],t[a]=Re(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Y.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Y.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Ee]=this[Ee]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Se(e);t[r]||(function(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return Y.isArray(e)?e.forEach(r):r(e),this}}ke.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Y.reduceDescriptors(ke.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Y.freezeMethods(ke);const Oe=ke;function Ce(e,t){const n=this||_e,r=t||n,i=Oe.from(r.headers);let o=r.data;return Y.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function Ae(e){return!(!e||!e.__CANCEL__)}function Le(e,t,n){X.call(this,null==e?"canceled":e,X.ERR_CANCELED,t,n),this.name="CanceledError"}Y.inherits(Le,X,{__CANCEL__:!0});const Be=Le;function Ne(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new X("Request failed with status code "+n.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const je=(e,t,n=3)=>{let r=0;const i=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),l=r[a];i||(i=c),n[o]=s,r[o]=c;let u=a,f=0;for(;u!==o;)f+=n[u++],u%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-i{i=o,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-i;s>=o?a(e,t):(n=e,r||(r=setTimeout((()=>{r=null,a(n)}),o-s)))},()=>n&&a(n)]}((n=>{const o=n.loaded,a=n.lengthComputable?n.total:void 0,s=o-r,c=i(s);r=o,e({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&o<=a?(a-o)/c:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},Te=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Pe=e=>(...t)=>Y.asap((()=>e(...t))),ze=ge.hasStandardBrowserEnv?function(){const e=ge.navigator&&/(msie|trident)/i.test(ge.navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=Y.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},Ie=ge.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];Y.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Y.isString(r)&&a.push("path="+r),Y.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Me(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const De=e=>e instanceof Oe?{...e}:e;function Fe(e,t){t=t||{};const n={};function r(e,t,n){return Y.isPlainObject(e)&&Y.isPlainObject(t)?Y.merge.call({caseless:n},e,t):Y.isPlainObject(t)?Y.merge({},t):Y.isArray(t)?t.slice():t}function i(e,t,n){return Y.isUndefined(t)?Y.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!Y.isUndefined(t))return r(void 0,t)}function a(e,t){return Y.isUndefined(t)?Y.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>i(De(e),De(t),!0)};return Y.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=c[r]||i,a=o(e[r],t[r],r);Y.isUndefined(a)&&o!==s||(n[r]=a)})),n}const He=e=>{const t=Fe({},e);let n,{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:c}=t;if(t.headers=s=Oe.from(s),t.url=ce(Me(t.baseURL,t.url),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Y.isFormData(r))if(ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(ge.hasStandardBrowserEnv&&(i&&Y.isFunction(i)&&(i=i(t)),i||!1!==i&&ze(t.url))){const e=o&&a&&Ie.read(a);e&&s.set(o,e)}return t},We="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=He(e);let i=r.data;const o=Oe.from(r.headers).normalize();let a,s,c,l,u,{responseType:f,onUploadProgress:h,onDownloadProgress:d}=r;function p(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function v(){if(!m)return;const r=Oe.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Ne((function(e){t(e),p()}),(function(e){n(e),p()}),{data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=v:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(v)},m.onabort=function(){m&&(n(new X("Request aborted",X.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new X("Network Error",X.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||ue;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new X(t,i.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,e,m)),m=null},void 0===i&&o.setContentType(null),"setRequestHeader"in m&&Y.forEach(o.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),Y.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),f&&"json"!==f&&(m.responseType=r.responseType),d&&([c,u]=je(d,!0),m.addEventListener("progress",c)),h&&m.upload&&([s,l]=je(h),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new Be(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);g&&-1===ge.protocols.indexOf(g)?n(new X("Unsupported protocol "+g+":",X.ERR_BAD_REQUEST,e)):m.send(i||null)}))},Ue=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof X?t:new Be(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,i(new X(`timeout ${t} of ms exceeded`,X.ETIMEDOUT))}),t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)})),e=null)};e.forEach((e=>e.addEventListener("abort",i)));const{signal:s}=r;return s.unsubscribe=()=>Y.asap(a),s}},qe=function*(e,t){let n=e.byteLength;if(!t||n{const i=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*qe(n,t)}(e,t);let o,a=0,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return s(),void e.close();let o=r.byteLength;if(n){let e=a+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),i.return())},{highWaterMark:2})},Ge="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ye=Ge&&"function"==typeof ReadableStream,Je=Ge&&("function"==typeof TextEncoder?(Ke=new TextEncoder,e=>Ke.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Ke;const $e=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Xe=Ye&&$e((()=>{let e=!1;const t=new Request(ge.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ze=Ye&&$e((()=>Y.isReadableStream(new Response("").body))),Qe={stream:Ze&&(e=>e.body)};var et;Ge&&(et=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Qe[e]&&(Qe[e]=Y.isFunction(et[e])?t=>t[e]():(t,n)=>{throw new X(`Response type '${e}' is not supported`,X.ERR_NOT_SUPPORT,n)})})));const tt={http:null,xhr:We,fetch:Ge&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:l,headers:u,withCredentials:f="same-origin",fetchOptions:h}=He(e);l=l?(l+"").toLowerCase():"text";let d,p=Ue([i,o&&o.toAbortSignal()],a);const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let v;try{if(c&&Xe&&"get"!==n&&"head"!==n&&0!==(v=await(async(e,t)=>{const n=Y.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Y.isBlob(e))return e.size;if(Y.isSpecCompliantForm(e)){const t=new Request(ge.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Y.isArrayBufferView(e)||Y.isArrayBuffer(e)?e.byteLength:(Y.isURLSearchParams(e)&&(e+=""),Y.isString(e)?(await Je(e)).byteLength:void 0)})(t):n})(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Y.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Te(v,je(Pe(c)));r=Ve(n.body,65536,e,t)}}Y.isString(f)||(f=f?"include":"omit");const i="credentials"in Request.prototype;d=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:i?f:void 0});let o=await fetch(d);const a=Ze&&("stream"===l||"response"===l);if(Ze&&(s||a&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=Y.toFiniteNumber(o.headers.get("content-length")),[n,r]=s&&Te(t,je(Pe(s),!0))||[];o=new Response(Ve(o.body,65536,n,(()=>{r&&r(),m&&m()})),e)}l=l||"text";let g=await Qe[Y.findKey(Qe,l)||"text"](o,e);return!a&&m&&m(),await new Promise(((t,n)=>{Ne(t,n,{data:g,headers:Oe.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:d})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new X("Network Error",X.ERR_NETWORK,e,d),{cause:t.cause||t});throw X.from(t,t&&t.code,e,d)}})};Y.forEach(tt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const nt=e=>`- ${e}`,rt=e=>Y.isFunction(e)||null===e||!1===e,it=e=>{e=Y.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(nt).join("\n"):" "+nt(e[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function ot(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Be(null,e)}function at(e){return ot(e),e.headers=Oe.from(e.headers),e.data=Ce.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),it(e.adapter||_e.adapter)(e).then((function(t){return ot(e),t.data=Ce.call(e,e.transformResponse,t),t.headers=Oe.from(t.headers),t}),(function(t){return Ae(t)||(ot(e),t&&t.response&&(t.response.data=Ce.call(e,e.transformResponse,t.response),t.response.headers=Oe.from(t.response.headers))),Promise.reject(t)}))}const st={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{st[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const ct={};st.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new X(r(i," has been removed"+(t?" in "+t:"")),X.ERR_DEPRECATED);return t&&!ct[i]&&(ct[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};const lt={assertOptions:function(e,t,n){if("object"!=typeof e)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const t=e[o],n=void 0===t||a(t,o,e);if(!0!==n)throw new X("option "+o+" must be "+n,X.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new X("Unknown option "+o,X.ERR_BAD_OPTION)}},validators:st},ut=lt.validators;class ft{constructor(e){this.defaults=e,this.interceptors={request:new le,response:new le}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Fe(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&<.assertOptions(n,{silentJSONParsing:ut.transitional(ut.boolean),forcedJSONParsing:ut.transitional(ut.boolean),clarifyTimeoutError:ut.transitional(ut.boolean)},!1),null!=r&&(Y.isFunction(r)?t.paramsSerializer={serialize:r}:lt.assertOptions(r,{encode:ut.function,serialize:ut.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&Y.merge(i.common,i[t.method]);i&&Y.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Oe.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,f=0;if(!s){const e=[at.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);f{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new Be(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new dt((function(t){e=t})),cancel:e}}}const pt=dt,mt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(mt).forEach((([e,t])=>{mt[t]=e}));const vt=mt,gt=function e(t){const n=new ht(t),i=r(ht.prototype.request,n);return Y.extend(i,ht.prototype,n,{allOwnKeys:!0}),Y.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e(Fe(t,n))},i}(_e);gt.Axios=ht,gt.CanceledError=Be,gt.CancelToken=pt,gt.isCancel=Ae,gt.VERSION="1.7.7",gt.toFormData=ne,gt.AxiosError=X,gt.Cancel=gt.CanceledError,gt.all=function(e){return Promise.all(e)},gt.spread=function(e){return function(t){return e.apply(null,t)}},gt.isAxiosError=function(e){return Y.isObject(e)&&!0===e.isAxiosError},gt.mergeConfig=Fe,gt.AxiosHeaders=Oe,gt.formToJSON=e=>ye(Y.isHTMLForm(e)?new FormData(e):e),gt.getAdapter=it,gt.HttpStatusCode=vt,gt.default=gt;const yt=gt;var bt=n(6942),_t=n.n(bt),wt=n(6994),Et=n.n(wt);const St=window.React;Object.defineProperty;var Rt=new Map,xt=new WeakMap,kt=0;function Ot(e,t,n={},r=undefined){if(void 0===window.IntersectionObserver&&void 0!==r){const i=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}const{id:i,observer:o,elements:a}=function(e){const t=function(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(n=e.root,n?(xt.has(n)||(kt+=1,xt.set(n,kt.toString())),xt.get(n)):"0"):e[t]}`;var n})).toString()}(e);let n=Rt.get(t);if(!n){const r=new Map;let i;const o=new IntersectionObserver((t=>{t.forEach((t=>{var n;const o=t.isIntersecting&&i.some((e=>t.intersectionRatio>=e));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=r.get(t.target))||n.forEach((e=>{e(o,t)}))}))}),e);i=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},Rt.set(t,n)}return n}(n),s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),o.observe(e),function(){s.splice(s.indexOf(t),1),0===s.length&&(a.delete(e),o.unobserve(e)),0===a.size&&(o.disconnect(),Rt.delete(i))}}function Ct({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:i,triggerOnce:o,skip:a,initialInView:s,fallbackInView:c,onChange:l}={}){var u;const[f,h]=St.useState(null),d=St.useRef(),[p,m]=St.useState({inView:!!s,entry:void 0});d.current=l,St.useEffect((()=>{if(a||!f)return;let s;return s=Ot(f,((e,t)=>{m({inView:e,entry:t}),d.current&&d.current(e,t),t.isIntersecting&&o&&s&&(s(),s=void 0)}),{root:i,rootMargin:r,threshold:e,trackVisibility:n,delay:t},c),()=>{s&&s()}}),[Array.isArray(e)?e.toString():e,f,i,r,o,a,n,c,t]);const v=null==(u=p.entry)?void 0:u.target,g=St.useRef();f||!v||o||a||g.current===v||(g.current=v,m({inView:!!s,entry:void 0}));const y=[h,p.inView,p.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}St.Component;var At=(0,t.createContext)();function Lt(e){var t=e.value,n=e.children;return React.createElement(At.Provider,{value:t},n)}function Bt(){return(0,t.useContext)(At)}function Nt(e){return e&&jt[e.toLowerCase()].icon?jt[e.toLowerCase()].icon():null}var jt={proxy:"https://proxy.getinstantimages.com/api/",testmode:!1,defaults:{provider:"unsplash",order:"latest",arr_key:"results"},providers:["Unsplash","Openverse","Pixabay","Pexels","Giphy"],unsplash:{name:"Unsplash",requires_key:!0,new:!1,api_var:"client_id",collections_api:"https://api.unsplash.com/collections/",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M10 9V0H22V9H10ZM22 14H32V32H0V14H10V23H22V14Z",fill:"black"}))}},pixabay:{name:"Pixabay",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("g",{clipPath:"url(#clip0_307_143)"},React.createElement("path",{d:"M0 0V32H32V0H0Z",fill:"#48A947"}),React.createElement("path",{d:"M6.83734 22.3147V28C5.93067 28.0427 5.02401 28.032 4.11734 27.9787C4.09601 27.7014 4.06401 27.4667 4.06401 27.2427C4.06401 23.2427 4.05334 19.2534 4.06401 15.2534C4.07467 12.032 5.97334 9.32269 8.85334 8.37335C13.1307 6.95469 17.4507 10.048 17.8453 14.3894C18.144 17.6534 16.4267 20.5547 13.568 21.7814C12.6507 22.176 11.6907 22.304 10.7093 22.304C9.45067 22.3147 8.21334 22.3147 6.83734 22.3147ZM6.84801 19.4454C8.24534 19.4454 9.54667 19.424 10.848 19.4454C13.1627 19.488 14.816 17.76 15.104 15.712C15.424 13.3654 13.7813 11.2107 11.4453 10.88H11.4347C9.25867 10.592 7.06134 12.2774 6.88001 14.528C6.74134 16.128 6.84801 17.728 6.84801 19.4454Z",fill:"#F9FBF9"}),React.createElement("path",{d:"M25.4827 14.9334L30.656 22.2081H27.3067L23.4667 16.9494C22.0694 18.6881 20.9067 20.4907 19.584 22.2081H16.2454L21.408 14.9334L16.8107 8.04272H20.16L23.4454 12.9494L26.7307 8.04272H30.0694L25.4827 14.9334Z",fill:"#FAFCFA"}),React.createElement("path",{d:"M6.848 19.4453C6.848 17.7279 6.74134 16.1173 6.86934 14.5386C7.05067 12.2879 9.248 10.6026 11.424 10.8906C13.7707 11.2106 15.4133 13.3653 15.0933 15.7119C14.816 17.7599 13.152 19.4879 10.8373 19.4453C9.54667 19.4239 8.24534 19.4453 6.848 19.4453Z",fill:"#4AA949"})),React.createElement("defs",null,React.createElement("clipPath",{id:"clip0_307_143"},React.createElement("rect",{width:"32",height:"32",fill:"white"}))))}},pexels:{name:"Pexels",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32px",height:"32px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M2 0h28a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2z",fill:"#05A081"}),React.createElement("path",{d:"M13 21h3.863v-3.752h1.167a3.124 3.124 0 1 0 0-6.248H13v10zm5.863 2H11V9h7.03a5.124 5.124 0 0 1 .833 10.18V23z",fill:"#fff"}))}},openverse:{name:"Openverse",requires_key:!1,new:!1,api_var:"key",key:"",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M25.8578 14.32C29.6708 14.32 32.7618 11.1144 32.7618 7.16C32.7618 3.20564 29.6708 0 25.8578 0C22.0448 0 18.9539 3.20564 18.9539 7.16C18.9539 11.1144 22.0448 14.32 25.8578 14.32Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 7.16C0.761841 11.1 3.84742 14.32 7.66584 14.32V0C3.84742 0 0.761841 3.2 0.761841 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 7.16C9.85791 11.1 12.9435 14.32 16.7619 14.32V0C12.9628 0 9.85791 3.2 9.85791 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M25.8578 31.9399C29.6708 31.9399 32.7618 28.7343 32.7618 24.78C32.7618 20.8256 29.6708 17.62 25.8578 17.62C22.0448 17.62 18.9539 20.8256 18.9539 24.78C18.9539 28.7343 22.0448 31.9399 25.8578 31.9399Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 24.7801C9.85791 28.72 12.9435 31.9401 16.7619 31.9401V17.64C12.9628 17.64 9.85791 20.84 9.85791 24.7801Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 24.84C0.761841 28.8 3.84742 32 7.66584 32V17.7C3.84742 17.7 0.761841 20.9 0.761841 24.84Z",fill:"#000000"}))}},giphy:{name:"Giphy",requires_key:!0,new:!0,api_var:"key",icon:function(){return React.createElement("svg",{height:"35",width:"32",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 35"},React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("path",{d:"M4 4h20v27H4z",fill:"#000"}),React.createElement("g",null,React.createElement("path",{d:"M0 3h4v29H0z",fill:"#04ff8e"}),React.createElement("path",{d:"M24 11h4v21h-4z",fill:"#8e2eff"}),React.createElement("path",{d:"M0 31h28v4H0z",fill:"#00c5ff"}),React.createElement("path",{d:"M0 0h16v4H0z",fill:"#fff152"}),React.createElement("path",{d:"M24 8V4h-4V0h-4v12h12V8",fill:"#ff5b5b"}),React.createElement("path",{d:"M24 16v-4h4",fill:"#551c99"})),React.createElement("path",{d:"M16 0v4h-4",fill:"#999131"})))}}};const Tt=window.wp.i18n;var Pt=[{label:(0,Tt.__)("WordPress","instant-images"),value:"wordpress"},{label:(0,Tt.__)("Flickr","instant-images"),value:"flickr"},{label:(0,Tt.__)("Nasa","instant-images"),value:"nasa"},{label:(0,Tt.__)("SpaceX","instant-images"),value:"spacex"},{label:(0,Tt.__)("Wikimedia","instant-images"),value:"wikimedia"}],zt=[{label:(0,Tt.__)("Square","instant-images"),value:"square"},{label:(0,Tt.__)("Tall","instant-images"),value:"tall"},{label:(0,Tt.__)("Wide","instant-images"),value:"wide"}],It=[{label:(0,Tt.__)("Red","instant-images"),value:"red"},{label:(0,Tt.__)("Orange","instant-images"),value:"orange"},{label:(0,Tt.__)("Yellow","instant-images"),value:"yellow"},{label:(0,Tt.__)("Green","instant-images"),value:"green"},{label:(0,Tt.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,Tt.__)("Blue","instant-images"),value:"blue"},{label:(0,Tt.__)("Violet","instant-images"),value:"violet"},{label:(0,Tt.__)("Pink","instant-images"),value:"pink"},{label:(0,Tt.__)("Brown","instant-images"),value:"brown"},{label:(0,Tt.__)("Black","instant-images"),value:"black"},{label:(0,Tt.__)("Gray","instant-images"),value:"gray"},{label:(0,Tt.__)("White","instant-images"),value:"white"}],Mt=[{label:(0,Tt.__)("Landscape","instant-images"),value:"landscape"},{label:(0,Tt.__)("Portrait","instant-images"),value:"portrait"},{label:(0,Tt.__)("Square","instant-images"),value:"squarish"}],Dt=[{label:(0,Tt.__)("Grayscale","instant-images"),value:"grayscale"},{label:(0,Tt.__)("Red","instant-images"),value:"red"},{label:(0,Tt.__)("Orange","instant-images"),value:"orange"},{label:(0,Tt.__)("Yellow","instant-images"),value:"yellow"},{label:(0,Tt.__)("Green","instant-images"),value:"green"},{label:(0,Tt.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,Tt.__)("Blue","instant-images"),value:"blue"},{label:(0,Tt.__)("Lilac","instant-images"),value:"lilac"},{label:(0,Tt.__)("Pink","instant-images"),value:"pink"},{label:(0,Tt.__)("White","instant-images"),value:"white"},{label:(0,Tt.__)("Gray","instant-images"),value:"gray"},{label:(0,Tt.__)("Black","instant-images"),value:"black"},{label:(0,Tt.__)("Brown","instant-images"),value:"brown"},{label:(0,Tt.__)("Transparent","instant-images"),value:"transparent"}],Ft=[{label:(0,Tt.__)("Backgrounds","instant-images"),value:"backgrounds"},{label:(0,Tt.__)("Fashion","instant-images"),value:"fashion"},{label:(0,Tt.__)("Nature","instant-images"),value:"nature"},{label:(0,Tt.__)("Science","instant-images"),value:"science"},{label:(0,Tt.__)("Education","instant-images"),value:"education"},{label:(0,Tt.__)("Feelings","instant-images"),value:"feelings"},{label:(0,Tt.__)("Health","instant-images"),value:"health"},{label:(0,Tt.__)("People","instant-images"),value:"people"},{label:(0,Tt.__)("Religion","instant-images"),value:"religion"},{label:(0,Tt.__)("Places","instant-images"),value:"places"},{label:(0,Tt.__)("Animals","instant-images"),value:"animals"},{label:(0,Tt.__)("Industry","instant-images"),value:"industry"},{label:(0,Tt.__)("Computer","instant-images"),value:"computer"},{label:(0,Tt.__)("Food","instant-images"),value:"food"},{label:(0,Tt.__)("Sports","instant-images"),value:"sports"},{label:(0,Tt.__)("Food","instant-images"),value:"food"},{label:(0,Tt.__)("Transportation","instant-images"),value:"transportation"},{label:(0,Tt.__)("Travel","instant-images"),value:"travel"},{label:(0,Tt.__)("Buildings","instant-images"),value:"buildings"},{label:(0,Tt.__)("Business","instant-images"),value:"business"},{label:(0,Tt.__)("Music","instant-images"),value:"music"}],Ht=[{label:(0,Tt.__)("Horizontal","instant-images"),value:"horizontal"},{label:(0,Tt.__)("Vertical","instant-images"),value:"vertical"}],Wt=[{label:(0,Tt.__)("Photo","instant-images"),value:"photo"},{label:(0,Tt.__)("Illustration","instant-images"),value:"illustration"},{label:(0,Tt.__)("Vector","instant-images"),value:"vector"}],Ut=[{label:(0,Tt.__)("Black & White","instant-images"),value:"black_and_white"},{label:(0,Tt.__)("Black","instant-images"),value:"black"},{label:(0,Tt.__)("White","instant-images"),value:"white"},{label:(0,Tt.__)("Yellow","instant-images"),value:"yellow"},{label:(0,Tt.__)("Green","instant-images"),value:"green"},{label:(0,Tt.__)("Orange","instant-images"),value:"orange"},{label:(0,Tt.__)("Red","instant-images"),value:"red"},{label:(0,Tt.__)("Purple","instant-images"),value:"purple"},{label:(0,Tt.__)("Magenta","instant-images"),value:"magenta"},{label:(0,Tt.__)("Teal","instant-images"),value:"teal"},{label:(0,Tt.__)("Blue","instant-images"),value:"blue"}],qt=[{label:(0,Tt.__)("Landscape","instant-images"),value:"landscape"},{label:(0,Tt.__)("Portrait","instant-images"),value:"portrait"},{label:(0,Tt.__)("Square","instant-images"),value:"squarish"}];function Vt(e){return function(e){if(Array.isArray(e))return Gt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Gt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n-1&&parseInt(n)<2&&alert(instant_img_localize.api_ratelimit_msg)}}function mn(e){return e.charAt(0).toUpperCase()+e.slice(1)}var vn="";function gn(e){var t=e.currentTarget,n=t.getBoundingClientRect(),r=Math.round(n.left),i=Math.round(n.top),o=t.closest("#photo-listing").querySelector("#tooltip");o.classList.remove("over"),t.classList.contains("tooltip--above")?o.classList.add("above"):o.classList.remove("above"),vn=setInterval((function(){clearInterval(vn),o.innerHTML=t.dataset.title,r=r-o.offsetWidth+t.offsetWidth+5,o.style.left="".concat(r,"px"),o.style.top="".concat(i,"px"),setTimeout((function(){o.classList.add("over")}),25)}),750)}function yn(e){clearInterval(vn),e.currentTarget.closest("#photo-listing").querySelector("#tooltip").classList.remove("over")}function bn(e){e&&window&&window.open(e,"_blank")}function wn(){var e=instant_img_localize;switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:200){case 400:case 401:return e.api_invalid_msg;case 403:return e.api_invalid_403_msg;case 404:return e.api_invalid_404_msg;case 429:return e.api_ratelimit_msg;case 500:case 503:return e.api_invalid_500_msg;case 501:return e.api_invalid_501_msg}}function En(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=instant_img_localize,r=wn(t);switch(t){case 400:case 401:case 500:case 429:console.warn("[".concat(n.instant_images," - ").concat(t," Error] ").concat(mn(e),": ").concat(r))}}function Sn(e){return e&&e[jt.defaults.arr_key]||[]}function Rn(e){return void 0===e.total||null===e.total?0:e.total}function xn(e){if(!e||jt.testmode)return!1;var t=sessionStorage.getItem(dn(e));if(!t)return!1;var n=JSON.parse(t),r=n.expires,i=void 0===r?0:r,o=n.error;if(void 0!==o&&o)return!1;var a=Date.now()>i;return a&&On(e),!(!n||a)&&n}function kn(e,t){if(!e||!t||null!=t&&t.error)return!1;t.expires=Date.now()+72e5,sessionStorage.setItem(dn(e),JSON.stringify(t))}function On(e){if(!e)return!1;sessionStorage.removeItem(dn(e))}function Cn(e){return Cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cn(e)}function An(){An=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new L(r||[]);return i(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",d="suspendedYield",p="executing",m="completed",v={};function g(){}function y(){}function b(){}var _={};l(_,a,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(B([])));E&&E!==n&&r.call(E,a)&&(_=E);var S=b.prototype=g.prototype=Object.create(_);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(i,o,a,s){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==Cn(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function k(t,n,r){var i=h;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=O(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?m:d,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=m,r.method="throw",r.arg=l.arg)}}}function O(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function B(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:B(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Ln(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function Bn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Nn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=1?null:React.createElement("div",{className:"instant-images-no-results"},React.createElement("div",null,React.createElement("h3",null,instant_img_localize.no_results," "),React.createElement("p",null,instant_img_localize.no_results_desc," ")))}const Wn=n.p+"images/giphy-powered.9748c37d.png";var Un=jt.providers;function qn(e){var n=e.switchProvider,r=Bt().provider;return React.createElement(t.Fragment,null,!(null==Un||!Un.length)&&React.createElement("nav",{className:"provider-nav"},Un.map((function(e,t){return React.createElement("div",{key:"provider-".concat(t)},React.createElement("button",{onClick:function(){return n(e.toLowerCase())},className:r===e.toLowerCase()?"provider-nav--btn active":"provider-nav--btn"},Nt(e),React.createElement("span",null,e),jt[e.toLowerCase()].new&&React.createElement("span",{className:"provider-nav--new"},instant_img_localize.new)))})),"giphy"===r?React.createElement("div",{className:"giphy-powered"},React.createElement("a",{href:"https://giphy.com",target:"_blank",rel:"noreferrer"},React.createElement("img",{src:Wn,alt:"Powered by Giphy"}))):null))}function Vn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=200&&t.status<400&&JSON.parse(t.response).success||o(!1)},t.onerror=function(e){console.warn(e),o(!1)}}),[]),React.createElement(t.Fragment,null,i?null:React.createElement("div",{className:"error-messaging"},React.createElement("strong",null,instant_img_localize.error_restapi),instant_img_localize.error_restapi_desc))}const Yn=window.wp.blocks,Jn=window.wp.data;function Kn(e,t){var n=e.id,r=void 0===n?null:n,i=e.url,o=void 0===i?null:i,a=e.caption,s=void 0===a?"":a,c=e.alt,l=void 0===c?"":c;if(o&&r){var u=(0,Yn.createBlock)("core/image",{id:r,url:o,caption:s,alt:l});t?(0,Jn.dispatch)("core/block-editor").replaceBlock(t,u):(0,Jn.dispatch)("core/block-editor").insertBlocks(u)}}function $n(e){return $n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$n(e)}function Xn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zn(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&React.createElement("img",{className:"user-wrap--photo",src:L,alt:""}),A)),React.createElement("div",{className:"photo-options"},f&&!X?React.createElement(t.Fragment,null,React.createElement("button",{type:"button",className:"set-featured fade","data-title":instant_img_localize.set_as_featured,onMouseEnter:function(e){return gn(e)},onMouseLeave:function(e){return yn(e)},onClick:function(e){return function(e){yn(e),te.current&&(ie=!0,te.current.click())}(e)}},React.createElement("i",{className:"fa fa-picture-o","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.set_as_featured)),React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(e){return gn(e)},onMouseLeave:function(e){return yn(e)},onClick:function(e){return ae(e)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post))):null,!!s&&React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(e){return gn(e)},onMouseLeave:function(e){return yn(e)},onClick:function(e){return ae(e)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post)),X?React.createElement("button",{onClick:function(){X&&(window.location=X)},className:"edit-photo-admin fade","data-title":instant_img_localize.edit_upload,onMouseEnter:function(e){return gn(e)},onMouseLeave:function(e){return yn(e)}},React.createElement("i",{className:"fa fa-pencil","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_upload)):React.createElement("button",{onClick:function(e){return function(e){e.preventDefault(),yn(e);var t=document.querySelectorAll(".edit-screen.editing");t&&t.forEach((function(e){e.classList.remove("editing")})),ne.current.classList.add("editing"),setTimeout((function(){ne.current.focus({preventScroll:!0})}),150)}(e)},className:"edit-photo fade","data-title":instant_img_localize.edit_details,onMouseEnter:function(e){return gn(e)},onMouseLeave:function(e){return yn(e)}},React.createElement("i",{className:"fa fa-cog","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_details)))),React.createElement("div",{className:"photo-meta"},E?React.createElement("span",{className:"likes tooltip--above","data-title":E+" "+j,onMouseEnter:function(e){return gn(e)},onMouseLeave:function(e){return yn(e)}},React.createElement("i",{className:"fa fa-heart heart-like","aria-hidden":"true"})," ",E):null,React.createElement("a",{className:"tooltip--above",href:m,"data-title":"".concat(instant_img_localize.open_external," ").concat(mn(o)),onMouseEnter:function(e){return gn(e)},onMouseLeave:function(e){return yn(e)},rel:"noopener noreferrer",target:"_blank"},React.createElement("i",{className:"fa fa-external-link","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},"".concat(instant_img_localize.open_external," ").concat(mn(o)))))),React.createElement("div",{className:"edit-screen",tabIndex:"0",ref:ne},React.createElement("div",{className:"edit-screen--title"},React.createElement("div",null,React.createElement("p",{className:"heading"},instant_img_localize.edit_details),S&&S.length>0&&React.createElement("p",{className:"dimensions"},S)),React.createElement("div",{className:"preview",style:{backgroundImage:"url(".concat(k,")")}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_filename,":"),React.createElement("input",{type:"text",name:"filename","data-original":p,placeholder:W.filename,value:W.filename,onChange:function(e){return le(e)}}),React.createElement("em",null,".",w)),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_title,":"),React.createElement("input",{type:"text",name:"title","data-original":v,placeholder:v,value:W.title||"",onChange:function(e){return le(e)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_alt,":"),React.createElement("input",{type:"text",name:"alt","data-original":g,value:W.alt||"",onChange:function(e){return le(e)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_caption,":"),React.createElement("textarea",{rows:"4",name:"caption","data-original":F,onChange:function(e){return le(e)},value:W.caption||"",ref:re})),D?React.createElement("div",{className:"add-attribution-row"},React.createElement("button",{onClick:function(e){return function(e){e.preventDefault(),re.current.value=D,U(Zn(Zn({},W),{},{caption:D}))}(e)},type:"button"},instant_img_localize.attribution)):null,React.createElement("div",{className:"edit-screen--controls"},React.createElement("button",{type:"button",className:"button button-secondary",onClick:function(e){return U({filename:p,title:v,alt:g,caption:F}),ne.current.classList.remove("editing"),void te.current.focus({preventScrol:!0})}},instant_img_localize.cancel)," "," ",React.createElement("button",{type:"button",className:"button button-primary",onClick:function(){return ne.current.classList.remove("editing"),void te.current.click()}},s?instant_img_localize.insert_into_post:instant_img_localize.upload_now))),React.createElement("div",{className:"photo-status"})))}function rr(e){var n=e.result.data,r=void 0===n?null:n,i=(null==r?void 0:r.url)||"",o=(null==r?void 0:r.title)||"",a=(null==r?void 0:r.description)||"",s=(null==r?void 0:r.avatar)||"",c=r.image,l=void 0===c?null:c,u=l.src,f=void 0===u?null:u,h=l.alt,d=void 0===h?null:h,p=(0,t.useRef)(),m=(0,t.useRef)();return React.createElement(t.Fragment,null,l&&i?React.createElement("article",{className:"photo feature",title:a,ref:p,onClick:function(){return m.current.click()}},React.createElement("div",{className:"photo--wrap"},React.createElement("span",{className:"flag",title:instant_img_localize.advertisement},instant_img_localize.ad),React.createElement("div",{className:"img-wrap"},React.createElement("a",{className:"loaded",href:i,target:"_blank",ref:m,rel:"noreferrer"},React.createElement("img",{src:f,alt:d}))),React.createElement("div",{className:"feature-title"},s&&React.createElement("img",{src:s,alt:o}),React.createElement("span",null,o)))):null)}function ir(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n-1&&t.splice(n,1),t.length>=10&&(t.length=10),t.unshift(e),localStorage.setItem(dr,JSON.stringify(t))}else localStorage.setItem(dr,JSON.stringify([e]))}}(r),v(mr())))}(e)},autoComplete:"off"},React.createElement("label",{htmlFor:"search-input",className:"offscreen"},instant_img_localize.search_label),React.createElement("div",{ref:_},React.createElement("input",{ref:n,type:"text",id:"search-input",placeholder:instant_img_localize.search,disabled:f,onChange:function(e){return c&&d(e.target.value)},onFocus:function(){return b(!0)}}),c&&((null==m?void 0:m.length)||(null==h?void 0:h.length))?React.createElement(Er,{show:y,history:m,setHistory:v,setSearchValue:function(e){var t=null==n?void 0:n.current;t.value=e,null==w||w.current.click(),t.focus()},container:_}):null,!a&&React.createElement(wr,{show:y})),React.createElement("button",{type:"submit",disabled:f,ref:w},React.createElement("i",{className:"fa fa-search"}),React.createElement("span",{className:"offscreen"},instant_img_localize.search)),React.createElement(Sr,{show:y})))}));function Or(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:B(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Br(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nr(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==h[0]&&h[0],!z){e.next=3;break}return e.abrupt("return",!1);case 3:if(n||""===(null==he||null===(t=he.current)||void 0===t?void 0:t.value)){e.next=7;break}if(!m||!g){e.next=7;break}return xe(he.current.value),e.abrupt("return");case 7:if(T(!0),d=void 0,(null==he||null===(d=he.current)||void 0===d?void 0:d.value)&&(he.current.value=""),K(b),Z([]),Ne(),Hr=1,r=nn(R,re),i=ln("photos",r),!(o=xn(i))){e.next=18;break}Oe(Sn(o),!1,null),e.next=37;break;case 18:return e.next=20,fetch(i);case 20:return s=e.sent,c=s.status,pn(s.headers),e.prev=23,e.next=26,s.json();case 26:l=e.sent,u=l.error,f=void 0===u?null:u,Oe(Sn(l),!1,f),kn(i,l),e.next=37;break;case 32:e.prev=32,e.t0=e.catch(23),En(a,c),T(!1),On(i);case 37:setTimeout((function(){T(!1)}),250);case 38:case"end":return e.stop()}var d}),e,null,[[23,32]])}))),Ee.apply(this,arguments)}function Se(){return Re.apply(this,arguments)}function Re(){return(Re=zr(Lr().mark((function e(){var t,n,r,i,o,s,c,l,u,f,h,d;return Lr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(L&&!j&&!z&&!D){e.next=2;break}return e.abrupt("return");case 2:if(I(!0),Hr=parseInt(Hr)+1,t=null!=J&&J.active&&null!=J&&J.term?{term:J.term}:{},n=null!=J&&J.active?"search":"photos",r=null!=J&&J.active?ae:re,i=Nr(Nr(Nr({},{page:Hr}),t),r),o=nn(R,i),s=ln(n,o),!(c=xn(s))){e.next=15;break}Oe(Sn(c),!0,null),e.next=34;break;case 15:return e.next=17,fetch(s);case 17:return l=e.sent,u=l.status,pn(l.headers),e.prev=20,e.next=23,l.json();case 23:f=e.sent,h=f.error,d=void 0===h?null:h,Oe(Sn(f),!0,d),kn(s,f),e.next=34;break;case 29:e.prev=29,e.t0=e.catch(20),En(a,u),I(!1),On(s);case 34:case"end":return e.stop()}}),e,null,[[20,29]])})))).apply(this,arguments)}function xe(_x){return ke.apply(this,arguments)}function ke(){return(ke=zr(Lr().mark((function e(t){var n,r,i,o,s,c,l,u,f,h,d;return Lr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(T(!0),Ne(),Hr=1,n="id:"===t.substring(0,3)?"id":"term",r="id"===n?{id:t.replace("id:","").replace(/\s+/,"")}:{term:t},i=Nr(Nr(Nr({},{page:Hr}),r),ae),o=nn(R,i),s=ln("search",o),!(c=xn(s))){e.next=14;break}Oe(Sn(c),!1,null),K({active:!0,term:t,type:n,results:Rn(c)}),e.next=35;break;case 14:return e.next=16,fetch(s);case 16:return l=e.sent,u=l.status,pn(l.headers),e.prev=19,e.next=22,l.json();case 22:f=e.sent,h=f.error,d=void 0===h?null:h,Oe(Sn(f),!1,d),K({active:!0,term:t,type:n,results:Rn(f)}),kn(s,f),e.next=35;break;case 29:e.prev=29,e.t0=e.catch(19),F(!0),T(!1),En(a,u),On(s);case 35:he.current.classList.remove(y);case 36:case"end":return e.stop()}}),e,null,[[19,29]])})))).apply(this,arguments)}function Oe(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;e=null==t?void 0:t.length,F(0===parseInt(e)||void 0===e),E(n?function(e){return[].concat(Tr(e),Tr(t))}:t),U(r)}function Ce(e,t){var n=Nr({},re);n[e]&&"#"===t||""===t||"all"===t?delete n[e]:n[e]=t,ie(Nr({},n))}function Ae(e){return Le.apply(this,arguments)}function Le(){return(Le=zr(Lr().mark((function e(t){var n,r;return Lr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R!==t){e.next=2;break}return e.abrupt("return");case 2:if(T(!0),U(!1),G(!1),ye.classList.remove("overflow-hidden"),!jt[t].requires_key||O.includes(t)){e.next=27;break}return e.prev=7,e.next=10,fetch(un(t));case 10:if(n=e.sent,r=n.status,pn(n.headers),200===r){e.next=18;break}return G(t),U(!0),ye.classList.add("overflow-hidden"),e.abrupt("return");case 18:200===r&&C((function(e){return[].concat(Tr(e),[t])})),e.next=27;break;case 21:return e.prev=21,e.t0=e.catch(7),G(t),ye.classList.add("overflow-hidden"),U(!0),e.abrupt("return");case 27:setTimeout((function(){te(Jt[t].filters),x(t)}),250);case 28:case"end":return e.stop()}}),e,null,[[7,21]])})))).apply(this,arguments)}function Be(){return Be=zr(Lr().mark((function e(t){var n;return Lr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&!((null==t?void 0:t.length)<3)){e.next=2;break}return e.abrupt("return");case 2:return n=instant_img_localize.root+"instant-images-extended/suggestions/?term=".concat(t),e.next=5,yt.get(n).then((function(e){Z(e.data)})).catch((function(e){console.warn(e)}));case 5:case"end":return e.stop()}}),e)}))),Be.apply(this,arguments)}function Ne(){pe&&null!=fe&&fe.current&&(null==fe||fe.current.scroll({top:0,left:0,behavior:"smooth"}))}function je(e){if("Escape"===e.key){var t=fe.current.querySelectorAll(".edit-screen.editing");t&&Tr(t).forEach((function(e){null==e||e.classList.remove("editing")}))}}return(0,t.useEffect)((function(){null!=J&&J.active||se({})}),[J]),(0,t.useEffect)((function(){L&&null!=J&&J.active&&xe(null==J?void 0:J.term)}),[ae]),(0,t.useEffect)((function(){L&&we()}),[re]),(0,t.useEffect)((function(){te(Jt[R].filters),ie({})}),[R]),(0,t.useEffect)((function(){Se()}),[ue]),(0,t.useEffect)((function(){Fr(fe.current,(function(){ve||(de.current=new(Et())(fe.current,{itemSelector:".photo"}),fe.current.querySelectorAll(".photo").forEach((function(e){e.classList.add("in-view")}))),setTimeout((function(){T(!1),I(!1),L||B(!0)}),250)}))}),[w]),(0,t.useEffect)((function(){return T(!1),_e.classList.add("loaded"),ve&&we(),document.addEventListener("keydown",je,!1),function(){document.removeEventListener("keydown",je,!1)}}),[]),React.createElement(t.Fragment,null,React.createElement(Lt,{value:{provider:R,wpBlock:pe,mediaModal:ge,blockSidebar:me,clientId:h,search:J,apiError:W,getPhotos:we,searchHandler:function(e){e.preventDefault();var t=he.current.value;t.length>2?(he.current.classList.add(y),xe(t)):he.current.focus()},filterSearch:function(e,t){var n=Nr({},ae);n[e]&&"#"===t||""===t||"all"===t?delete n[e]:n[e]=t,se(Nr({},n))},suggestions:X,getSuggestions:function(e){return Be.apply(this,arguments)}}},pe?React.createElement(Xt,{switchProvider:Ae}):React.createElement(React.Fragment,null,React.createElement(qn,{switchProvider:Ae}),React.createElement(_r,null)),React.createElement(Gn,null),React.createElement("div",{className:"control-nav"},React.createElement("div",{className:_t()("control-nav--filters-wrap",W||null!=J&&J.active?"inactive":null)},ee&&null!==(r=Object.entries(ee))&&void 0!==r&&r.length?React.createElement("div",{className:"control-nav--filters"},Object.entries(ee).map((function(e,t){var n=Ir(e,2),r=n[0],i=n[1];return React.createElement(Dn,{key:"".concat(R,"-").concat(t,"-").concat(r),data:i,filterKey:r,handler:Ce})}))):null),React.createElement(kr,{ref:he})),React.createElement("div",{id:"photo-listing",className:j?"loading":null},React.createElement(Cr,null),pe?React.createElement(ur,{ref:fe,data:w,done:D,loadMorePhotos:Se}):React.createElement(or,{ref:fe,data:w}),React.createElement(Hn,{total:null==J?void 0:J.results,is_search:null==J?void 0:J.active}),React.createElement(Fn,{ref:le,loadMorePhotos:Se,loading:z,done:D}),React.createElement(jn,{provider:V,callback:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&x(e),G(!1),T(!1),U(!1),ye.classList.remove("overflow-hidden")}}),React.createElement(Tn,null),React.createElement(fr,null))))}function Ur(e){return Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ur(e)}function qr(){qr=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new L(r||[]);return i(a,"_invoke",{value:k(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",d="suspendedYield",p="executing",m="completed",v={};function g(){}function y(){}function b(){}var _={};l(_,a,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(B([])));E&&E!==n&&r.call(E,a)&&(_=E);var S=b.prototype=g.prototype=Object.create(_);function R(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(i,o,a,s){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==Ur(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function k(t,n,r){var i=h;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=O(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?m:d,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=m,r.method="throw",r.arg=l.arg)}}}function O(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function B(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:B(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Vr(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}var Gr="",Yr="",Jr=wp.media.view.MediaFrame.Post,Kr=wp.media.view.MediaFrame.Select;wp.media.view.MediaFrame.Select=Kr.extend({browseRouter:function(e){var t;Kr.prototype.browseRouter.apply(this,arguments),e.set({instantimages:{text:null===(t=instant_img_localize)||void 0===t?void 0:t.instant_images,priority:120}})},bindHandlers:function(){Kr.prototype.bindHandlers.apply(this,arguments),this.on("content:create:instantimages",this.frameContent,this)},frameContent:function(){var e=this.state();e&&(Gr=e.id,Yr=e.frame.el)},getFrame:function(e){return this.states.findWhere({id:e})}}),wp.media.view.MediaFrame.Post=Jr.extend({browseRouter:function(e){var t;Kr.prototype.browseRouter.apply(this,arguments),e.set({instantimages:{text:null===(t=instant_img_localize)||void 0===t?void 0:t.instant_images,priority:120}})},bindHandlers:function(){Jr.prototype.bindHandlers.apply(this,arguments),this.on("content:create:instantimages",this.frameContent,this)},frameContent:function(){var e=this.state();e&&(Gr=e.id,Yr=e.frame.el)},getFrame:function(e){return this.states.findWhere({id:e})}});var $r=function(){if(!Yr)return!1;var e=Yr.querySelector(".media-frame-content");if(!e)return!1;e.innerHTML="";var t=Qr();e.appendChild(t);var n=e.querySelector("#instant-images-media-router-"+Gr);if(!n)return!1;Xr(n)},Xr=function(){var e,t=(e=qr().mark((function e(t){var n,r,i,o,a,s,c,l;return qr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=instant_img_localize&&instant_img_localize.default_provider?instant_img_localize.default_provider:jt.defaults.provider,r=nn(n),i=ln("photos",r),!(o=xn(i))){e.next=8;break}Zr(t,n,o,null),e.next=26;break;case 8:return e.next=10,fetch(i);case 10:return a=e.sent,s=a.status,pn(a.headers),e.prev=13,e.next=16,a.json();case 16:c=e.sent,l=c.error,Zr(t,n,c,void 0===l?null:l),kn(i,c),e.next=26;break;case 22:e.prev=22,e.t0=e.catch(13),En(n,s),On(i);case 26:case"end":return e.stop()}}),e,null,[[13,22]])})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Vr(o,r,i,a,s,"next",e)}function s(e){Vr(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(_x){return t.apply(this,arguments)}}(),Zr=function(e,n,r,i){t.createRoot?(0,t.createRoot)(e).render(React.createElement(Wr,{editor:"media-modal",data:r,container:e,api_error:i,provider:n})):(0,t.render)(React.createElement(Wr,{editor:"media-modal",data:r,container:e,api_error:i,provider:n}),e)},Qr=function(){var e=document.createElement("div");e.classList.add("instant-img-container");var t=document.createElement("div");t.classList.add("instant-images-wrapper");var n=document.createElement("div");return n.setAttribute("id","instant-images-media-router-"+Gr),t.appendChild(n),e.appendChild(t),e};jQuery(document).ready((function(e){wp.media&&(wp.media.view.Modal.prototype.on("open",(function(){if(!Yr)return!1;var e=Yr.querySelector(".media-router button.media-menu-item.active");e&&"menu-item-instantimages"===e.id&&$r()})),e(document).on("click",".media-router button.media-menu-item",(function(){var e=Yr.querySelector(".media-router button.media-menu-item.active");e&&"menu-item-instantimages"===e.id&&$r()})))}))})()})(); \ No newline at end of file diff --git a/build/plugin-sidebar/index.asset.php b/build/plugin-sidebar/index.asset.php index cbf9781..0388983 100644 --- a/build/plugin-sidebar/index.asset.php +++ b/build/plugin-sidebar/index.asset.php @@ -1 +1 @@ - array('react', 'wp-blocks', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => '43abe637dd3cb1b4c4a9'); + array('react', 'wp-blocks', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => '87405a22aa1ee3544b38'); diff --git a/build/plugin-sidebar/index.js b/build/plugin-sidebar/index.js index d433e66..29fd8b9 100644 --- a/build/plugin-sidebar/index.js +++ b/build/plugin-sidebar/index.js @@ -1,21039 +1 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ "./src/js/common/pluginProvider.js": -/*!*****************************************!*\ - !*** ./src/js/common/pluginProvider.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ PluginProvider: () => (/* binding */ PluginProvider), -/* harmony export */ usePluginContext: () => (/* binding */ usePluginContext) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); - - -// Create Context object. -var PluginContext = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createContext)(); - -// Export Provider. -function PluginProvider(props) { - var value = props.value, - children = props.children; - return /*#__PURE__*/React.createElement(PluginContext.Provider, { - value: value - }, children); -} - -// Export useContext Hook. -function usePluginContext() { - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useContext)(PluginContext); -} - -/***/ }), - -/***/ "./src/js/components/APILightbox.js": -/*!******************************************!*\ - !*** ./src/js/components/APILightbox.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ APILightbox) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _functions_buildURL__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../functions/buildURL */ "./src/js/functions/buildURL.js"); -/* harmony import */ var _functions_consoleStatus__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../functions/consoleStatus */ "./src/js/functions/consoleStatus.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _functions_updatePluginSetting__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../functions/updatePluginSetting */ "./src/js/functions/updatePluginSetting.js"); -/* harmony import */ var _ProviderIcons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ProviderIcons */ "./src/js/components/ProviderIcons.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } -function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - -/** - * Render the APILightbox component. - * Note: Component is display when switching providers and the API is invalid. - * - * @param {Object} props The component props. - * @return {JSX.Element} The APILightbox component. - */ -function APILightbox(props) { - var provider = props.provider, - callback = props.callback; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('invalid'), - _useState2 = _slicedToArray(_useState, 2), - apiStatus = _useState2[0], - setAPIStatus = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(''), - _useState4 = _slicedToArray(_useState3, 2), - response = _useState4[0], - setResponse = _useState4[1]; - var lightbox = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var inputRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var submitRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var api_key = instant_img_localize["".concat(provider, "_app_id")]; - var title = apiStatus === 'invalid' ? instant_img_localize.api_key_invalid : ''; - - /** - * Handler for the form submission. - * - * @param {Event} e The form event. - */ - function handleSubmit(_x) { - return _handleSubmit.apply(this, arguments); - } - /** - * Close the lightbox - */ - function _handleSubmit() { - _handleSubmit = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) { - var _inputRef$current; - var key, data, ok, status, headers; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - e.preventDefault(); - setAPIStatus('loading'); - - // Get API key value. - key = inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value; // Set API key to localized variable. - instant_img_localize["".concat(provider, "_app_id")] = key; - - // Update plugin settings via REST API. - (0,_functions_updatePluginSetting__WEBPACK_IMPORTED_MODULE_5__["default"])("".concat(provider, "_api"), key); - _context.prev = 5; - _context.next = 8; - return fetch((0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_2__.buildTestURL)(provider)); - case 8: - data = _context.sent; - // Handle response. - ok = data.ok, status = data.status, headers = data.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_4__.checkRateLimit)(headers); - - // Handle response actions. - if (ok) { - // Success. - setAPIStatus('valid'); - setResponse(instant_img_localize.api_success_msg); - setTimeout(function () { - setResponse(''); - setAPIStatus('invalid'); - callback(provider); - }, 1000); - } else { - setAPIStatus('invalid'); // Error/Invalid. - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_3__["default"])(provider, status); // Render console warning. - - if (status === 400 || status === 401) { - setResponse(instant_img_localize.api_invalid_msg); // Unsplash/Pixabay incorrect API key. - } - if (status === 429) { - setResponse(instant_img_localize.api_ratelimit_msg); // Pixabay - too many requests. - } - } - _context.next = 19; - break; - case 14: - _context.prev = 14; - _context.t0 = _context["catch"](5); - setAPIStatus('invalid'); // Error/Invalid. - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_3__["default"])(provider, 500); // Render console warning. - setResponse(instant_img_localize.api_invalid_500_msg); - case 19: - case "end": - return _context.stop(); - } - }, _callee, null, [[5, 14]]); - })); - return _handleSubmit.apply(this, arguments); - } - function closeLightbox() { - if (lightbox !== null && lightbox !== void 0 && lightbox.current) { - lightbox.current.classList.remove('active'); - setTimeout(function () { - callback(); - }, 150); - } - } - - /** - * Close the lightbox with a background click. - * - * @param {Event} e The form event. - */ - function bkgClick(e) { - var target = e.target; - // If clicked element is the background. - if (target === (lightbox === null || lightbox === void 0 ? void 0 : lightbox.current)) { - closeLightbox(); - } - } - - /** - * Escape handler. - * - * @param {Event} e The key press event. - */ - function escFunction(e) { - var key = e.key; - if (key === 'Escape') { - closeLightbox(); - } - } - - /** - * Reset the key to use Instant Images default. - */ - function getDefaultKey() { - inputRef.current.value = ''; - setTimeout(function () { - submitRef.current.click(); - }, 25); - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - var _lightbox$current; - document.addEventListener('keydown', escFunction, false); - lightbox === null || lightbox === void 0 || (_lightbox$current = lightbox.current) === null || _lightbox$current === void 0 || _lightbox$current.classList.add('active'); - return function () { - document.removeEventListener('keydown', escFunction, false); - }; - }, [provider]); //eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, provider ? - /*#__PURE__*/ - // eslint-disable-next-line - React.createElement("div", { - className: "api-lightbox", - ref: lightbox, - onClick: function onClick(e) { - return bkgClick(e); - }, - tabIndex: "-1" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", { - className: "api-lightbox--close", - onClick: function onClick() { - return closeLightbox(); - } - }, "\xD7", /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.btnClose)), /*#__PURE__*/React.createElement("div", { - className: "api-lightbox--details" - }, /*#__PURE__*/React.createElement("h3", null, (0,_ProviderIcons__WEBPACK_IMPORTED_MODULE_6__.getProviderIcon)(provider), provider), /*#__PURE__*/React.createElement("p", null, instant_img_localize["".concat(provider, "_api_desc")]), /*#__PURE__*/React.createElement("p", { - className: "action-controls" - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_4__.gotoURL)(instant_img_localize["".concat(provider, "_api_url")]); - } - }, instant_img_localize.get_api_key), provider !== 'giphy' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, "|"), /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return getDefaultKey(); - } - }, instant_img_localize.use_instant_images_key)) : null)), /*#__PURE__*/React.createElement("form", { - onSubmit: function onSubmit(e) { - return handleSubmit(e); - } - }, /*#__PURE__*/React.createElement("label", { - htmlFor: "key", - className: "offscreen" - }, instant_img_localize.enter_api_key), /*#__PURE__*/React.createElement("div", { - className: "api-lightbox--input-wrap" - }, /*#__PURE__*/React.createElement("span", { - className: apiStatus, - title: title && title - }, apiStatus === 'invalid' && /*#__PURE__*/React.createElement("i", { - className: "fa fa-exclamation-triangle", - "aria-hidden": "true" - }), apiStatus === 'valid' && /*#__PURE__*/React.createElement("i", { - className: "fa fa-check-circle", - "aria-hidden": "true" - }), apiStatus === 'loading' && /*#__PURE__*/React.createElement("i", { - className: "fa fa-spinner fa-spin", - "aria-hidden": "true" - })), /*#__PURE__*/React.createElement("input", { - type: "text", - id: "key", - ref: inputRef, - placeholder: "Enter API Key", - defaultValue: api_key - })), response && /*#__PURE__*/React.createElement("p", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('api-lightbox--response', apiStatus) - }, response), /*#__PURE__*/React.createElement("button", { - type: "submit", - ref: submitRef - }, instant_img_localize.btnVerify))))) : null); -} - -/***/ }), - -/***/ "./src/js/components/ErrorLightbox.js": -/*!********************************************!*\ - !*** ./src/js/components/ErrorLightbox.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ ErrorLightbox) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _functions_getErrorMessage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../functions/getErrorMessage */ "./src/js/functions/getErrorMessage.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _ProviderIcons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ProviderIcons */ "./src/js/components/ProviderIcons.js"); - - - - - - - -/** - * Render the ErrorLightbox component. - * Note: Component is display on initial plugin load if the default provider has an invalid API key. - * - * @return {JSX.Element} The ErrorLightbox component. - */ -function ErrorLightbox() { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider, - apiError = _usePluginContext.apiError; - var lightbox = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var status = apiError !== null && apiError !== void 0 && apiError.status ? apiError.status : null; - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, apiError && status && /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('api-lightbox', 'error-lightbox', 'active'), - ref: lightbox, - tabIndex: "-1" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('api-lightbox--details', 'error-lightbox') - }, /*#__PURE__*/React.createElement("h3", null, (0,_ProviderIcons__WEBPACK_IMPORTED_MODULE_5__.getProviderIcon)(provider), provider), /*#__PURE__*/React.createElement("p", { - className: "callout-warning" - }, status, " ", instant_img_localize.error), /*#__PURE__*/React.createElement("p", null, (0,_functions_getErrorMessage__WEBPACK_IMPORTED_MODULE_3__["default"])(status)), /*#__PURE__*/React.createElement("p", { - className: "more-info" - }, instant_img_localize.api_default_provider), /*#__PURE__*/React.createElement("p", { - className: "action-controls" - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_4__.gotoURL)(instant_img_localize["".concat(provider, "_api_url")]); - } - }, instant_img_localize.get_api_key)))))); -} - -/***/ }), - -/***/ "./src/js/components/Filter.js": -/*!*************************************!*\ - !*** ./src/js/components/Filter.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Filter) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hooks/useArrowControls */ "./src/js/hooks/useArrowControls.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - -/** - * Render the Filter component. - * - * @param {Object} props The component props. - * @param {Object} props.data The filter data. - * @param {string} props.filterKey The filter key. - * @param {Function} props.handler The change/click handler function. - * @return {JSX.Element} The Filter component. - */ -function Filter(props) { - var _data$filters; - var data = props.data, - filterKey = props.filterKey, - handler = props.handler; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider; - var defaultValue = data === null || data === void 0 ? void 0 : data["default"]; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - expanded = _useState2[0], - setExpanded = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultValue), - _useState4 = _slicedToArray(_useState3, 2), - selected = _useState4[0], - setSelected = _useState4[1]; - var dropdown = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var button = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var menu = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var id = "".concat(provider, "-").concat(filterKey); - var isColor = filterKey === 'colors' || filterKey === 'color'; - - // Use up/down arrow keys to navigate dropdown. - (0,_hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_3__.useArrowControls)(expanded, dropdown); - - /** - * Toggle menu open/closed. - * - * @param {Event} event The click event. - */ - function toggleMenu(event) { - event.preventDefault(); - - // If disabled, don't open menu. - var target = event.currentTarget; - if (target.disabled) { - return false; - } - if (expanded) { - setExpanded(false); - document.removeEventListener('click', closeMenuOutside); - } else { - setExpanded(true); - document.addEventListener('click', closeMenuOutside); - } - } - - /** - * Close menu when clicking outside. - * - * @param {Event} event The click event. - */ - function closeMenuOutside(event) { - var _menu$current, _button$current; - if (!(menu !== null && menu !== void 0 && (_menu$current = menu.current) !== null && _menu$current !== void 0 && _menu$current.contains(event.target)) && !(button !== null && button !== void 0 && (_button$current = button.current) !== null && _button$current !== void 0 && _button$current.contains(event.target))) { - setExpanded(false); - document.removeEventListener('click', closeMenuOutside); - } - } - - /** - * Checks for focus outside of component. - * - * @param {Event} event The click event. - */ - function focusOutside(event) { - if (!(dropdown !== null && dropdown !== void 0 && dropdown.current.contains(event.target))) { - closeMenuOutside(event); - } - } - - /** - * Detect esc key press. - * - * @param {Event} event The click event. - */ - function escClick(event) { - if (event.key === 'Escape') { - setExpanded(false); - } - } - - /** - * Click handler for the filter buttons. - * - * @param {string} filter The current filter key. - * @param {string} value The value to filter. - */ - function click(filter, value) { - var newValue = selected !== value ? value : defaultValue; - setSelected(newValue); - handler(filter, newValue); - setTimeout(function () { - var _button$current2; - button === null || button === void 0 || (_button$current2 = button.current) === null || _button$current2 === void 0 || _button$current2.click(); - }, 100); - } - - /** - * Convert a color to a CSS value. - * - * @see https://www.w3schools.com/colors/colors_names.asp - * - * @param {string} color The current color. - * @return {string} The color. - */ - function convertColor(color) { - if (color === 'lilac') { - color = 'DarkViolet'; - } - if (color === 'grayscale' || color === 'black_and_white') { - color = 'LightGray'; - } - return color; - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - // Initiate arrow menus. - // a11yarrows.init(dropdown?.current, { - // selector: "button", - // }); - - // Check for focus outside. - document.addEventListener('keyup', focusOutside); - document.addEventListener('keydown', escClick); - return function () { - document.removeEventListener('keyup', focusOutside); - document.removeEventListener('keydown', escClick); - }; - }, []); // eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement("div", { - className: "filter-dropdown", - id: id, - ref: dropdown - }, /*#__PURE__*/React.createElement("button", { - onClick: toggleMenu, - className: "filter-dropdown--button", - "aria-expanded": expanded ? 'true' : 'false', - ref: button - }, /*#__PURE__*/React.createElement("span", { - className: "filter-dropdown--button-label" - }, data === null || data === void 0 ? void 0 : data.label), /*#__PURE__*/React.createElement("span", { - className: "filter-dropdown--button-selected" - }, selected.replace(/_/g, ' '), /*#__PURE__*/React.createElement("i", { - className: "fa fa-caret-down", - "aria-hidden": "true" - }))), /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('filter-dropdown--menu', expanded ? 'expanded' : null), - "data-key": filterKey, - "aria-hidden": expanded ? 'false' : 'true', - ref: menu - }, (data === null || data === void 0 || (_data$filters = data.filters) === null || _data$filters === void 0 ? void 0 : _data$filters.length) && data.filters.map(function (filter, key) { - var label = filter.label, - value = filter.value; - return /*#__PURE__*/React.createElement("button", { - key: key, - disabled: selected === value, - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('filter-dropdown--item', selected === value ? 'selected' : null), - onClick: function onClick() { - return click(filterKey, value); - } - }, label, value !== 'all' && value !== 'transparent' && isColor ? /*#__PURE__*/React.createElement("span", { - className: "_color", - style: { - color: convertColor(value) - } - }) : null); - }))); -} - -/***/ }), - -/***/ "./src/js/components/Icon.js": -/*!***********************************!*\ - !*** ./src/js/components/Icon.js ***! - \***********************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ IconLogo: () => (/* binding */ IconLogo), -/* harmony export */ IconSVG: () => (/* binding */ IconSVG), -/* harmony export */ "default": () => (/* binding */ Icon) -/* harmony export */ }); -/** - * The Icon component. - * - * @return {JSX.Element} The Icon component. - */ -function Icon() { - return /*#__PURE__*/React.createElement("span", { - className: "instant-images-sidebar-icon" - }, /*#__PURE__*/React.createElement(IconSVG, null)); -} - -/** - * The SVG icon. - * - * @return {JSX.Element} The IconSVG component. - */ -function IconSVG() { - return /*#__PURE__*/React.createElement("svg", { - viewBox: "0 0 31 58", - width: "13px", - height: "24px" - }, /*#__PURE__*/React.createElement("polygon", { - points: "20 0 20 23 31 23 11 58 11 34 0 34 20 0", - fill: "#4a7bc5" - })); -} - -/** - * The SVG Logo. - * - * @return {JSX.Element} The IconLogo component. - */ -function IconLogo() { - return /*#__PURE__*/React.createElement("svg", { - width: "80", - height: "80", - viewBox: "0 0 80 80", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("title", null, "Instant Images Icon"), /*#__PURE__*/React.createElement("path", { - d: "M0 8C0 3.58172 3.58172 0 8 0H72C76.4183 0 80 3.58172 80 8V72C80 76.4183 76.4183 80 72 80H8C3.58172 80 0 76.4183 0 72V8Z", - fill: "#647FE8" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z", - fill: "white" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z", - fill: "white" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z", - fill: "#C7D2FF" - }), /*#__PURE__*/React.createElement("path", { - fillRule: "evenodd", - clipRule: "evenodd", - d: "M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z", - fill: "#C7D2FF" - })); -} - -/***/ }), - -/***/ "./src/js/components/InstantImages.js": -/*!********************************************!*\ - !*** ./src/js/components/InstantImages.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ InstantImages) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! masonry-layout */ "./node_modules/masonry-layout/masonry.js"); -/* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(masonry_layout__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var react_intersection_observer__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! react-intersection-observer */ "./node_modules/react-intersection-observer/dist/index.mjs"); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _constants_filters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../constants/filters */ "./src/js/constants/filters.js"); -/* harmony import */ var _editor_block_components_Header__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../editor/block/components/Header */ "./src/js/editor/block/components/Header.js"); -/* harmony import */ var _functions_buildURL__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../functions/buildURL */ "./src/js/functions/buildURL.js"); -/* harmony import */ var _functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../functions/consoleStatus */ "./src/js/functions/consoleStatus.js"); -/* harmony import */ var _functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../functions/getQueryParams */ "./src/js/functions/getQueryParams.js"); -/* harmony import */ var _functions_getResults__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../functions/getResults */ "./src/js/functions/getResults.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _functions_session__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../functions/session */ "./src/js/functions/session.js"); -/* harmony import */ var _APILightbox__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./APILightbox */ "./src/js/components/APILightbox.js"); -/* harmony import */ var _ErrorLightbox__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ErrorLightbox */ "./src/js/components/ErrorLightbox.js"); -/* harmony import */ var _Filter__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Filter */ "./src/js/components/Filter.js"); -/* harmony import */ var _LoadMore__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./LoadMore */ "./src/js/components/LoadMore.js"); -/* harmony import */ var _NoResults__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./NoResults */ "./src/js/components/NoResults.js"); -/* harmony import */ var _ProviderNav__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./ProviderNav */ "./src/js/components/ProviderNav.js"); -/* harmony import */ var _RestAPIError__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./RestAPIError */ "./src/js/components/RestAPIError.js"); -/* harmony import */ var _Results__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Results */ "./src/js/components/Results.js"); -/* harmony import */ var _ResultsWPBlock__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./ResultsWPBlock */ "./src/js/components/ResultsWPBlock.js"); -/* harmony import */ var _Tooltip__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Tooltip */ "./src/js/components/Tooltip.js"); -/* harmony import */ var _cta_Extended__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./cta/Extended */ "./src/js/components/cta/Extended.js"); -/* harmony import */ var _search_SearchForm__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./search/SearchForm */ "./src/js/components/search/SearchForm.js"); -/* harmony import */ var _search_SearchHeader__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./search/SearchHeader */ "./src/js/components/search/SearchHeader.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } -function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } -function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } -function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - -var imagesLoaded = __webpack_require__(/*! imagesloaded */ "./node_modules/imagesloaded/imagesloaded.js"); -var page = 1; - -/** - * Render the main InstantImages application component. - * - * @param {Object} props The component props. - * @param {string} props.editor Editor type. - * @param {string} props.provider Image provider. - * @param {Array} props.data API results. - * @param {Element} props.container Instant Images container element. - * @param {Object} props.api_error API error object. - * @param {string} props.clientId WP block client ID. - * @return {JSX.Element} InstantImages component. - */ -function InstantImages(props) { - var _instant_img_localize4, _Object$entries; - var _props$editor = props.editor, - editor = _props$editor === void 0 ? 'classic' : _props$editor, - provider = props.provider, - data = props.data, - container = props.container, - _props$api_error = props.api_error, - api_error = _props$api_error === void 0 ? null : _props$api_error, - _props$clientId = props.clientId, - clientId = _props$clientId === void 0 ? null : _props$clientId; - var _instant_img_localize = (_instant_img_localize4 = instant_img_localize) === null || _instant_img_localize4 === void 0 || (_instant_img_localize4 = _instant_img_localize4.addons) === null || _instant_img_localize4 === void 0 ? void 0 : _instant_img_localize4.extended, - _instant_img_localize2 = _instant_img_localize.activated, - extended_activated = _instant_img_localize2 === void 0 ? false : _instant_img_localize2, - _instant_img_localize3 = _instant_img_localize.license, - extended_license = _instant_img_localize3 === void 0 ? false : _instant_img_localize3; - var delay = 250; - var searchClass = 'searching'; - var searchDefaults = { - active: false, - term: '', - type: '', - results: 0 - }; - - // App state. - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(data)), - _useState2 = _slicedToArray(_useState, 2), - results = _useState2[0], - setResults = _useState2[1]; // Image results. - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(provider), - _useState4 = _slicedToArray(_useState3, 2), - activeProvider = _useState4[0], - setActiveProvider = _useState4[1]; // Current provider. - var _useState5 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]), - _useState6 = _slicedToArray(_useState5, 2), - apiTested = _useState6[0], - setAPITested = _useState6[1]; // API key test results. - var _useState7 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState8 = _slicedToArray(_useState7, 2), - mounted = _useState8[0], - setMounted = _useState8[1]; // App mounted state. - var _useState9 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(true), - _useState10 = _slicedToArray(_useState9, 2), - loading = _useState10[0], - setLoading = _useState10[1]; // Loading state - var _useState11 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState12 = _slicedToArray(_useState11, 2), - loadingMore = _useState12[0], - setLoadingMore = _useState12[1]; // Load more state. - var _useState13 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState14 = _slicedToArray(_useState13, 2), - done = _useState14[0], - setDone = _useState14[1]; // Done state. - var _useState15 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(api_error), - _useState16 = _slicedToArray(_useState15, 2), - apiError = _useState16[0], - setAPIError = _useState16[1]; // API Error. - var _useState17 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState18 = _slicedToArray(_useState17, 2), - showAPILightbox = _useState18[0], - setShowAPILightbox = _useState18[1]; // Render API key lightbox. - var _useState19 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(searchDefaults), - _useState20 = _slicedToArray(_useState19, 2), - search = _useState20[0], - setSearch = _useState20[1]; - var _useState21 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]), - _useState22 = _slicedToArray(_useState21, 2), - suggestions = _useState22[0], - setSuggestions = _useState22[1]; - var _useState23 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(_constants_filters__WEBPACK_IMPORTED_MODULE_5__.FILTERS[activeProvider].filters), - _useState24 = _slicedToArray(_useState23, 2), - filterOptions = _useState24[0], - setFilterOptions = _useState24[1]; - var _useState25 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}), - _useState26 = _slicedToArray(_useState25, 2), - filters = _useState26[0], - setFilters = _useState26[1]; - var _useState27 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}), - _useState28 = _slicedToArray(_useState27, 2), - searchFilters = _useState28[0], - setSearchFilters = _useState28[1]; - - // Refs. - var _useInView = (0,react_intersection_observer__WEBPACK_IMPORTED_MODULE_26__.useInView)({ - rootMargin: '0px 0px' - }), - _useInView2 = _slicedToArray(_useInView, 2), - loadMoreRef = _useInView2[0], - inView = _useInView2[1]; - var photosRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var searchInputRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var msnryRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - - // WP Editor props. - var wpBlock = editor === 'block' ? true : false; - var blockSidebar = editor === 'sidebar' ? true : false; - var isBlockEditor = wpBlock || blockSidebar ? true : false; - var mediaModal = editor === 'media-modal' ? true : false; - var body = document.body; - var plugin = isBlockEditor ? container : container.parentNode.parentNode; - var wrapper = isBlockEditor ? container : plugin.querySelector('.instant-images-wrapper'); - - /** - * Get the initial set of photos for the current view (New/Popular/Filters/etc...). - * - * @param {boolean} reset Reset the current view. - * @since 3.0 - */ - function getPhotos() { - return _getPhotos.apply(this, arguments); - } - /** - * Load more photos in infinite scroll style. - * - * @since 3.0 - */ - function _getPhotos() { - _getPhotos = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() { - var _searchInputRef$curre2; - var reset, - params, - url, - sessionData, - response, - status, - headers, - apiResults, - _apiResults$error, - error, - _args = arguments; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - reset = _args.length > 0 && _args[0] !== undefined ? _args[0] : false; - if (!loadingMore) { - _context.next = 3; - break; - } - return _context.abrupt("return", false); - case 3: - if (!(!reset && (searchInputRef === null || searchInputRef === void 0 || (_searchInputRef$curre2 = searchInputRef.current) === null || _searchInputRef$curre2 === void 0 ? void 0 : _searchInputRef$curre2.value) !== '')) { - _context.next = 7; - break; - } - if (!(extended_activated && extended_license)) { - _context.next = 7; - break; - } - doSearch(searchInputRef.current.value); - return _context.abrupt("return"); - case 7: - setLoading(true); // Set loading state. - clearSearch(); // Reset search results. - - resetScrollPosition(); - page = 1; - - // Build URL. - params = (0,_functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__["default"])(activeProvider, filters); - url = (0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__["default"])('photos', params); // Get session storage. - sessionData = (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.getSession)(url); - if (!sessionData) { - _context.next = 18; - break; - } - // Display results from session. - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(sessionData), false, null); - _context.next = 37; - break; - case 18: - _context.next = 20; - return fetch(url); - case 20: - response = _context.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - _context.prev = 23; - _context.next = 26; - return response.json(); - case 26: - apiResults = _context.sent; - _apiResults$error = apiResults.error, error = _apiResults$error === void 0 ? null : _apiResults$error; - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(apiResults), false, error); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.saveSession)(url, apiResults); - _context.next = 37; - break; - case 32: - _context.prev = 32; - _context.t0 = _context["catch"](23); - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__["default"])(provider, status); - setLoading(false); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.deleteSession)(url); - case 37: - // Delay loading animatons for effect. - setTimeout(function () { - setLoading(false); - }, delay); - case 38: - case "end": - return _context.stop(); - } - }, _callee, null, [[23, 32]]); - })); - return _getPhotos.apply(this, arguments); - } - function loadMorePhotos() { - return _loadMorePhotos.apply(this, arguments); - } - /** - * Perform a photo search. - * - * @param {string} term Search term. - * @since 3.0 - */ - function _loadMorePhotos() { - _loadMorePhotos = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { - var searchQuery, type, activeFilters, loadmoreParams, params, url, sessionData, response, status, headers, apiResults, _apiResults$error2, error; - return _regeneratorRuntime().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - if (!(!mounted || loading || loadingMore || done)) { - _context2.next = 2; - break; - } - return _context2.abrupt("return"); - case 2: - setLoadingMore(true); - page = parseInt(page) + 1; - - // Get search query. - searchQuery = search !== null && search !== void 0 && search.active && search !== null && search !== void 0 && search.term ? { - term: search.term - } : {}; // Build URL. - type = search !== null && search !== void 0 && search.active ? 'search' : 'photos'; - activeFilters = search !== null && search !== void 0 && search.active ? searchFilters : filters; - loadmoreParams = _objectSpread(_objectSpread(_objectSpread({}, { - page: page - }), searchQuery), activeFilters); - params = (0,_functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__["default"])(activeProvider, loadmoreParams); - url = (0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__["default"])(type, params); // Get session storage. - sessionData = (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.getSession)(url); - if (!sessionData) { - _context2.next = 15; - break; - } - // Display results from session. - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(sessionData), true, null); - _context2.next = 34; - break; - case 15: - _context2.next = 17; - return fetch(url); - case 17: - response = _context2.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - _context2.prev = 20; - _context2.next = 23; - return response.json(); - case 23: - apiResults = _context2.sent; - _apiResults$error2 = apiResults.error, error = _apiResults$error2 === void 0 ? null : _apiResults$error2; - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(apiResults), true, error); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.saveSession)(url, apiResults); - _context2.next = 34; - break; - case 29: - _context2.prev = 29; - _context2.t0 = _context2["catch"](20); - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__["default"])(provider, status); - setLoadingMore(false); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.deleteSession)(url); - case 34: - case "end": - return _context2.stop(); - } - }, _callee2, null, [[20, 29]]); - })); - return _loadMorePhotos.apply(this, arguments); - } - function doSearch(_x) { - return _doSearch.apply(this, arguments); - } - /** - * Handle the display results. - * - * @param {Array} images Image array. - * @param {boolean} append Append images to existing results display. - * @param {string|null} error Error message. - */ - function _doSearch() { - _doSearch = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(term) { - var searchType, searchQuery, searchParams, params, url, sessionData, response, status, headers, apiResults, _apiResults$error3, error; - return _regeneratorRuntime().wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - setLoading(true); - resetScrollPosition(); - page = 1; // Reset current page num. - searchType = term.substring(0, 3) === 'id:' ? 'id' : 'term'; // Get search query. - searchQuery = searchType === 'id' ? { - id: term.replace('id:', '').replace(/\s+/, '') - } : { - term: term - }; // Build URL. - searchParams = _objectSpread(_objectSpread(_objectSpread({}, { - page: page - }), searchQuery), searchFilters); - params = (0,_functions_getQueryParams__WEBPACK_IMPORTED_MODULE_9__["default"])(activeProvider, searchParams); - url = (0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__["default"])('search', params); // Get session storage. - sessionData = (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.getSession)(url); - if (!sessionData) { - _context3.next = 14; - break; - } - // Display results from session. - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(sessionData), false, null); - setSearch({ - active: true, - term: term, - type: searchType, - results: (0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__.getSearchTotal)(sessionData) - }); - _context3.next = 35; - break; - case 14: - _context3.next = 16; - return fetch(url); - case 16: - response = _context3.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - _context3.prev = 19; - _context3.next = 22; - return response.json(); - case 22: - apiResults = _context3.sent; - _apiResults$error3 = apiResults.error, error = _apiResults$error3 === void 0 ? null : _apiResults$error3; - displayResults((0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__["default"])(apiResults), false, error); - setSearch({ - active: true, - term: term, - type: searchType, - results: (0,_functions_getResults__WEBPACK_IMPORTED_MODULE_10__.getSearchTotal)(apiResults) - }); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.saveSession)(url, apiResults); - _context3.next = 35; - break; - case 29: - _context3.prev = 29; - _context3.t0 = _context3["catch"](19); - // Reset all search parameters. - setDone(true); - setLoading(false); - (0,_functions_consoleStatus__WEBPACK_IMPORTED_MODULE_8__["default"])(provider, status); - (0,_functions_session__WEBPACK_IMPORTED_MODULE_12__.deleteSession)(url); - case 35: - searchInputRef.current.classList.remove(searchClass); - case 36: - case "end": - return _context3.stop(); - } - }, _callee3, null, [[19, 29]]); - })); - return _doSearch.apply(this, arguments); - } - function displayResults() { - var images = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - var append = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - var error = arguments.length > 2 ? arguments[2] : undefined; - checkResults(images === null || images === void 0 ? void 0 : images.length); - if (append) { - setResults(function (prevState) { - return [].concat(_toConsumableArray(prevState), _toConsumableArray(images)); - }); // Load more. - } else { - setResults(images); // Standard switch. - } - setAPIError(error); - } - - /** - * Handle the Photo Search. - * - * @param {Event} event The dispatched submit event. - * @since 3.0 - */ - function searchHandler(event) { - event.preventDefault(); - var term = searchInputRef.current.value; - if (term.length > 2) { - searchInputRef.current.classList.add(searchClass); - doSearch(term); - } else { - searchInputRef.current.focus(); - } - } - - /** - * Reset search results, settings and results view. - * - * @since 3.0 - */ - function clearSearch() { - var _searchInputRef$curre; - var term = (searchInputRef === null || searchInputRef === void 0 || (_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 ? void 0 : _searchInputRef$curre.value) || ''; - if (term) { - searchInputRef.current.value = ''; - } - setSearch(searchDefaults); - setSuggestions([]); - } - - /** - * Filter the photo listing. - * - * @param {string} filter The current filter key. - * @param {string} value The value to filter. - */ - function filterPhotos(filter, value) { - var newFilters = _objectSpread({}, filters); - if (newFilters[filter] && value === '#' || value === '' || value === 'all') { - delete newFilters[filter]; - } else { - newFilters[filter] = value; - } - setFilters(_objectSpread({}, newFilters)); - } - - /** - * Filter the search results. - * - * @param {string} filter The current filter key. - * @param {string} value The value to filter. - */ - function filterSearch(filter, value) { - var newSearchFilters = _objectSpread({}, searchFilters); - if (newSearchFilters[filter] && value === '#' || value === '' || value === 'all') { - delete newSearchFilters[filter]; - } else { - newSearchFilters[filter] = value; - } - setSearchFilters(_objectSpread({}, newSearchFilters)); - } - - /** - * Close the API Lightbox. - * - * @param {string} target The target provider to close the lightbox for. - * @since 4.5 - */ - function closeAPILightbox() { - var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - if (target) { - setActiveProvider(target); - } - setShowAPILightbox(false); - setLoading(false); - setAPIError(false); - body.classList.remove('overflow-hidden'); - } - - /** - * Switch API providers. - * - * @param {string} newProvider The provider to switch to. - * @since 4.5 - */ - function switchProvider(_x2) { - return _switchProvider.apply(this, arguments); - } - /** - * Get autocomplete search suggestions. - * - * @param {string} term The search term. - * @return {Array} The autocomplete suggestions. - */ - function _switchProvider() { - _switchProvider = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(newProvider) { - var response, status, headers; - return _regeneratorRuntime().wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - if (!(activeProvider === newProvider)) { - _context4.next = 2; - break; - } - return _context4.abrupt("return"); - case 2: - setLoading(true); - setAPIError(false); - setShowAPILightbox(false); - body.classList.remove('overflow-hidden'); - - // API verification - check API key for provider. - if (!(_constants_API__WEBPACK_IMPORTED_MODULE_4__.API[newProvider].requires_key && !apiTested.includes(newProvider))) { - _context4.next = 27; - break; - } - _context4.prev = 7; - _context4.next = 10; - return fetch((0,_functions_buildURL__WEBPACK_IMPORTED_MODULE_7__.buildTestURL)(newProvider)); - case 10: - response = _context4.sent; - status = response.status, headers = response.headers; - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_11__.checkRateLimit)(headers); - if (!(status !== 200)) { - _context4.next = 18; - break; - } - // Catch API errors and 401s. - setShowAPILightbox(newProvider); // Show API Lightbox. - setAPIError(true); - body.classList.add('overflow-hidden'); - return _context4.abrupt("return"); - case 18: - if (status === 200) { - // Valid API key - Add to array of tested providers. - setAPITested(function (prevState) { - return [].concat(_toConsumableArray(prevState), [newProvider]); - }); - } - _context4.next = 27; - break; - case 21: - _context4.prev = 21; - _context4.t0 = _context4["catch"](7); - // Catch all other errors. - setShowAPILightbox(newProvider); // Show API Lightbox. - body.classList.add('overflow-hidden'); - setAPIError(true); - return _context4.abrupt("return"); - case 27: - // Add slight delay for loading effect. - setTimeout(function () { - setFilterOptions(_constants_filters__WEBPACK_IMPORTED_MODULE_5__.FILTERS[newProvider].filters); // Update filter options. - setActiveProvider(newProvider); // Switch the provider. - }, delay); - case 28: - case "end": - return _context4.stop(); - } - }, _callee4, null, [[7, 21]]); - })); - return _switchProvider.apply(this, arguments); - } - function getSuggestions(_x3) { - return _getSuggestions.apply(this, arguments); - } - /** - * Renders the Masonry layout. - * - * @since 3.0 - */ - function _getSuggestions() { - _getSuggestions = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(term) { - var api_url; - return _regeneratorRuntime().wrap(function _callee5$(_context5) { - while (1) switch (_context5.prev = _context5.next) { - case 0: - if (!(!term || (term === null || term === void 0 ? void 0 : term.length) < 3)) { - _context5.next = 2; - break; - } - return _context5.abrupt("return"); - case 2: - // API endpoint URL. - api_url = instant_img_localize.root + "instant-images-extended/suggestions/?term=".concat(term); // Get suggestions. - _context5.next = 5; - return axios__WEBPACK_IMPORTED_MODULE_27__["default"].get(api_url).then(function (res) { - setSuggestions(res.data); - })["catch"](function (error) { - console.warn(error); - }); - case 5: - case "end": - return _context5.stop(); - } - }, _callee5); - })); - return _getSuggestions.apply(this, arguments); - } - function renderLayout() { - imagesLoaded(photosRef.current, function () { - if (!isBlockEditor) { - msnryRef.current = new (masonry_layout__WEBPACK_IMPORTED_MODULE_2___default())(photosRef.current, { - itemSelector: '.photo' - }); - photosRef.current.querySelectorAll('.photo').forEach(function (el) { - el.classList.add('in-view'); - }); - } - setTimeout(function () { - // Delay to allow for rendering and set up. - setLoading(false); - setLoadingMore(false); - if (!mounted) { - setMounted(true); - } - }, delay); - }); - } - - /** - * Reset the scroll position for the WP block only. - */ - function resetScrollPosition() { - if (wpBlock && photosRef !== null && photosRef !== void 0 && photosRef.current) { - photosRef === null || photosRef === void 0 || photosRef.current.scroll({ - top: 0, - left: 0, - behavior: 'smooth' - }); - } - } - - /** - * A checker to determine if there are remaining search results. - * - * @param {number} num Total search results. - * @since 3.0 - */ - function checkResults(num) { - setDone(parseInt(num) === 0 || num === undefined); - } - - /** - * Escape handler to close edit windows on photos. - * - * @param {Event} e The key event. - */ - function escFunction(e) { - var key = e.key; - if (key === 'Escape') { - var editing = photosRef.current.querySelectorAll('.edit-screen.editing'); - if (editing) { - _toConsumableArray(editing).forEach(function (element) { - element === null || element === void 0 || element.classList.remove('editing'); - }); - } - } - } - - /* Search callback. */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (!(search !== null && search !== void 0 && search.active)) { - // Reset search filters when search is false. - setSearchFilters({}); - } - }, [search]); // eslint-disable-line react-hooks/exhaustive-deps - - /* Search filters change callback. */ - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (mounted && search !== null && search !== void 0 && search.active) { - doSearch(search === null || search === void 0 ? void 0 : search.term); - } - }, [searchFilters]); // eslint-disable-line react-hooks/exhaustive-deps - - // Filters change callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (mounted) { - getPhotos(); - } - }, [filters]); // eslint-disable-line react-hooks/exhaustive-deps - - // Provider change callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - setFilterOptions(_constants_filters__WEBPACK_IMPORTED_MODULE_5__.FILTERS[activeProvider].filters); - setFilters({}); // Trigger filter change. - }, [activeProvider]); // eslint-disable-line react-hooks/exhaustive-deps - - // Scroll in-view callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - // Infinite scrolling. - loadMorePhotos(); - }, [inView]); // eslint-disable-line react-hooks/exhaustive-deps - - // Results callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - renderLayout(); - }, [results]); // eslint-disable-line react-hooks/exhaustive-deps - - // Initial page load. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - setLoading(false); - wrapper.classList.add('loaded'); - - // Block editor, get initial set of photos. - if (isBlockEditor) { - getPhotos(); - } - // Add global escape listener. - document.addEventListener('keydown', escFunction, false); - return function () { - document.removeEventListener('keydown', escFunction, false); - }; - }, []); // eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement(_common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__.PluginProvider, { - value: { - provider: activeProvider, - wpBlock: wpBlock, - mediaModal: mediaModal, - blockSidebar: blockSidebar, - clientId: clientId, - search: search, - apiError: apiError, - getPhotos: getPhotos, - searchHandler: searchHandler, - filterSearch: filterSearch, - suggestions: suggestions, - getSuggestions: getSuggestions - } - }, wpBlock ? /*#__PURE__*/React.createElement(_editor_block_components_Header__WEBPACK_IMPORTED_MODULE_6__["default"], { - switchProvider: switchProvider - }) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_ProviderNav__WEBPACK_IMPORTED_MODULE_18__["default"], { - switchProvider: switchProvider - }), /*#__PURE__*/React.createElement(_cta_Extended__WEBPACK_IMPORTED_MODULE_23__.ExtendedCTA, null)), /*#__PURE__*/React.createElement(_RestAPIError__WEBPACK_IMPORTED_MODULE_19__["default"], null), /*#__PURE__*/React.createElement("div", { - className: "control-nav" - }, /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('control-nav--filters-wrap', apiError || search !== null && search !== void 0 && search.active ? 'inactive' : null) - }, filterOptions && (_Object$entries = Object.entries(filterOptions)) !== null && _Object$entries !== void 0 && _Object$entries.length ? /*#__PURE__*/React.createElement("div", { - className: "control-nav--filters" - }, Object.entries(filterOptions).map(function (_ref, index) { - var _ref2 = _slicedToArray(_ref, 2), - key = _ref2[0], - filter = _ref2[1]; - return /*#__PURE__*/React.createElement(_Filter__WEBPACK_IMPORTED_MODULE_15__["default"], { - key: "".concat(activeProvider, "-").concat(index, "-").concat(key), - data: filter, - filterKey: key, - handler: filterPhotos - }); - })) : null), /*#__PURE__*/React.createElement(_search_SearchForm__WEBPACK_IMPORTED_MODULE_24__["default"], { - ref: searchInputRef - })), /*#__PURE__*/React.createElement("div", { - id: "photo-listing", - className: loading ? 'loading' : null - }, /*#__PURE__*/React.createElement(_search_SearchHeader__WEBPACK_IMPORTED_MODULE_25__["default"], null), wpBlock ? /*#__PURE__*/React.createElement(_ResultsWPBlock__WEBPACK_IMPORTED_MODULE_21__["default"], { - ref: photosRef, - data: results, - done: done, - loadMorePhotos: loadMorePhotos - }) : /*#__PURE__*/React.createElement(_Results__WEBPACK_IMPORTED_MODULE_20__["default"], { - ref: photosRef, - data: results - }), /*#__PURE__*/React.createElement(_NoResults__WEBPACK_IMPORTED_MODULE_17__["default"], { - total: search === null || search === void 0 ? void 0 : search.results, - is_search: search === null || search === void 0 ? void 0 : search.active - }), /*#__PURE__*/React.createElement(_LoadMore__WEBPACK_IMPORTED_MODULE_16__["default"], { - ref: loadMoreRef, - loadMorePhotos: loadMorePhotos, - loading: loadingMore, - done: done - }), /*#__PURE__*/React.createElement(_APILightbox__WEBPACK_IMPORTED_MODULE_13__["default"], { - provider: showAPILightbox, - callback: closeAPILightbox - }), /*#__PURE__*/React.createElement(_ErrorLightbox__WEBPACK_IMPORTED_MODULE_14__["default"], null), /*#__PURE__*/React.createElement(_Tooltip__WEBPACK_IMPORTED_MODULE_22__["default"], null)))); -} - -/***/ }), - -/***/ "./src/js/components/LoadMore.js": -/*!***************************************!*\ - !*** ./src/js/components/LoadMore.js ***! - \***************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); - - - - -/** - * Render the LoadMore component. - * - * @return {JSX.Element} The LoadMore component. - */ -var LoadMore = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var loadMorePhotos = props.loadMorePhotos, - loading = props.loading, - done = props.done; - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('load-more-wrap', loading ? 'loading' : null, done ? 'done' : null), - ref: ref - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button", - onClick: function onClick() { - return loadMorePhotos(); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Load More Images', 'instant-images'))); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LoadMore); - -/***/ }), - -/***/ "./src/js/components/NoResults.js": -/*!****************************************!*\ - !*** ./src/js/components/NoResults.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ NoResults) -/* harmony export */ }); -/** - * Render the NoResults component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The NoResults component. - */ -function NoResults(props) { - var _props$total = props.total, - total = _props$total === void 0 ? 0 : _props$total, - _props$is_search = props.is_search, - is_search = _props$is_search === void 0 ? false : _props$is_search; - if (!is_search || is_search && total >= 1) { - // Bail if not search or search total is greater than 1. - return null; - } - return /*#__PURE__*/React.createElement("div", { - className: "instant-images-no-results" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", null, instant_img_localize.no_results, " "), /*#__PURE__*/React.createElement("p", null, instant_img_localize.no_results_desc, " "))); -} - -/***/ }), - -/***/ "./src/js/components/Photo.js": -/*!************************************!*\ - !*** ./src/js/components/Photo.js ***! - \************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Photo) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _editor_utils_insertImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../editor/utils/insertImage */ "./src/js/editor/utils/insertImage.js"); -/* harmony import */ var _editor_utils_setFeaturedImage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../editor/utils/setFeaturedImage */ "./src/js/editor/utils/setFeaturedImage.js"); -/* harmony import */ var _functions_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../functions/helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _functions_providers_unsplash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../functions/providers/unsplash */ "./src/js/functions/providers/unsplash.js"); -/* harmony import */ var _functions_generateAttribution__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../functions/generateAttribution */ "./src/js/functions/generateAttribution.js"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - - - - -/** - * Render the Photo component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The Photo component. - */ -function Photo(props) { - var result = props.result, - setInactive = props.setInactive; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider, - _usePluginContext$wpB = _usePluginContext.wpBlock, - wpBlock = _usePluginContext$wpB === void 0 ? false : _usePluginContext$wpB, - _usePluginContext$med = _usePluginContext.mediaModal, - mediaModal = _usePluginContext$med === void 0 ? false : _usePluginContext$med, - _usePluginContext$blo = _usePluginContext.blockSidebar, - blockSidebar = _usePluginContext$blo === void 0 ? false : _usePluginContext$blo, - clientId = _usePluginContext.clientId; - var id = result.id, - filename = result.id, - permalink = result.permalink, - title = result.title, - alt = result.alt, - caption = result.caption, - attribution = result.attribution, - _result$extension = result.extension, - extension = _result$extension === void 0 ? 'jpg' : _result$extension, - likes = result.likes, - dimensions = result.dimensions, - urls = result.urls, - user = result.user; - - // Deconstruct image URLs. - var thumb = urls.thumb, - full = urls.full, - download_url = urls.download_url; - - // Deconstruct user data. - var user_name = user.name, - user_photo = user.photo, - user_url = user.url; - var container = document.querySelector('.instant-img-container'); - var likeDisplay = parseInt(likes) === 1 ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Like', 'instant-images') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Likes', 'instant-images'); - var _instant_img_localize = instant_img_localize, - _instant_img_localize2 = _instant_img_localize.attribution_hook, - attribution_hook = _instant_img_localize2 === void 0 ? false : _instant_img_localize2, - _instant_img_localize3 = _instant_img_localize.auto_attribution, - auto_attribution = _instant_img_localize3 === void 0 ? false : _instant_img_localize3; - - // Get the attribution text. - var imageAttribution = attribution_hook ? (0,_functions_generateAttribution__WEBPACK_IMPORTED_MODULE_7__["default"])(attribution_hook, provider, permalink, user) : attribution; - var imageCaption = auto_attribution === '1' ? imageAttribution : caption; - - // Photo state. - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ - filename: filename, - title: title, - alt: alt, - caption: imageCaption - }), - _useState2 = _slicedToArray(_useState, 2), - imageDetails = _useState2[0], - setImageDetails = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState4 = _slicedToArray(_useState3, 2), - inProgress = _useState4[0], - setInProgress = _useState4[1]; // inProgress state. - var _useState5 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('loaded'), - _useState6 = _slicedToArray(_useState5, 2), - status = _useState6[0], - setStatus = _useState6[1]; // Status state. - var _useState7 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(''), - _useState8 = _slicedToArray(_useState7, 2), - editURL = _useState8[0], - setEditURL = _useState8[1]; // Edit URL state. - - // Refs. - var photo = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var image = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var upload = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var editScreen = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var captionRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - - // Gutenberg. - var setAsFeaturedImage = false; - var insertIntoPost = false; - - /** - * Function to trigger the image download. - * - * @since 4.3 - */ - function download() { - if (inProgress || status === 'success' || status === 'uploaded') { - return false; // Exit if uploading, uploaded or success. - } - var target = upload === null || upload === void 0 ? void 0 : upload.current; - setInProgress(true); - setStatus('uploading'); - if (wpBlock) { - setInactive(true); // Make Instant Images inactive after selecting an image. - } - - // API URL - var api = instant_img_localize.root + 'instant-images/download/'; - - // Data Params - var data = { - provider: provider, - id: target.getAttribute('data-id'), - image_url: target.getAttribute('data-url'), - filename: target.getAttribute('data-id'), - extension: extension, - custom_filename: target.getAttribute('data-filename'), - title: target.getAttribute('data-title'), - alt: target.getAttribute('data-alt'), - caption: target.getAttribute('data-caption'), - parent_id: instant_img_localize.parent_id, - lang: instant_img_localize.lang - }; - - // Config Params - var config = { - credentials: 'same-origin', - headers: { - 'X-WP-Nonce': instant_img_localize.nonce, - 'Content-Type': 'application/json' - } - }; - axios__WEBPACK_IMPORTED_MODULE_9__["default"].post(api, JSON.stringify(data), config).then(function (res) { - var response = res.data; - if (response) { - // Successful response from server - var success = response.success; - var attachment = response.attachment; - var admin_url = response.admin_url; - var msg = response.msg; - if (success) { - var edit_url = "".concat(admin_url, "post.php?post=").concat(attachment.id, "&action=edit"); // Edit URL. - setEditURL(edit_url); - uploadComplete(target, msg, attachment.id); // Success/Upload Complete - - // Trigger a download at Unsplash. - if (provider === 'unsplash' && download_url) { - (0,_functions_providers_unsplash__WEBPACK_IMPORTED_MODULE_6__.unsplashDownload)(download_url); - } - - /** - * Gutenberg options. - */ - - // Set Featured Image via Sidebar. - if (blockSidebar && setAsFeaturedImage) { - (0,_editor_utils_setFeaturedImage__WEBPACK_IMPORTED_MODULE_4__["default"])(attachment); - setAsFeaturedImage = false; - closeMediaModal(); - } - - // Insert Image via Sidebar. - if (blockSidebar && insertIntoPost) { - setTimeout(function () { - // Delay for effect. - (0,_editor_utils_insertImage__WEBPACK_IMPORTED_MODULE_3__["default"])(attachment); - }, 250); - closeMediaModal(); - insertIntoPost = false; - } - - // Insert Image via WP Block. - if (wpBlock && clientId) { - setStatus('uploaded'); - setTimeout(function () { - // Delay for effect. - (0,_editor_utils_insertImage__WEBPACK_IMPORTED_MODULE_3__["default"])(attachment, clientId); - }, 350); - closeMediaModal(); - insertIntoPost = false; - } - - /** - * Media Modal. - * If is media popup, redirect user to media-upload settings. - */ - if (container.dataset.mediaPopup === 'true' && !blockSidebar) { - window.location = 'media-upload.php?type=image&tab=library&attachment_id=' + attachment.id; - } - } else { - // Error - uploadError(target, msg); - } - } else { - // Error - uploadError(target, instant_img_localize.error_upload); - } - })["catch"](function (error) { - console.warn(error); - }); - } - - /** - * Upload complete function. - * - * @param {Element} target Clicked item. - * @param {string} msg Success Msg. - * @param {string} imageID Attachment id. - * @since 3.0 - */ - function uploadComplete(target, msg, imageID) { - if (!(photo !== null && photo !== void 0 && photo.current)) { - return; - } - setImageTitle(target, msg); - setStatus('uploaded'); - setInProgress(false); - - // Remove uploaded status after 3.5 seconds. - setTimeout(function () { - setStatus('success'); - }, 3500); - - // Refresh Media Router/Modal. - refreshMediaModal(imageID); - } - - /** - * Handler to send user to edit photo link after upload. - * - * @since 5.2.0 - */ - function editAfterUpload() { - if (editURL) { - window.location = editURL; - } - } - - /** - * Function used to trigger a download and then set as featured image - * - * @param {Element} e The clicked element. - * @since 4.0 - */ - function setFeaturedImageClick(e) { - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - if (upload.current) { - setAsFeaturedImage = true; - upload.current.click(); - } - } - - /** - * Function used to insert an image directly into the block (Gutenberg) editor. - * - * @param {Element} e The clicked element. - * @since 4.0 - */ - function insertImageIntoPost(e) { - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - if (upload.current) { - insertIntoPost = true; - upload.current.click(); - } - } - - /** - * Refresh Media Modal and select item after it's been uploaded. - * - * @param {string} modalID The media modal ID. - * @since 4.3 - */ - function refreshMediaModal(modalID) { - if (mediaModal && wp.media && wp.media.frame && wp.media.frame.el) { - var mediaModalEl = wp.media.frame.el; - var mediaTab = mediaModalEl.querySelector('#menu-item-browse'); - if (mediaTab) { - // Open the 'Media Library' tab. - mediaTab.click(); - } - - // Delay to allow for tab switching - setTimeout(function () { - if (wp.media.frame.content.get() !== null) { - // Force a refresh of the mdeia modal content. - wp.media.frame.content.get().collection._requery(true); - } - - // Select the attached that was just uploaded. - var selection = wp.media.frame.state().get('selection'); - var selected = parseInt(modalID); - selection.reset(selected ? [wp.media.attachment(selected)] : []); - }, 100); - } - } - - /** - * Function runs when error occurs on upload or resize. - * - * @param {Element} target Current clicked item. - * @param {string} msg Error Msg. - * @since 3.0 - */ - function uploadError(target, msg) { - setImageTitle(target, msg); - setInProgress(false); - setStatus('error'); - setInactive(false); - console.warn(msg); - } - - /** - * Set the title attribute of target. - * - * @param {Element} target Clicked element. - * @param {string} msg Title message from JSON. - * @since 3.0 - */ - function setImageTitle(target, msg) { - target.setAttribute('title', msg); // Remove 'Click to upload...', set new value - } - - /** - * Displays the edit screen. - * - * @param {Element} e The target element. - * @since 3.2 - */ - function showEditScreen(e) { - e.preventDefault(); - (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - - // Get all open edit screens and close them. - var openEdits = document.querySelectorAll('.edit-screen.editing'); - if (openEdits) { - openEdits.forEach(function (edit) { - edit.classList.remove('editing'); - }); - } - - // Show edit screen - editScreen.current.classList.add('editing'); - - // Set focus on edit screen - setTimeout(function () { - editScreen.current.focus({ - preventScroll: true - }); - }, 150); - } - - /** - * Handles the change event for the edit screen. - * - * @param {Element} e The target element. - * @since 3.2 - */ - function handleEditChange(e) { - var target = e.target.name; - switch (target) { - case 'filename': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - filename: e.target.value - })); - break; - case 'title': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - title: e.target.value - })); - break; - case 'alt': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - alt: e.target.value - })); - break; - case 'caption': - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - caption: e.target.value - })); - break; - } - } - - /** - * Handles the Upload event from the edit screen. - * - * @since 3.2 - */ - function uploadNow() { - editScreen.current.classList.remove('editing'); // Hide edit screen. - upload.current.click(); // Trigger click. - } - - /** - * Cancel event for the edit screen. - * - * @since 3.2 - */ - function cancelEdit() { - // Reset image state. - setImageDetails({ - filename: filename, - title: title, - alt: alt, - caption: imageCaption - }); - - // Hide edit screen - editScreen.current.classList.remove('editing'); - - // Set focus back on photo. - upload.current.focus({ - preventScrol: true - }); - } - - /** - * Close the media modal after an action. - * - * @since 4.3 - */ - function closeMediaModal() { - var mediaModalEl = document.querySelector('.media-modal'); - if (mediaModalEl) { - var closeBtn = mediaModalEl.querySelector('button.media-modal-close'); - if (!closeBtn) { - return false; - } - closeBtn.click(); - } - } - - /** - * Handles adding attribution for images. - * - * @param {Element} e The target element. - * @since 4.5 - */ - function addAttribution(e) { - e.preventDefault(); - captionRef.current.value = imageAttribution; // Set form value. - setImageDetails(_objectSpread(_objectSpread({}, imageDetails), {}, { - caption: imageAttribution - })); // Set caption state. - } - - /** - * Show a GIF preview image. - * Giphy only. - * - * @param {boolean} show Show a preview. - */ - function showPreview(show) { - if (!provider === 'giphy') { - return; - } - if (show) { - image.current.src = full; - } else { - image.current.src = thumb; - } - } - return /*#__PURE__*/React.createElement("article", { - className: "photo", - ref: photo - }, /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('photo-wrap', "photo-".concat(status)) - }, /*#__PURE__*/React.createElement("div", { - className: "img-wrap" - }, /*#__PURE__*/React.createElement("button", { - className: "photo-upload", - ref: upload, - "data-id": id, - "data-url": full, - "data-filename": imageDetails.filename, - "data-title": imageDetails.title, - "data-alt": imageDetails.alt, - "data-caption": imageDetails.caption, - "aria-label": wpBlock ? instant_img_localize.insert_into_post : instant_img_localize.upload, - onClick: function onClick() { - return download(); - }, - onMouseEnter: function onMouseEnter() { - return showPreview(true); - }, - onMouseLeave: function onMouseLeave() { - return showPreview(false); - } - }, /*#__PURE__*/React.createElement("img", { - src: thumb, - alt: alt, - className: status, - ref: image - })), /*#__PURE__*/React.createElement("div", { - className: "photo-controls" - }, /*#__PURE__*/React.createElement("a", { - target: "_blank", - className: "user fade", - href: user_url, - rel: "noopener noreferrer", - title: "".concat(instant_img_localize.view_all, " @ ").concat(user_name) - }, /*#__PURE__*/React.createElement("div", { - className: "user-wrap" - }, (user_photo === null || user_photo === void 0 ? void 0 : user_photo.length) > 0 && /*#__PURE__*/React.createElement("img", { - className: "user-wrap--photo", - src: user_photo, - alt: "" - }), user_name)), /*#__PURE__*/React.createElement("div", { - className: "photo-options" - }, blockSidebar && !editURL ? /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "set-featured fade", - "data-title": instant_img_localize.set_as_featured, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - onClick: function onClick(e) { - return setFeaturedImageClick(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-picture-o", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.set_as_featured)), /*#__PURE__*/React.createElement("button", { - type: "button", - className: "insert fade", - "data-title": instant_img_localize.insert_into_post, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - onClick: function onClick(e) { - return insertImageIntoPost(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-plus", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.insert_into_post))) : null, !!wpBlock && /*#__PURE__*/React.createElement("button", { - type: "button", - className: "insert fade", - "data-title": instant_img_localize.insert_into_post, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - onClick: function onClick(e) { - return insertImageIntoPost(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-plus", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.insert_into_post)), editURL ? /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return editAfterUpload(); - }, - className: "edit-photo-admin fade", - "data-title": instant_img_localize.edit_upload, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-pencil", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.edit_upload)) : /*#__PURE__*/React.createElement("button", { - onClick: function onClick(e) { - return showEditScreen(e); - }, - className: "edit-photo fade", - "data-title": instant_img_localize.edit_details, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-cog", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.edit_details)))), /*#__PURE__*/React.createElement("div", { - className: "photo-meta" - }, likes ? /*#__PURE__*/React.createElement("span", { - className: "likes tooltip--above", - "data-title": likes + ' ' + likeDisplay, - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - } - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-heart heart-like", - "aria-hidden": "true" - }), " ", likes) : null, /*#__PURE__*/React.createElement("a", { - className: "tooltip--above", - href: permalink, - "data-title": "".concat(instant_img_localize.open_external, " ").concat((0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.capitalizeFirstLetter)(provider)), - onMouseEnter: function onMouseEnter(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.showTooltip)(e); - }, - onMouseLeave: function onMouseLeave(e) { - return (0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.hideTooltip)(e); - }, - rel: "noopener noreferrer", - target: "_blank" - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-external-link", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, "".concat(instant_img_localize.open_external, " ").concat((0,_functions_helpers__WEBPACK_IMPORTED_MODULE_5__.capitalizeFirstLetter)(provider)))))), /*#__PURE__*/React.createElement("div", { - className: "edit-screen", - tabIndex: "0", - ref: editScreen - }, /*#__PURE__*/React.createElement("div", { - className: "edit-screen--title" - }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", { - className: "heading" - }, instant_img_localize.edit_details), dimensions && dimensions.length > 0 && /*#__PURE__*/React.createElement("p", { - className: "dimensions" - }, dimensions)), /*#__PURE__*/React.createElement("div", { - className: "preview", - style: { - backgroundImage: "url(".concat(thumb, ")") - } - })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_filename, ":"), /*#__PURE__*/React.createElement("input", { - type: "text", - name: "filename", - "data-original": filename, - placeholder: imageDetails.filename, - value: imageDetails.filename, - onChange: function onChange(e) { - return handleEditChange(e); - } - }), /*#__PURE__*/React.createElement("em", null, ".", extension)), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_title, ":"), /*#__PURE__*/React.createElement("input", { - type: "text", - name: "title", - "data-original": title, - placeholder: title, - value: imageDetails.title || '', - onChange: function onChange(e) { - return handleEditChange(e); - } - })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_alt, ":"), /*#__PURE__*/React.createElement("input", { - type: "text", - name: "alt", - "data-original": alt, - value: imageDetails.alt || '', - onChange: function onChange(e) { - return handleEditChange(e); - } - })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, instant_img_localize.edit_caption, ":"), /*#__PURE__*/React.createElement("textarea", { - rows: "4", - name: "caption", - "data-original": imageCaption, - onChange: function onChange(e) { - return handleEditChange(e); - }, - value: imageDetails.caption || '', - ref: captionRef - })), imageAttribution ? /*#__PURE__*/React.createElement("div", { - className: "add-attribution-row" - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick(e) { - return addAttribution(e); - }, - type: "button" - }, instant_img_localize.attribution)) : null, /*#__PURE__*/React.createElement("div", { - className: "edit-screen--controls" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button button-secondary", - onClick: function onClick(e) { - return cancelEdit(e); - } - }, instant_img_localize.cancel), ' ', "\xA0", /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button button-primary", - onClick: function onClick() { - return uploadNow(); - } - }, wpBlock ? instant_img_localize.insert_into_post : instant_img_localize.upload_now))), /*#__PURE__*/React.createElement("div", { - className: "photo-status" - }))); -} - -/***/ }), - -/***/ "./src/js/components/ProviderIcons.js": -/*!********************************************!*\ - !*** ./src/js/components/ProviderIcons.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ GiphyIcon: () => (/* binding */ GiphyIcon), -/* harmony export */ OpenverseIcon: () => (/* binding */ OpenverseIcon), -/* harmony export */ PexelsIcon: () => (/* binding */ PexelsIcon), -/* harmony export */ PixabayIcon: () => (/* binding */ PixabayIcon), -/* harmony export */ UnsplashIcon: () => (/* binding */ UnsplashIcon), -/* harmony export */ getProviderIcon: () => (/* binding */ getProviderIcon) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); - - -/** - * Return the provider icon. - * - * @param {string} provider The provider. - * @return {JSX.Element} The provider icon. - */ -function getProviderIcon(provider) { - if (!provider) { - return null; - } - return _constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider.toLowerCase()].icon ? _constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider.toLowerCase()].icon() : null; -} - -/** - * Giphy Icon. - */ -function GiphyIcon() { - return /*#__PURE__*/React.createElement("svg", { - height: "35", - width: "32", - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 32 35" - }, /*#__PURE__*/React.createElement("g", { - fill: "none", - fillRule: "evenodd" - }, /*#__PURE__*/React.createElement("path", { - d: "M4 4h20v27H4z", - fill: "#000" - }), /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", { - d: "M0 3h4v29H0z", - fill: "#04ff8e" - }), /*#__PURE__*/React.createElement("path", { - d: "M24 11h4v21h-4z", - fill: "#8e2eff" - }), /*#__PURE__*/React.createElement("path", { - d: "M0 31h28v4H0z", - fill: "#00c5ff" - }), /*#__PURE__*/React.createElement("path", { - d: "M0 0h16v4H0z", - fill: "#fff152" - }), /*#__PURE__*/React.createElement("path", { - d: "M24 8V4h-4V0h-4v12h12V8", - fill: "#ff5b5b" - }), /*#__PURE__*/React.createElement("path", { - d: "M24 16v-4h4", - fill: "#551c99" - })), /*#__PURE__*/React.createElement("path", { - d: "M16 0v4h-4", - fill: "#999131" - }))); -} - -/** - * Unsplash Icon. - */ -function UnsplashIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32", - height: "32", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("path", { - d: "M10 9V0H22V9H10ZM22 14H32V32H0V14H10V23H22V14Z", - fill: "black" - })); -} - -/** - * Pixabay Icon. - */ -function PixabayIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32", - height: "32", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("g", { - clipPath: "url(#clip0_307_143)" - }, /*#__PURE__*/React.createElement("path", { - d: "M0 0V32H32V0H0Z", - fill: "#48A947" - }), /*#__PURE__*/React.createElement("path", { - d: "M6.83734 22.3147V28C5.93067 28.0427 5.02401 28.032 4.11734 27.9787C4.09601 27.7014 4.06401 27.4667 4.06401 27.2427C4.06401 23.2427 4.05334 19.2534 4.06401 15.2534C4.07467 12.032 5.97334 9.32269 8.85334 8.37335C13.1307 6.95469 17.4507 10.048 17.8453 14.3894C18.144 17.6534 16.4267 20.5547 13.568 21.7814C12.6507 22.176 11.6907 22.304 10.7093 22.304C9.45067 22.3147 8.21334 22.3147 6.83734 22.3147ZM6.84801 19.4454C8.24534 19.4454 9.54667 19.424 10.848 19.4454C13.1627 19.488 14.816 17.76 15.104 15.712C15.424 13.3654 13.7813 11.2107 11.4453 10.88H11.4347C9.25867 10.592 7.06134 12.2774 6.88001 14.528C6.74134 16.128 6.84801 17.728 6.84801 19.4454Z", - fill: "#F9FBF9" - }), /*#__PURE__*/React.createElement("path", { - d: "M25.4827 14.9334L30.656 22.2081H27.3067L23.4667 16.9494C22.0694 18.6881 20.9067 20.4907 19.584 22.2081H16.2454L21.408 14.9334L16.8107 8.04272H20.16L23.4454 12.9494L26.7307 8.04272H30.0694L25.4827 14.9334Z", - fill: "#FAFCFA" - }), /*#__PURE__*/React.createElement("path", { - d: "M6.848 19.4453C6.848 17.7279 6.74134 16.1173 6.86934 14.5386C7.05067 12.2879 9.248 10.6026 11.424 10.8906C13.7707 11.2106 15.4133 13.3653 15.0933 15.7119C14.816 17.7599 13.152 19.4879 10.8373 19.4453C9.54667 19.4239 8.24534 19.4453 6.848 19.4453Z", - fill: "#4AA949" - })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", { - id: "clip0_307_143" - }, /*#__PURE__*/React.createElement("rect", { - width: "32", - height: "32", - fill: "white" - })))); -} - -/** - * Openverse Icon. - */ -function OpenverseIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32", - height: "32", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("path", { - d: "M25.8578 14.32C29.6708 14.32 32.7618 11.1144 32.7618 7.16C32.7618 3.20564 29.6708 0 25.8578 0C22.0448 0 18.9539 3.20564 18.9539 7.16C18.9539 11.1144 22.0448 14.32 25.8578 14.32Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M0.761841 7.16C0.761841 11.1 3.84742 14.32 7.66584 14.32V0C3.84742 0 0.761841 3.2 0.761841 7.16Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M9.85791 7.16C9.85791 11.1 12.9435 14.32 16.7619 14.32V0C12.9628 0 9.85791 3.2 9.85791 7.16Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M25.8578 31.9399C29.6708 31.9399 32.7618 28.7343 32.7618 24.78C32.7618 20.8256 29.6708 17.62 25.8578 17.62C22.0448 17.62 18.9539 20.8256 18.9539 24.78C18.9539 28.7343 22.0448 31.9399 25.8578 31.9399Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M9.85791 24.7801C9.85791 28.72 12.9435 31.9401 16.7619 31.9401V17.64C12.9628 17.64 9.85791 20.84 9.85791 24.7801Z", - fill: "#000000" - }), /*#__PURE__*/React.createElement("path", { - d: "M0.761841 24.84C0.761841 28.8 3.84742 32 7.66584 32V17.7C3.84742 17.7 0.761841 20.9 0.761841 24.84Z", - fill: "#000000" - })); -} - -/** - * Pexels Icon. - */ -function PexelsIcon() { - return /*#__PURE__*/React.createElement("svg", { - width: "32px", - height: "32px", - viewBox: "0 0 32 32", - xmlns: "http://www.w3.org/2000/svg" - }, /*#__PURE__*/React.createElement("path", { - d: "M2 0h28a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2z", - fill: "#05A081" - }), /*#__PURE__*/React.createElement("path", { - d: "M13 21h3.863v-3.752h1.167a3.124 3.124 0 1 0 0-6.248H13v10zm5.863 2H11V9h7.03a5.124 5.124 0 0 1 .833 10.18V23z", - fill: "#fff" - })); -} - -/***/ }), - -/***/ "./src/js/components/ProviderNav.js": -/*!******************************************!*\ - !*** ./src/js/components/ProviderNav.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ ProviderNav) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _ProviderIcons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ProviderIcons */ "./src/js/components/ProviderIcons.js"); -/* harmony import */ var _img_logos_giphy_powered_png__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../img/logos/giphy-powered.png */ "./src/img/logos/giphy-powered.png"); - - - - - -var providers = _constants_API__WEBPACK_IMPORTED_MODULE_2__.API.providers; - -/** - * Render the ProviderNav component. - * - * @param {Object} props The component props. - * @param {Object} props.switchProvider The function to switch the provider. - * @return {JSX.Element} The ProviderNav component. - */ -function ProviderNav(_ref) { - var switchProvider = _ref.switchProvider; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - provider = _usePluginContext.provider; - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, !!(providers !== null && providers !== void 0 && providers.length) && /*#__PURE__*/React.createElement("nav", { - className: "provider-nav" - }, providers.map(function (item, index) { - return /*#__PURE__*/React.createElement("div", { - key: "provider-".concat(index) - }, /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return switchProvider(item.toLowerCase()); - }, - className: provider === item.toLowerCase() ? 'provider-nav--btn active' : 'provider-nav--btn' - }, (0,_ProviderIcons__WEBPACK_IMPORTED_MODULE_3__.getProviderIcon)(item), /*#__PURE__*/React.createElement("span", null, item), _constants_API__WEBPACK_IMPORTED_MODULE_2__.API[item.toLowerCase()]["new"] && /*#__PURE__*/React.createElement("span", { - className: "provider-nav--new" - }, instant_img_localize["new"]))); - }), provider === 'giphy' ? /*#__PURE__*/React.createElement("div", { - className: "giphy-powered" - }, /*#__PURE__*/React.createElement("a", { - href: "https://giphy.com", - target: "_blank", - rel: "noreferrer" - }, /*#__PURE__*/React.createElement("img", { - src: _img_logos_giphy_powered_png__WEBPACK_IMPORTED_MODULE_4__, - alt: "Powered by Giphy" - }))) : null)); -} - -/***/ }), - -/***/ "./src/js/components/RestAPIError.js": -/*!*******************************************!*\ - !*** ./src/js/components/RestAPIError.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ RestAPIError) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - -/** - * Render the RestAPIError component. - * - * @return {JSX.Element} The RestAPIError component. - */ -function RestAPIError() { - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(true), - _useState2 = _slicedToArray(_useState, 2), - access = _useState2[0], - setAccess = _useState2[1]; - - /** - * Test users access to the REST API endpoint. - * - * @since 3.2 - */ - function test() { - var testURL = instant_img_localize.root + 'instant-images/test/'; - var restAPITest = new XMLHttpRequest(); - restAPITest.open('POST', testURL, true); - restAPITest.setRequestHeader('X-WP-Nonce', instant_img_localize.nonce); - restAPITest.setRequestHeader('Content-Type', 'application/json'); - restAPITest.send(); - restAPITest.onload = function () { - if (restAPITest.status >= 200 && restAPITest.status < 400) { - var response = JSON.parse(restAPITest.response); - var success = response.success; - if (!success) { - setAccess(false); - } - } else { - setAccess(false); - } - }; - restAPITest.onerror = function (errorMsg) { - console.warn(errorMsg); - setAccess(false); - }; - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - test(); - }, []); - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, !access ? /*#__PURE__*/React.createElement("div", { - className: "error-messaging" - }, /*#__PURE__*/React.createElement("strong", null, instant_img_localize.error_restapi), instant_img_localize.error_restapi_desc) : null); -} - -/***/ }), - -/***/ "./src/js/components/Results.js": -/*!**************************************!*\ - !*** ./src/js/components/Results.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _Photo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Photo */ "./src/js/components/Photo.js"); -/* harmony import */ var _Sponsor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Sponsor */ "./src/js/components/Sponsor.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - -/** - * Render the Results component. - * - * @return {JSX.Element} The Results component. - */ -var Results = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var data = props.data; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - inactive = _useState2[0], - setInactive = _useState2[1]; - return /*#__PURE__*/React.createElement("div", { - id: "photos", - className: inactive ? 'inactive' : null, - ref: ref - }, !!(data !== null && data !== void 0 && data.length) && data.map(function (result, index) { - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, { - key: "".concat(result.id, "-").concat(index) - }, (result === null || result === void 0 ? void 0 : result.type) === 'instant-images-ad' ? /*#__PURE__*/React.createElement(_Sponsor__WEBPACK_IMPORTED_MODULE_2__["default"], { - result: result - }) : /*#__PURE__*/React.createElement(_Photo__WEBPACK_IMPORTED_MODULE_1__["default"], { - result: result, - type: result === null || result === void 0 ? void 0 : result.type, - setInactive: setInactive - })); - })); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Results); - -/***/ }), - -/***/ "./src/js/components/ResultsWPBlock.js": -/*!*********************************************!*\ - !*** ./src/js/components/ResultsWPBlock.js ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var react_intersection_observer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-intersection-observer */ "./node_modules/react-intersection-observer/dist/index.mjs"); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _editor_block_components_Instructions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../editor/block/components/Instructions */ "./src/js/editor/block/components/Instructions.js"); -/* harmony import */ var _editor_block_components_LoadMore__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../editor/block/components/LoadMore */ "./src/js/editor/block/components/LoadMore.js"); -/* harmony import */ var _Photo__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Photo */ "./src/js/components/Photo.js"); -/* harmony import */ var _Sponsor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Sponsor */ "./src/js/components/Sponsor.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - - - - -/** - * Render the Results component. - * - * @return {JSX.Element} The Results component. - */ -var ResultsWPBlock = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var data = props.data, - _props$done = props.done, - done = _props$done === void 0 ? false : _props$done, - loadMorePhotos = props.loadMorePhotos; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - _usePluginContext$wpB = _usePluginContext.wpBlock, - wpBlock = _usePluginContext$wpB === void 0 ? false : _usePluginContext$wpB; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - inactive = _useState2[0], - setInactive = _useState2[1]; - var _useInView = (0,react_intersection_observer__WEBPACK_IMPORTED_MODULE_6__.useInView)({ - rootMargin: '0px 0px' - }), - _useInView2 = _slicedToArray(_useInView, 2), - loadMoreRef = _useInView2[0], - inView = _useInView2[1]; - - // Scroll in-view callback. - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (wpBlock) { - loadMorePhotos(); - } - }, [inView]); // eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("div", { - id: "photos", - className: inactive ? 'inactive' : null, - ref: ref - }, !!(data !== null && data !== void 0 && data.length) && data.map(function (result, index) { - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, { - key: "".concat(result.id, "-").concat(index) - }, (result === null || result === void 0 ? void 0 : result.type) === 'instant-images-ad' ? /*#__PURE__*/React.createElement(_Sponsor__WEBPACK_IMPORTED_MODULE_5__["default"], { - result: result - }) : /*#__PURE__*/React.createElement(_Photo__WEBPACK_IMPORTED_MODULE_4__["default"], { - result: result, - type: result === null || result === void 0 ? void 0 : result.type, - setInactive: setInactive - })); - }), /*#__PURE__*/React.createElement(_editor_block_components_LoadMore__WEBPACK_IMPORTED_MODULE_3__["default"], { - done: done, - ref: loadMoreRef - })), /*#__PURE__*/React.createElement(_editor_block_components_Instructions__WEBPACK_IMPORTED_MODULE_2__["default"], { - show: data === null || data === void 0 ? void 0 : data.length - })); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ResultsWPBlock); - -/***/ }), - -/***/ "./src/js/components/Sponsor.js": -/*!**************************************!*\ - !*** ./src/js/components/Sponsor.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Sponsor) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Render the Sponsor component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The Sponsor component. - */ -function Sponsor(props) { - var result = props.result; - var _result$data = result.data, - data = _result$data === void 0 ? null : _result$data; - var url = (data === null || data === void 0 ? void 0 : data.url) || ''; - var title = (data === null || data === void 0 ? void 0 : data.title) || ''; - var desc = (data === null || data === void 0 ? void 0 : data.description) || ''; - var avatar = (data === null || data === void 0 ? void 0 : data.avatar) || ''; - var _data$image = data.image, - image = _data$image === void 0 ? null : _data$image; - var _image$src = image.src, - src = _image$src === void 0 ? null : _image$src, - _image$alt = image.alt, - alt = _image$alt === void 0 ? null : _image$alt; - var photo = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - var link = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, image && url ? - /*#__PURE__*/ - // eslint-disable-next-line - React.createElement("article", { - className: "photo feature", - title: desc, - ref: photo, - onClick: function onClick() { - return link.current.click(); - } - }, /*#__PURE__*/React.createElement("div", { - className: "photo--wrap" - }, /*#__PURE__*/React.createElement("span", { - className: "flag", - title: instant_img_localize.advertisement - }, instant_img_localize.ad), /*#__PURE__*/React.createElement("div", { - className: "img-wrap" - }, /*#__PURE__*/React.createElement("a", { - className: "loaded", - href: url, - target: "_blank", - ref: link, - rel: "noreferrer" - }, /*#__PURE__*/React.createElement("img", { - src: src, - alt: alt - }))), /*#__PURE__*/React.createElement("div", { - className: "feature-title" - }, avatar && /*#__PURE__*/React.createElement("img", { - src: avatar, - alt: title - }), /*#__PURE__*/React.createElement("span", null, title)))) : null); -} - -/***/ }), - -/***/ "./src/js/components/Tooltip.js": -/*!**************************************!*\ - !*** ./src/js/components/Tooltip.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Tooltip) -/* harmony export */ }); -/** - * Render the Tooltip component. - * - * @return {JSX.Element} The Tooltip component. - */ -function Tooltip() { - return /*#__PURE__*/React.createElement("div", { - id: "tooltip" - }); -} - -/***/ }), - -/***/ "./src/js/components/cta/Extended.js": -/*!*******************************************!*\ - !*** ./src/js/components/cta/Extended.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ ExtendedCTA: () => (/* binding */ ExtendedCTA), -/* harmony export */ ExtendedSearchCTA: () => (/* binding */ ExtendedSearchCTA) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _functions_localStorage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../functions/localStorage */ "./src/js/functions/localStorage.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - - -/* eslint-disable */ - -/** - * Generic CTA for the Extended add-on. - * - * @return {JSX.Element} The ExtendedCTA component. - */ -function ExtendedCTA() { - var _instant_img_localize3; - var _instant_img_localize = (_instant_img_localize3 = instant_img_localize) === null || _instant_img_localize3 === void 0 || (_instant_img_localize3 = _instant_img_localize3.addons) === null || _instant_img_localize3 === void 0 ? void 0 : _instant_img_localize3.extended, - _instant_img_localize2 = _instant_img_localize.activated, - activated = _instant_img_localize2 === void 0 ? false : _instant_img_localize2; - var name = 'extended-cta-2024'; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSetting)(name) === 'hide'), - _useState2 = _slicedToArray(_useState, 2), - dissmissed = _useState2[0], - setDismissed = _useState2[1]; // Get setting from localstorage. - - // Hide the CTA. - function remove() { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.saveSettings)(name, 'hide'); - setDismissed(true); - } - return /*#__PURE__*/React.createElement(React.Fragment, null, !activated && !dissmissed ? /*#__PURE__*/React.createElement("div", { - className: "cta-extended cta-extended--standard" - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-bullhorn", - "aria-hidden": "true" - }), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("span", null, "Introducing the", ' ', /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer" - }, "Extended add-on")), ' ', "\u2192 An extension pack of premium features and functionality to enhance the Instant Images plugin."), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer", - className: "button button-primary" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Learn More', 'instant-images')), /*#__PURE__*/React.createElement("button", { - type: "button", - className: "button button-secondary", - onClick: function onClick() { - return remove(); - }, - "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images') - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images')))) : null); -} - -/** - * CTA for the Extended add-on in the search dropdown. - * - * @param {Object} props The component props. - * @param {boolean} props.show Display the component. - * @return {JSX.Element} The ExtendedSearchCTA component. - */ -function ExtendedSearchCTA(_ref) { - var _ref$show = _ref.show, - show = _ref$show === void 0 ? false : _ref$show; - var name = 'extended-cta-search-2024'; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSetting)(name) !== 'hide'), - _useState4 = _slicedToArray(_useState3, 2), - active = _useState4[0], - setActive = _useState4[1]; // Get setting from localstorage. - - // Hide the CTA. - function remove() { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.saveSettings)(name, 'hide'); - setActive(false); - } - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('control-nav--search-history extended-cta', show && active ? 'active' : null) - }, /*#__PURE__*/React.createElement("div", { - className: "cta-extended cta-extended--search" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "closeBtn", - onClick: function onClick() { - return remove(); - }, - "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images') - }, "\xD7", /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'instant-images'))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("i", { - className: "fa fa-magic", - "aria-hidden": "true" - }), "Enable search suggestions, history, and maintain current search term while switching providers with the", ' ', /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer" - }, "Extended add-on")), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("a", { - href: "https://getinstantimages.com/add-ons/extended/", - target: "_blank", - rel: "noreferrer", - className: "button button-primary" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Learn More', 'instant-images')))))); -} - -/***/ }), - -/***/ "./src/js/components/search/SearchForm.js": -/*!************************************************!*\ - !*** ./src/js/components/search/SearchForm.js ***! - \************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _functions_localStorage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../functions/localStorage */ "./src/js/functions/localStorage.js"); -/* harmony import */ var _hooks_useClickOutside__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../hooks/useClickOutside */ "./src/js/hooks/useClickOutside.js"); -/* harmony import */ var _cta_Extended__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cta/Extended */ "./src/js/components/cta/Extended.js"); -/* harmony import */ var _SearchHistory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SearchHistory */ "./src/js/components/search/SearchHistory.js"); -/* harmony import */ var _SearchToolTip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./SearchToolTip */ "./src/js/components/search/SearchToolTip.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } -function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); } - - - - - - - - - -/** - * Render the search form as a component. - * - * @return {JSX.Element} The SearchForm component. - */ -var SearchForm = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (_ref, ref) { - var _instant_img_localize4; - _objectDestructuringEmpty(_ref); - var _instant_img_localize = (_instant_img_localize4 = instant_img_localize) === null || _instant_img_localize4 === void 0 || (_instant_img_localize4 = _instant_img_localize4.addons) === null || _instant_img_localize4 === void 0 ? void 0 : _instant_img_localize4.extended, - _instant_img_localize2 = _instant_img_localize.activated, - extended_activated = _instant_img_localize2 === void 0 ? false : _instant_img_localize2, - _instant_img_localize3 = _instant_img_localize.license, - extended_license = _instant_img_localize3 === void 0 ? false : _instant_img_localize3; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - searchHandler = _usePluginContext.searchHandler, - apiError = _usePluginContext.apiError, - suggestions = _usePluginContext.suggestions, - getSuggestions = _usePluginContext.getSuggestions; - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]), - _useState2 = _slicedToArray(_useState, 2), - history = _useState2[0], - setHistory = _useState2[1]; - var _useState3 = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState4 = _slicedToArray(_useState3, 2), - show = _useState4[0], - setShow = _useState4[1]; - var historyRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); - var submitBtnRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); - - // Handle clickoutside hook. - (0,_hooks_useClickOutside__WEBPACK_IMPORTED_MODULE_4__.useClickOutside)(historyRef, function () { - setShow(false); - }); - - /** - * Set the search value in the form. - * - * @param {string} value The value to set. - */ - function setSearchValue(value) { - var input = ref === null || ref === void 0 ? void 0 : ref.current; - input.value = value; - submitBtnRef === null || submitBtnRef === void 0 || submitBtnRef.current.click(); - - // Set focus on input. - input.focus(); - } - - /** - * Search submit handler. - * - * @param {Event} e The event object. - */ - function formSubmit(e) { - var _ref$current; - e.preventDefault(); - var term = ref === null || ref === void 0 || (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.value; - if (term) { - searchHandler(e); - if (extended_license) { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.saveSearchHistory)(term); - setHistory((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSearchHistory)()); - } - } - } - - /** - * Should the history div be shown? - * - * @return {boolean} Show history. - */ - function showHistory() { - return (history === null || history === void 0 ? void 0 : history.length) || (suggestions === null || suggestions === void 0 ? void 0 : suggestions.length); - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - setHistory((0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_3__.getSearchHistory)()); - }, []); - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('control-nav--search', apiError ? 'inactive' : null) - }, /*#__PURE__*/React.createElement("form", { - onSubmit: function onSubmit(e) { - return formSubmit(e); - }, - autoComplete: "off" - }, /*#__PURE__*/React.createElement("label", { - htmlFor: "search-input", - className: "offscreen" - }, instant_img_localize.search_label), /*#__PURE__*/React.createElement("div", { - ref: historyRef - }, /*#__PURE__*/React.createElement("input", { - ref: ref, - type: "text", - id: "search-input", - placeholder: instant_img_localize.search, - disabled: apiError, - onChange: function onChange(e) { - return extended_license && getSuggestions(e.target.value); - }, - onFocus: function onFocus() { - return setShow(true); - } - }), extended_license && showHistory() ? - /*#__PURE__*/ - /* Extended: Show only with valid add-on license */ - React.createElement(_SearchHistory__WEBPACK_IMPORTED_MODULE_6__["default"], { - show: show, - history: history, - setHistory: setHistory, - setSearchValue: setSearchValue, - container: historyRef - }) : null, !extended_activated && - /*#__PURE__*/ - /* Extended: Show only when add-on not installed. */ - React.createElement(_cta_Extended__WEBPACK_IMPORTED_MODULE_5__.ExtendedSearchCTA, { - show: show - })), /*#__PURE__*/React.createElement("button", { - type: "submit", - disabled: apiError, - ref: submitBtnRef - }, /*#__PURE__*/React.createElement("i", { - className: "fa fa-search" - }), /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.search)), /*#__PURE__*/React.createElement(_SearchToolTip__WEBPACK_IMPORTED_MODULE_7__["default"], { - show: show - }))); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchForm); - -/***/ }), - -/***/ "./src/js/components/search/SearchHeader.js": -/*!**************************************************!*\ - !*** ./src/js/components/search/SearchHeader.js ***! - \**************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ SearchHeader) -/* harmony export */ }); -/* harmony import */ var _constants_filters__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../constants/filters */ "./src/js/constants/filters.js"); -/* harmony import */ var _Filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Filter */ "./src/js/components/Filter.js"); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - -/** - * Render the SearchHeader component. - * - * @return {JSX.Element} The SearchHeader component. - */ -function SearchHeader() { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_2__.usePluginContext)(), - provider = _usePluginContext.provider, - search = _usePluginContext.search, - getPhotos = _usePluginContext.getPhotos, - filterSearch = _usePluginContext.filterSearch; - var _search$active = search.active, - active = _search$active === void 0 ? false : _search$active, - _search$term = search.term, - term = _search$term === void 0 ? '' : _search$term, - _search$results = search.results, - total = _search$results === void 0 ? 0 : _search$results; - var filters = _constants_filters__WEBPACK_IMPORTED_MODULE_0__.FILTERS[provider].search; - if (!active) { - // Exit if search is not active. - return null; - } - return /*#__PURE__*/React.createElement("header", { - className: "search-header" - }, /*#__PURE__*/React.createElement("h2", null, term.replace('id:', 'ID: ')), /*#__PURE__*/React.createElement("div", { - className: "search-header--text" - }, "".concat(total, " ").concat(instant_img_localize.search_results), " ", /*#__PURE__*/React.createElement("strong", null, "".concat(term)), /*#__PURE__*/React.createElement("span", null, "-"), /*#__PURE__*/React.createElement("button", { - onClick: function onClick() { - return getPhotos(true); - } - }, instant_img_localize.clear_search)), filters && Object.entries(filters).length ? /*#__PURE__*/React.createElement("div", { - className: "control-nav--filters-wrap" - }, /*#__PURE__*/React.createElement("div", { - className: "control-nav--filters" - }, Object.entries(filters).map(function (_ref, index) { - var _ref2 = _slicedToArray(_ref, 2), - key = _ref2[0], - filter = _ref2[1]; - return /*#__PURE__*/React.createElement(_Filter__WEBPACK_IMPORTED_MODULE_1__["default"], { - key: "".concat(provider, "-search-").concat(key, "-").concat(index), - filterKey: key, - provider: provider, - data: filter, - handler: filterSearch - }); - }))) : null); -} - -/***/ }), - -/***/ "./src/js/components/search/SearchHistory.js": -/*!***************************************************!*\ - !*** ./src/js/components/search/SearchHistory.js ***! - \***************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ SearchHistory) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _functions_localStorage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../functions/localStorage */ "./src/js/functions/localStorage.js"); -/* harmony import */ var _hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../hooks/useArrowControls */ "./src/js/hooks/useArrowControls.js"); - - - - - - - -/** - * The History list component. - * - * @param {Object} props The component props. - * @return {JSX.Element} The SearchHistory component. - */ -function SearchHistory(props) { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_3__.usePluginContext)(), - suggestions = _usePluginContext.suggestions; - var show = props.show, - history = props.history, - setHistory = props.setHistory, - setSearchValue = props.setSearchValue, - container = props.container; - var dropRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); - - // Use up/down arrow keys to navigate dropdown. - (0,_hooks_useArrowControls__WEBPACK_IMPORTED_MODULE_5__.useArrowControls)(show, container); - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_2___default()('control-nav--search-history', show ? 'active' : null), - role: "listbox", - ref: dropRef - }, !!suggestions.length && /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("div", { - className: "control-nav--search-history-title" - }, /*#__PURE__*/React.createElement("div", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Suggestions', 'instant-images'))), /*#__PURE__*/React.createElement("ul", { - role: "listbox", - className: "search-suggestions" - }, suggestions.map(function (item, key) { - return /*#__PURE__*/React.createElement("li", { - key: key, - role: "option" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - onClick: function onClick() { - return setSearchValue(item); - } - }, item)); - }))), !!history.length && /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement("div", { - className: "control-nav--search-history-title" - }, /*#__PURE__*/React.createElement("div", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Recent Searches', 'instant-images')), /*#__PURE__*/React.createElement("button", { - type: "button", - onClick: function onClick() { - (0,_functions_localStorage__WEBPACK_IMPORTED_MODULE_4__.clearSearchHistory)(); - setHistory([]); - } - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Clear', 'instant-images'))), /*#__PURE__*/React.createElement("ul", { - role: "listbox", - className: "search-history" - }, history.map(function (item, key) { - return /*#__PURE__*/React.createElement("li", { - key: key, - role: "option" - }, /*#__PURE__*/React.createElement("button", { - type: "button", - className: "history", - onClick: function onClick() { - return setSearchValue(item); - } - }, item)); - })))); -} - -/***/ }), - -/***/ "./src/js/components/search/SearchToolTip.js": -/*!***************************************************!*\ - !*** ./src/js/components/search/SearchToolTip.js ***! - \***************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ SearchToolTip) -/* harmony export */ }); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); - - - -/** - * Render the search results tooltip component. - * - * @return {JSX.Element} The SearchToolTip component. - */ -function SearchToolTip() { - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - getPhotos = _usePluginContext.getPhotos, - search = _usePluginContext.search; - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_0___default()('control-nav--search-tooltip', search !== null && search !== void 0 && search.active ? null : 'hide') - }, /*#__PURE__*/React.createElement("span", { - title: "".concat(search === null || search === void 0 ? void 0 : search.results, " ").concat(instant_img_localize.search_results, " ").concat(search === null || search === void 0 ? void 0 : search.term) - }, search === null || search === void 0 ? void 0 : search.results), /*#__PURE__*/React.createElement("button", { - type: "button", - title: instant_img_localize.clear_search, - onClick: function onClick() { - return getPhotos(true); - } - }, "x", /*#__PURE__*/React.createElement("span", { - className: "offscreen" - }, instant_img_localize.clear_search))); -} - -/***/ }), - -/***/ "./src/js/constants/API.js": -/*!*********************************!*\ - !*** ./src/js/constants/API.js ***! - \*********************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ API: () => (/* binding */ API) -/* harmony export */ }); -/* harmony import */ var _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/ProviderIcons */ "./src/js/components/ProviderIcons.js"); - -var API = { - proxy: "https://proxy.getinstantimages.com/api/" || 0, - // eslint-disable-line - testmode: false, - defaults: { - provider: 'unsplash', - order: 'latest', - arr_key: 'results' - }, - providers: ['Unsplash', 'Openverse', 'Pixabay', 'Pexels', 'Giphy'], - unsplash: { - name: 'Unsplash', - requires_key: true, - "new": false, - api_var: 'client_id', - collections_api: 'https://api.unsplash.com/collections/', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.UnsplashIcon - }, - pixabay: { - name: 'Pixabay', - requires_key: true, - "new": false, - api_var: 'key', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.PixabayIcon - }, - pexels: { - name: 'Pexels', - requires_key: true, - "new": false, - api_var: 'key', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.PexelsIcon - }, - openverse: { - name: 'Openverse', - requires_key: false, - "new": false, - api_var: 'key', - key: '', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.OpenverseIcon - }, - giphy: { - name: 'Giphy', - requires_key: true, - "new": true, - api_var: 'key', - icon: _components_ProviderIcons__WEBPACK_IMPORTED_MODULE_0__.GiphyIcon - } -}; - -/***/ }), - -/***/ "./src/js/constants/filters.js": -/*!*************************************!*\ - !*** ./src/js/constants/filters.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ FILTERS: () => (/* binding */ FILTERS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _filters_openverse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filters/openverse */ "./src/js/constants/filters/openverse.js"); -/* harmony import */ var _filters_pexels__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./filters/pexels */ "./src/js/constants/filters/pexels.js"); -/* harmony import */ var _filters_pixabay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./filters/pixabay */ "./src/js/constants/filters/pixabay.js"); -/* harmony import */ var _filters_unsplash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./filters/unsplash */ "./src/js/constants/filters/unsplash.js"); -function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } -function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } - - - - - -var ALL = { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('All', 'instant-images'), - value: 'all' -}; -var FILTERS = { - giphy: { - filters: { - order: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'trending', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Trending', 'instant-images'), - value: 'trending' - }] - } - }, - search: {} - }, - openverse: { - filters: { - source: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Source', 'instant-images'), - "default": 'wordpress', - filters: _toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_SOURCES) - }, - aspect_ratio: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_ORIENTATIONS)) - } - }, - search: { - category: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Type', 'instant-images'), - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Illustration', 'instant-images'), - value: 'illustration' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Photograph', 'instant-images'), - value: 'photograph' - }] - }, - extension: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Extension', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_EXTENSIONS)) - }, - aspect_ratio: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_ORIENTATIONS)) - }, - size: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Size', 'instant-images'), - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Large', 'instant-images'), - value: 'large' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Medium', 'instant-images'), - value: 'medium' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Small', 'instant-images'), - value: 'small' - }] - }, - license: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('License', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_openverse__WEBPACK_IMPORTED_MODULE_1__.OPENVERSE_LICENSES)) - }, - license_type: { - label: 'license_type', - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Commercial', 'instant-images'), - value: 'commercial' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Modification', 'instant-images'), - value: 'modification' - }] - } - } - }, - pexels: { - filters: { - order_by: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'curated', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Curated', 'instant-images'), - value: 'curated' - }] - } - }, - search: { - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pexels__WEBPACK_IMPORTED_MODULE_2__.PEXELS_ORIENTATIONS)) - }, - color: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pexels__WEBPACK_IMPORTED_MODULE_2__.PEXELS_COLORS)) - }, - size: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Size', 'instant-images'), - "default": 'all', - filters: [ALL, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Large', 'instant-images'), - value: 'large' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Medium', 'instant-images'), - value: 'medium' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Small', 'instant-images'), - value: 'small' - }] - } - } - }, - unsplash: { - filters: { - order_by: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'latest', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Latest', 'instant-images'), - value: 'latest' - }] - } - }, - search: { - order_by: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'relevant', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Relevance', 'instant-images'), - value: 'relevant' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Latest', 'instant-images'), - value: 'latest' - }] - }, - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_unsplash__WEBPACK_IMPORTED_MODULE_4__.UNSPLASH_ORIENTATIONS)) - }, - color: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_unsplash__WEBPACK_IMPORTED_MODULE_4__.UNSPLASH_COLORS)) - } - } - }, - pixabay: { - filters: { - order: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Order', 'instant-images'), - "default": 'popular', - filters: [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Popular', 'instant-images'), - value: 'popular' - }, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Latest', 'instant-images'), - value: 'latest' - }] - }, - image_type: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Type', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_IMAGE_TYPE)) - }, - category: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Category', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_CATS)) - }, - colors: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_COLORS)) - }, - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_ORIENTATIONS)) - } - }, - search: { - image_type: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Type', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_IMAGE_TYPE)) - }, - colors: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Colors', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_COLORS)) - }, - orientation: { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orientation', 'instant-images'), - "default": 'all', - filters: [ALL].concat(_toConsumableArray(_filters_pixabay__WEBPACK_IMPORTED_MODULE_3__.PIXABAY_ORIENTATIONS)) - } - } - } -}; - -/***/ }), - -/***/ "./src/js/constants/filters/openverse.js": -/*!***********************************************!*\ - !*** ./src/js/constants/filters/openverse.js ***! - \***********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ OPENVERSE_EXTENSIONS: () => (/* binding */ OPENVERSE_EXTENSIONS), -/* harmony export */ OPENVERSE_LICENSES: () => (/* binding */ OPENVERSE_LICENSES), -/* harmony export */ OPENVERSE_ORIENTATIONS: () => (/* binding */ OPENVERSE_ORIENTATIONS), -/* harmony export */ OPENVERSE_SOURCES: () => (/* binding */ OPENVERSE_SOURCES) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var OPENVERSE_SOURCES = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('WordPress', 'instant-images'), - value: 'wordpress' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Flickr', 'instant-images'), - value: 'flickr' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Nasa', 'instant-images'), - value: 'nasa' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('SpaceX', 'instant-images'), - value: 'spacex' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Wikimedia', 'instant-images'), - value: 'wikimedia' -}]; -var OPENVERSE_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Square', 'instant-images'), - value: 'square' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Tall', 'instant-images'), - value: 'tall' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Wide', 'instant-images'), - value: 'wide' -}]; -var OPENVERSE_EXTENSIONS = [{ - label: 'JPG', - value: 'JPG' -}, { - label: 'GIF', - value: 'GIF' -}, { - label: 'PNG', - value: 'PNG' -}, { - label: 'SVG', - value: 'SVG' -}]; -var OPENVERSE_LICENSES = [{ - label: 'BY', - value: 'BY' -}, { - label: 'BY-NC', - value: 'BY-NC' -}, { - label: 'BY-NC-ND', - value: 'BY-NC-ND' -}, { - label: 'BY-NC-SA', - value: 'BY-NC-SA' -}, { - label: 'BY-ND', - value: 'BY-ND' -}, { - label: 'BY-SA', - value: 'BY-SA' -}, { - label: 'CC0', - value: 'CC0' -}]; - -/***/ }), - -/***/ "./src/js/constants/filters/pexels.js": -/*!********************************************!*\ - !*** ./src/js/constants/filters/pexels.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ PEXELS_COLORS: () => (/* binding */ PEXELS_COLORS), -/* harmony export */ PEXELS_ORIENTATIONS: () => (/* binding */ PEXELS_ORIENTATIONS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var PEXELS_COLORS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Red', 'instant-images'), - value: 'red' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orange', 'instant-images'), - value: 'orange' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Yellow', 'instant-images'), - value: 'yellow' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Green', 'instant-images'), - value: 'green' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Turquoise', 'instant-images'), - value: 'turquoise' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Blue', 'instant-images'), - value: 'blue' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Violet', 'instant-images'), - value: 'violet' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Pink', 'instant-images'), - value: 'pink' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Brown', 'instant-images'), - value: 'brown' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black', 'instant-images'), - value: 'black' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Gray', 'instant-images'), - value: 'gray' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('White', 'instant-images'), - value: 'white' -}]; -var PEXELS_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Landscape', 'instant-images'), - value: 'landscape' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Portrait', 'instant-images'), - value: 'portrait' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Square', 'instant-images'), - value: 'squarish' -}]; - -/***/ }), - -/***/ "./src/js/constants/filters/pixabay.js": -/*!*********************************************!*\ - !*** ./src/js/constants/filters/pixabay.js ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ PIXABAY_CATS: () => (/* binding */ PIXABAY_CATS), -/* harmony export */ PIXABAY_COLORS: () => (/* binding */ PIXABAY_COLORS), -/* harmony export */ PIXABAY_IMAGE_TYPE: () => (/* binding */ PIXABAY_IMAGE_TYPE), -/* harmony export */ PIXABAY_ORIENTATIONS: () => (/* binding */ PIXABAY_ORIENTATIONS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var PIXABAY_COLORS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Grayscale', 'instant-images'), - value: 'grayscale' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Red', 'instant-images'), - value: 'red' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orange', 'instant-images'), - value: 'orange' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Yellow', 'instant-images'), - value: 'yellow' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Green', 'instant-images'), - value: 'green' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Turquoise', 'instant-images'), - value: 'turquoise' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Blue', 'instant-images'), - value: 'blue' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Lilac', 'instant-images'), - value: 'lilac' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Pink', 'instant-images'), - value: 'pink' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('White', 'instant-images'), - value: 'white' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Gray', 'instant-images'), - value: 'gray' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black', 'instant-images'), - value: 'black' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Brown', 'instant-images'), - value: 'brown' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Transparent', 'instant-images'), - value: 'transparent' -}]; -var PIXABAY_CATS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Backgrounds', 'instant-images'), - value: 'backgrounds' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Fashion', 'instant-images'), - value: 'fashion' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Nature', 'instant-images'), - value: 'nature' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Science', 'instant-images'), - value: 'science' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Education', 'instant-images'), - value: 'education' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Feelings', 'instant-images'), - value: 'feelings' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Health', 'instant-images'), - value: 'health' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('People', 'instant-images'), - value: 'people' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Religion', 'instant-images'), - value: 'religion' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Places', 'instant-images'), - value: 'places' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Animals', 'instant-images'), - value: 'animals' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Industry', 'instant-images'), - value: 'industry' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Computer', 'instant-images'), - value: 'computer' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Food', 'instant-images'), - value: 'food' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Sports', 'instant-images'), - value: 'sports' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Food', 'instant-images'), - value: 'food' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Transportation', 'instant-images'), - value: 'transportation' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Travel', 'instant-images'), - value: 'travel' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Buildings', 'instant-images'), - value: 'buildings' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Business', 'instant-images'), - value: 'business' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Music', 'instant-images'), - value: 'music' -}]; -var PIXABAY_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Horizontal', 'instant-images'), - value: 'horizontal' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Vertical', 'instant-images'), - value: 'vertical' -}]; -var PIXABAY_IMAGE_TYPE = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Photo', 'instant-images'), - value: 'photo' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Illustration', 'instant-images'), - value: 'illustration' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Vector', 'instant-images'), - value: 'vector' -}]; - -/***/ }), - -/***/ "./src/js/constants/filters/unsplash.js": -/*!**********************************************!*\ - !*** ./src/js/constants/filters/unsplash.js ***! - \**********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ UNSPLASH_COLORS: () => (/* binding */ UNSPLASH_COLORS), -/* harmony export */ UNSPLASH_ORIENTATIONS: () => (/* binding */ UNSPLASH_ORIENTATIONS) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - -var UNSPLASH_COLORS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black & White', 'instant-images'), - value: 'black_and_white' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Black', 'instant-images'), - value: 'black' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('White', 'instant-images'), - value: 'white' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Yellow', 'instant-images'), - value: 'yellow' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Green', 'instant-images'), - value: 'green' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Orange', 'instant-images'), - value: 'orange' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Red', 'instant-images'), - value: 'red' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Purple', 'instant-images'), - value: 'purple' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Magenta', 'instant-images'), - value: 'magenta' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Teal', 'instant-images'), - value: 'teal' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Blue', 'instant-images'), - value: 'blue' -}]; -var UNSPLASH_ORIENTATIONS = [{ - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Landscape', 'instant-images'), - value: 'landscape' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Portrait', 'instant-images'), - value: 'portrait' -}, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Square', 'instant-images'), - value: 'squarish' -}]; - -/***/ }), - -/***/ "./src/js/editor/block/components/Header.js": -/*!**************************************************!*\ - !*** ./src/js/editor/block/components/Header.js ***! - \**************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ BlockHeader) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/pluginProvider */ "./src/js/common/pluginProvider.js"); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _components_Icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../components/Icon */ "./src/js/components/Icon.js"); - - - - -var providers = _constants_API__WEBPACK_IMPORTED_MODULE_2__.API.providers; - -/** - * Render the block header. - * - * @param {Object} props The component props. - * @param {Object} props.switchProvider The function to switch the provider. - * @return {JSX.Element} The BlockHeader component. - */ -function BlockHeader(_ref) { - var switchProvider = _ref.switchProvider; - var _usePluginContext = (0,_common_pluginProvider__WEBPACK_IMPORTED_MODULE_1__.usePluginContext)(), - provider = _usePluginContext.provider; - - /** - * Switch the provider via select. - * - * @param {string} value The provider value. - */ - function providerChange(value) { - if (value) { - switchProvider(value); - } - } - return /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--header" - }, /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--header-logo" - }, /*#__PURE__*/React.createElement(_components_Icon__WEBPACK_IMPORTED_MODULE_3__.IconLogo, null), /*#__PURE__*/React.createElement("span", null, "Instant Images")), /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--header-nav" - }, /*#__PURE__*/React.createElement("label", { - className: "offscreen" - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Select Provider', 'instant-images')), /*#__PURE__*/React.createElement("select", { - defaultValue: provider, - onChange: function onChange(e) { - return providerChange(e.target.value); - } - }, /*#__PURE__*/React.createElement("option", { - value: "" - }, "-- ", (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Select Provider', 'instant-images'), " --"), providers.map(function (item, index) { - return /*#__PURE__*/React.createElement("option", { - key: index, - value: item.toLowerCase() - }, item); - })))); -} - -/***/ }), - -/***/ "./src/js/editor/block/components/Instructions.js": -/*!********************************************************!*\ - !*** ./src/js/editor/block/components/Instructions.js ***! - \********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ BlockInstructions) -/* harmony export */ }); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Render instructional text for the WP Block. - * - * @param {Object} props The component props. - * @return {JSX.Element} The BlockInstructions component. - */ -function BlockInstructions(props) { - var _props$show = props.show, - show = _props$show === void 0 ? false : _props$show; - if (!show) { - return null; - } - return /*#__PURE__*/React.createElement("div", { - className: "instant-images-block--instructions" - }, /*#__PURE__*/React.createElement("span", null, "\u2190"), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Scroll to Load Images', 'instant-images'), /*#__PURE__*/React.createElement("span", null, "\u2192")); -} - -/***/ }), - -/***/ "./src/js/editor/block/components/LoadMore.js": -/*!****************************************************!*\ - !*** ./src/js/editor/block/components/LoadMore.js ***! - \****************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); - - - -/** - * Render the BlockLoadMore component. - * - * @return {JSX.Element} The BlockLoadMore component. - */ -var BlockLoadMore = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { - var done = props.done; - return /*#__PURE__*/React.createElement("div", { - className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('instant-images-block--loader', done ? 'done' : null), - ref: ref - }); -}); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BlockLoadMore); - -/***/ }), - -/***/ "./src/js/editor/plugin/components/Menu.js": -/*!*************************************************!*\ - !*** ./src/js/editor/plugin/components/Menu.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Menu) -/* harmony export */ }); -/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/editor */ "@wordpress/editor"); -/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_editor__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _components_Icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../components/Icon */ "./src/js/components/Icon.js"); - - - -/** - * The plugin menu as a component. - * - * @return {JSX.Element} The Menu component. - */ -function Menu() { - return /*#__PURE__*/React.createElement(_wordpress_editor__WEBPACK_IMPORTED_MODULE_0__.PluginSidebarMoreMenuItem, { - icon: /*#__PURE__*/React.createElement(_components_Icon__WEBPACK_IMPORTED_MODULE_1__["default"], { - borderless: true - }), - target: "instant-images-sidebar", - className: "instant-images-menu-item" - }, "Instant Images"); -} - -/***/ }), - -/***/ "./src/js/editor/plugin/components/Plugin.js": -/*!***************************************************!*\ - !*** ./src/js/editor/plugin/components/Plugin.js ***! - \***************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Plugin) -/* harmony export */ }); -/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/editor */ "@wordpress/editor"); -/* harmony import */ var _wordpress_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_editor__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _components_Icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../components/Icon */ "./src/js/components/Icon.js"); -/* harmony import */ var _Sidebar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Sidebar */ "./src/js/editor/plugin/components/Sidebar.js"); - - - - -/** - * The plugin sidebar as a component. - * - * @return {JSX.Element} The Plugin component. - */ -function Plugin() { - return /*#__PURE__*/React.createElement(_wordpress_editor__WEBPACK_IMPORTED_MODULE_0__.PluginSidebar, { - icon: /*#__PURE__*/React.createElement(_components_Icon__WEBPACK_IMPORTED_MODULE_1__["default"], { - borderless: true - }), - name: "instant-images-sidebar", - title: "Instant Images" - }, /*#__PURE__*/React.createElement(_Sidebar__WEBPACK_IMPORTED_MODULE_2__["default"], null)); -} - -/***/ }), - -/***/ "./src/js/editor/plugin/components/Sidebar.js": -/*!****************************************************!*\ - !*** ./src/js/editor/plugin/components/Sidebar.js ***! - \****************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ Sidebar) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _components_InstantImages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../components/InstantImages */ "./src/js/components/InstantImages.js"); -/* harmony import */ var _functions_getProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../functions/getProvider */ "./src/js/functions/getProvider.js"); -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } - - - - -/** - * The image listing sidebar for the plugin sidebar. - * - * @return {JSX.Element} The Panel component. - */ -function Sidebar() { - var provider = (0,_functions_getProvider__WEBPACK_IMPORTED_MODULE_2__["default"])(); - var _useState = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false), - _useState2 = _slicedToArray(_useState, 2), - mounted = _useState2[0], - setMounted = _useState2[1]; - var containerRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(); - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - if (!mounted) { - setMounted(true); - } - }, []); // eslint-disable-line react-hooks/exhaustive-deps - - return /*#__PURE__*/React.createElement("div", { - className: "instant-img-container", - "data-editor": "gutenberg-sidebar", - ref: containerRef - }, !!mounted && /*#__PURE__*/React.createElement(_components_InstantImages__WEBPACK_IMPORTED_MODULE_1__["default"], { - editor: "sidebar", - data: [], - api_error: null, - provider: provider, - container: containerRef === null || containerRef === void 0 ? void 0 : containerRef.current - })); -} - -/***/ }), - -/***/ "./src/js/editor/plugin/index.js": -/*!***************************************!*\ - !*** ./src/js/editor/plugin/index.js ***! - \***************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* reexport safe */ _components_Plugin__WEBPACK_IMPORTED_MODULE_0__["default"]) -/* harmony export */ }); -/* harmony import */ var _components_Plugin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/Plugin */ "./src/js/editor/plugin/components/Plugin.js"); - - -/***/ }), - -/***/ "./src/js/editor/utils/insertImage.js": -/*!********************************************!*\ - !*** ./src/js/editor/utils/insertImage.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ insertImage) -/* harmony export */ }); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); -/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); - - - -/** - * Insert an image block into the block editor. - * - * @param {Object} attachment The attachment object. - * @param {string} clientId The block ID. - */ -function insertImage(attachment, clientId) { - var _attachment$id = attachment.id, - id = _attachment$id === void 0 ? null : _attachment$id, - _attachment$url = attachment.url, - url = _attachment$url === void 0 ? null : _attachment$url, - _attachment$caption = attachment.caption, - caption = _attachment$caption === void 0 ? '' : _attachment$caption, - _attachment$alt = attachment.alt, - alt = _attachment$alt === void 0 ? '' : _attachment$alt; - if (!url || !id) { - return; - } - - // Create block. - var block = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.createBlock)('core/image', { - id: id, - url: url, - caption: caption, - alt: alt - }); - if (clientId) { - // Replace the Instant Images block. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)('core/block-editor').replaceBlock(clientId, block); - } else { - // Insert Image block. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)('core/block-editor').insertBlocks(block); - } -} - -/***/ }), - -/***/ "./src/js/editor/utils/setFeaturedImage.js": -/*!*************************************************!*\ - !*** ./src/js/editor/utils/setFeaturedImage.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ setFeaturedImage) -/* harmony export */ }); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Set image as featured image in Gutenberg. - * - * @param {Object} attachment The attachment object. - */ -function setFeaturedImage(attachment) { - var _attachment$id = attachment.id, - id = _attachment$id === void 0 ? null : _attachment$id; - if (!id) { - return; - } - - // Set the featured image. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/editor').editPost({ - featured_media: id - }); - - // Open the document sidebar. - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.dispatch)('core/edit-post').openGeneralSidebar('edit-post/document'); -} - -/***/ }), - -/***/ "./src/js/functions/buildURL.js": -/*!**************************************!*\ - !*** ./src/js/functions/buildURL.js ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ buildTestURL: () => (/* binding */ buildTestURL), -/* harmony export */ "default": () => (/* binding */ buildURL), -/* harmony export */ getProxyURL: () => (/* binding */ getProxyURL) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _getQueryParams__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getQueryParams */ "./src/js/functions/getQueryParams.js"); -/* harmony import */ var _providers_openverse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./providers/openverse */ "./src/js/functions/providers/openverse.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - - - - -/** - * Build the API query parameters. - * - * @param {string} type The query type (search, photos, id). - * @param {Object} params The current params object. - * @return {string} The new API URL with querystring params. - */ -function buildURL(type, params) { - if (!type) { - // Bail early if API query type is missing. - return ''; - } - // Get the current provider. - var _params = params, - _params$provider = _params.provider, - provider = _params$provider === void 0 ? 'unsplash' : _params$provider; - - // Provider doesn't need to be sent. - delete params.provider; - - // Set Openverse params. - params = provider === 'openverse' ? (0,_providers_openverse__WEBPACK_IMPORTED_MODULE_2__.openverseParams)(type, params) : params; - - // Build the API URL. - var url = new URL(getProxyURL(provider)); - - // Add `type` to params. - url.searchParams.append('type', type); - - // Append query params. - Object.keys(params).forEach(function (key) { - url.searchParams.append(key, params[key]); - }); - - // Add `version` to params. - url.searchParams.append('version', instant_img_localize.version); - return url === null || url === void 0 ? void 0 : url.href; -} - -/** - * Get the proxy URL from ENV vars. - * - * @param {string} provider The image provider. - * @return {string} The proxy URL. - */ -function getProxyURL(provider) { - var _API$proxy = _constants_API__WEBPACK_IMPORTED_MODULE_0__.API.proxy, - proxy = _API$proxy === void 0 ? 'https://proxy.getinstantimages.com/api/' : _API$proxy; - return "".concat(proxy).concat(provider); -} - -/** - * Build a API testing URL. - * - * @param {string} provider The current service provider. - * @return {string} The API URL. - */ -function buildTestURL(provider) { - var options = { - page: 1 - }; - - // Build URL. - var params = _objectSpread(_objectSpread({ - test: true - }, (0,_getQueryParams__WEBPACK_IMPORTED_MODULE_1__["default"])(provider)), options); - return buildURL('photos', params); -} - -/***/ }), - -/***/ "./src/js/functions/consoleStatus.js": -/*!*******************************************!*\ - !*** ./src/js/functions/consoleStatus.js ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ consoleStatus) -/* harmony export */ }); -/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/js/functions/helpers.js"); -/* harmony import */ var _getErrorMessage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getErrorMessage */ "./src/js/functions/getErrorMessage.js"); - - - -/** - * Display a console.warn message about API status. - * - * @param {string} provider The API service provider. - * @param {string} status The API status. - */ -function consoleStatus(provider) { - var status = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200; - var local = instant_img_localize; - var message = (0,_getErrorMessage__WEBPACK_IMPORTED_MODULE_1__["default"])(status); - switch (status) { - case 400: - case 401: - case 500: - // Unsplash/Pixabay/Pexels incorrect API key - console.warn("[".concat(local.instant_images, " - ").concat(status, " Error] ").concat((0,_helpers__WEBPACK_IMPORTED_MODULE_0__.capitalizeFirstLetter)(provider), ": ").concat(message)); - break; - case 429: - /** - * Pixabay, Pexels - too many requests. - * - * @see https://www.pexels.com/api/documentation/#statistics - * @see https://pixabay.com/api/docs/#api_rate_limit - */ - console.warn("[".concat(local.instant_images, " - ").concat(status, " Error] ").concat((0,_helpers__WEBPACK_IMPORTED_MODULE_0__.capitalizeFirstLetter)(provider), ": ").concat(message)); - break; - default: - break; - } -} - -/***/ }), - -/***/ "./src/js/functions/generateAttribution.js": -/*!*************************************************!*\ - !*** ./src/js/functions/generateAttribution.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ generateAttribution) -/* harmony export */ }); -/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/js/functions/helpers.js"); - - -/** - * Get the API URL for searches by ID. - * - * @param {string} text Attribution hook content. - * @param {string} provider Image provider. - * @param {string} permalink Image url. - * @param {Object} user The user data. - * @return {string} The raw attribution HTML. - */ -function generateAttribution(text, provider, permalink, user) { - if (!text || !provider || !permalink || !user) { - return text; - } - - // Get user data. - var username = user.name, - user_url = user.url; - - // Format provider data. - var provider_url = instant_img_localize["".concat(provider, "_url")]; - var provider_name = (0,_helpers__WEBPACK_IMPORTED_MODULE_0__.capitalizeFirstLetter)(provider); - - // Generate attribution template. - var attribution = text; - attribution = attribution.replace('{username}', username); - attribution = attribution.replace('{user_url}', user_url); - attribution = attribution.replace('{image_url}', permalink); - attribution = attribution.replace('{provider_url}', provider_url); - attribution = attribution.replace('{provider}', provider_name); - return attribution; -} - -/***/ }), - -/***/ "./src/js/functions/getErrorMessage.js": -/*!*********************************************!*\ - !*** ./src/js/functions/getErrorMessage.js ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getErrorMessage) -/* harmony export */ }); -/** - * Get the correct error message by status code. - * - * @param {string} status The API status. - */ -function getErrorMessage() { - var status = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 200; - var local = instant_img_localize; - switch (status) { - case 400: - case 401: - // Unsplash/Pixabay/Pexels incorrect API key. - return local.api_invalid_msg; - case 403: - return local.api_invalid_403_msg; - case 404: - return local.api_invalid_404_msg; - case 429: - /** - * Pixabay, Pexels - too many requests. - * - * @see https://www.pexels.com/api/documentation/#statistics - * @see https://pixabay.com/api/docs/#api_rate_limit - */ - return local.api_ratelimit_msg; - case 500: - case 503: - // Internal server error. - return local.api_invalid_500_msg; - case 501: - // Missing params. - return local.api_invalid_501_msg; - default: - break; - } -} - -/***/ }), - -/***/ "./src/js/functions/getProvider.js": -/*!*****************************************!*\ - !*** ./src/js/functions/getProvider.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getProvider) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); - - -/** - * Get the default provider on page load. - * - * @return {string} The default service provider. - */ -function getProvider() { - return instant_img_localize && instant_img_localize.default_provider ? instant_img_localize.default_provider : _constants_API__WEBPACK_IMPORTED_MODULE_0__.API.defaults.provider; -} - -/***/ }), - -/***/ "./src/js/functions/getQueryParams.js": -/*!********************************************!*\ - !*** ./src/js/functions/getQueryParams.js ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getQueryParams), -/* harmony export */ getAuth: () => (/* binding */ getAuth), -/* harmony export */ getContentSafety: () => (/* binding */ getContentSafety) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - - -// eslint-disable - -/** - * Build the API query parameters - * - * @param {string} provider The current service provider. - * @param {Object} queryParams Optional query parameters to append to base params. - * @return {Object} Parameters used for the fetch request. - */ -function getQueryParams(provider, queryParams) { - if (!provider) { - return {}; - } - - // Set default params. - var params = { - provider: provider - }; - - // Append additional params. - params = getContentSafety(params, provider); - params = _objectSpread(_objectSpread({}, params), queryParams); - params = getAuth(params, provider); - - /** - * Display query params in the browser console. - * - * Global plugin hook. - */ - if (instant_img_localize.query_debug) { - console.table(params); - } - return params; -} - -/** - * Get auth keys and append to API query request. - * - * @param {Object} params The current params object. - * @param {string} provider The current service provider. - * @return {Object} The auth parameter object. - */ -function getAuth(params, provider) { - var has_auth = _constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider].requires_key; - if (!has_auth || !provider) { - return params; - } - var app_id = instant_img_localize["".concat(provider, "_app_id")]; - if (app_id) { - // Pass API keys if not using defaults. - params[_constants_API__WEBPACK_IMPORTED_MODULE_0__.API[provider].api_var] = app_id; - } - return params; -} - -/** - * Set the photo safety for indicating that only images suitable for all ages should be returned. - * - * @see https://unsplash.com/documentation#content-safety - * @see https://pixabay.com/api/docs/ - * - * @param {Object} params The current params object. - * @param {string} provider The current service provider. - * @return {Object} The fetch parameters object. - */ -function getContentSafety(params, provider) { - switch (provider) { - case 'unsplash': - if (instant_img_localize.unsplash_content_filter) { - params.content_filter = instant_img_localize.unsplash_content_filter; - } - break; - case 'pixabay': - if (instant_img_localize.pixabay_safesearch) { - params.safesearch = 'true'; - } - break; - case 'openverse': - if (instant_img_localize.openverse_mature) { - params.mature = 'true'; - } - break; - } - return params; -} - -/***/ }), - -/***/ "./src/js/functions/getResults.js": -/*!****************************************!*\ - !*** ./src/js/functions/getResults.js ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ getResults), -/* harmony export */ getResultById: () => (/* binding */ getResultById), -/* harmony export */ getSearchTotal: () => (/* binding */ getSearchTotal) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); - - -/** - * Pluck `results` from the API response. - * - * @param {Object} data The API results object. - * @return {Array} The results as an array. - */ -function getResults(data) { - if (!data) { - return []; - } - return data[_constants_API__WEBPACK_IMPORTED_MODULE_0__.API.defaults.arr_key] || []; -} - -/** - * Get the total search results. - * - * @param {Object} data The search data object. - * @return {string} The total results. - */ -function getSearchTotal(data) { - // Return 0 if undefined or null. - return data.total === undefined || data.total === null ? 0 : data.total; -} - -/** - * Get results by photo ID. - * - * @param {string} provider The current service provider. - * @param {string} key The match key to access. - * @param {Object} data The API results object. - * @return {Array} The results as an array. - * @deprecated 5.0 - */ -function getResultById(provider, key, data) { - if (!data) { - return []; - } - var result = []; - switch (provider) { - case 'unsplash': - case 'pexels': - result = data || []; - break; - case 'pixabay': - result = data[key] && data[key][0] ? data[key][0] : []; - break; - } - return result; -} - -/***/ }), - -/***/ "./src/js/functions/helpers.js": -/*!*************************************!*\ - !*** ./src/js/functions/helpers.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ capitalizeFirstLetter: () => (/* binding */ capitalizeFirstLetter), -/* harmony export */ checkRateLimit: () => (/* binding */ checkRateLimit), -/* harmony export */ gotoURL: () => (/* binding */ gotoURL), -/* harmony export */ hideTooltip: () => (/* binding */ hideTooltip), -/* harmony export */ isObjectEmpty: () => (/* binding */ isObjectEmpty), -/* harmony export */ md5Hash: () => (/* binding */ md5Hash), -/* harmony export */ showTooltip: () => (/* binding */ showTooltip) -/* harmony export */ }); -/* harmony import */ var crypto_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! crypto-js */ "./node_modules/crypto-js/index.js"); -/* harmony import */ var crypto_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(crypto_js__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Get the MD5 hash value of a URL. - * - * @param {string} url The API URL to hash. - * @return {string} The MD5 hash. - */ -function md5Hash(url) { - return crypto_js__WEBPACK_IMPORTED_MODULE_0___default().MD5(url).toString(); -} - -/** - * Check if an object is empty. - * - * @param {Object} obj The object to test against. - * @return {boolean} Is this an object. - */ -function isObjectEmpty(obj) { - if (obj === null || obj === undefined) { - return true; - } - return Object.keys(obj).length === 0; -} - -/** - * Check the `x-ratelimit-remaining` headers to confirm the API is available. - * - * @param {Object} headers The request headers object. - */ -function checkRateLimit(headers) { - if (!headers) { - return; - } - var limit = headers.get('X-RateLimit-Limit') || -1; - var remaining = headers.get('X-RateLimit-Remaining') || -1; - if (limit > -1 && parseInt(remaining) < 2) { - alert(instant_img_localize.api_ratelimit_msg); // eslint-disable-line - } -} - -/** - * Capitalize the first letter of a string. - * - * @param {string} str The string to format. - * @return {string} The formatted string. - */ -function capitalizeFirstLetter(str) { - return str.charAt(0).toUpperCase() + str.slice(1); -} -var tooltipInterval = ''; - -/** - * Show the tooltip. - * - * @param {Event} e The target tooltip element. - * @since 4.3.0 - */ -function showTooltip(e) { - var target = e.currentTarget; - var rect = target.getBoundingClientRect(); - var left = Math.round(rect.left); - var top = Math.round(rect.top); - var container = target.closest('#photo-listing'); - var tooltip = container.querySelector('#tooltip'); - tooltip.classList.remove('over'); - if (target.classList.contains('tooltip--above')) { - tooltip.classList.add('above'); - } else { - tooltip.classList.remove('above'); - } - - // Delay Tooltip Reveal. - tooltipInterval = setInterval(function () { - clearInterval(tooltipInterval); - tooltip.innerHTML = target.dataset.title; // Tooltip content. - - // Position Tooltip. - left = left - tooltip.offsetWidth + target.offsetWidth + 5; - tooltip.style.left = "".concat(left, "px"); - tooltip.style.top = "".concat(top, "px"); - setTimeout(function () { - tooltip.classList.add('over'); - }, 25); - }, 750); -} - -/** - * Hide the tooltip. - * - * @param {Event} e The target tooltip element. - * @since 4.3.0 - */ -function hideTooltip(e) { - clearInterval(tooltipInterval); - var container = e.currentTarget.closest('#photo-listing'); - var tooltip = container.querySelector('#tooltip'); - tooltip.classList.remove('over'); -} - -/** - * Open the URL in new window. - * - * @param {string} url The destination URL. - */ -function gotoURL(url) { - if (url && window) { - window.open(url, '_blank'); - } -} - -/***/ }), - -/***/ "./src/js/functions/localStorage.js": -/*!******************************************!*\ - !*** ./src/js/functions/localStorage.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ clearSearchHistory: () => (/* binding */ clearSearchHistory), -/* harmony export */ getSearchHistory: () => (/* binding */ getSearchHistory), -/* harmony export */ getSetting: () => (/* binding */ getSetting), -/* harmony export */ saveSearchHistory: () => (/* binding */ saveSearchHistory), -/* harmony export */ saveSettings: () => (/* binding */ saveSettings) -/* harmony export */ }); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -var searchName = 'instant-images-recent-searches'; -var settingsName = 'instant-images-settings'; -var most = 10; - -/** - * Save search value to localstorage. - * - * @param {string} term The search term. - */ -function saveSearchHistory(term) { - if (term && term.toLowerCase().includes('id:')) { - return; // Don't index string with `id:` - } - var recent = getSearchHistory(); - if (!recent) { - localStorage.setItem(searchName, JSON.stringify([term])); - return; - } - - // Find duplicates. - var duplicate = recent.indexOf(term); - if (duplicate > -1) { - recent.splice(duplicate, 1); - } - - // Limit to 6 items. - if (recent.length >= most) { - recent.length = most; - } - - // Add new term to the beginning of the array. - recent.unshift(term); - localStorage.setItem(searchName, JSON.stringify(recent)); -} - -/** - * Get the search history from localstorage. - * - * @return {Array} The search history. - */ -function getSearchHistory() { - var history = localStorage.getItem(searchName); - if (!history) { - return []; - } - return JSON.parse(localStorage.getItem(searchName)); -} - -/** - * Clear search history. - */ -function clearSearchHistory() { - localStorage.removeItem(searchName); -} - -/** - * Save generic setting to localstorage as an key/value object pair. - * - * @param {string} key The object key. - * @param {value} value The object value. - */ -function saveSettings(key, value) { - var settings = localStorage.getItem(settingsName); - var setting = _defineProperty({}, key, value); - if (!settings) { - localStorage.setItem(settingsName, JSON.stringify(setting)); - } else { - var parsed = JSON.parse(settings); - parsed[key] = value; - localStorage.setItem(settingsName, JSON.stringify(parsed)); - } -} - -/** - * Get an individual setting from local storage. - * - * @param {string} key The stoarge key. - * @return {string|boolean} The storage value. - */ -function getSetting(key) { - var settings = localStorage.getItem(settingsName); - if (!settings) { - return false; - } - var parsed = JSON.parse(settings); - return parsed[key] ? parsed[key] : false; -} - -/***/ }), - -/***/ "./src/js/functions/providers/openverse.js": -/*!*************************************************!*\ - !*** ./src/js/functions/providers/openverse.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ openverseParams: () => (/* binding */ openverseParams) -/* harmony export */ }); -/* harmony import */ var _constants_filters_openverse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../constants/filters/openverse */ "./src/js/constants/filters/openverse.js"); - - -/** - * Format the params for Openverse. - * - * @param {string} type Query type (search, photos, id). - * @param {Object} params Query params object. - * @return {Object} Updated params. - */ -function openverseParams(type, params) { - if (type === 'photos' && !params.source) { - params.source = 'wordpress'; // Add `wordpress` as the default openverse `source`. - } - if (type === 'search') { - // Include these sources only. - var sources = _constants_filters_openverse__WEBPACK_IMPORTED_MODULE_0__.OPENVERSE_SOURCES.map(function (source) { - return source.value; - }).toString(); // e.g. `wordpress,flickr,nasa,spacex,wikimedia` - params.source = sources; - } - return params; -} - -/***/ }), - -/***/ "./src/js/functions/providers/unsplash.js": -/*!************************************************!*\ - !*** ./src/js/functions/providers/unsplash.js ***! - \************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ unsplashDownload: () => (/* binding */ unsplashDownload) -/* harmony export */ }); -/* harmony import */ var _buildURL__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../buildURL */ "./src/js/functions/buildURL.js"); -/* harmony import */ var _getQueryParams__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../getQueryParams */ "./src/js/functions/getQueryParams.js"); - - - -/** - * Function to trigger an image download at unsplash.com. - * Note: This is used to give authors download credits and nothing more. - * - * @see https://help.unsplash.com/en/articles/2511258-guideline-triggering-a-download - * - * @param {string} download_url The URL to trigger a download. - * @since 3.1 - */ -function unsplashDownload(download_url) { - var params = (0,_getQueryParams__WEBPACK_IMPORTED_MODULE_1__.getAuth)({}, 'unsplash'); - params.download_url = download_url; // Append download URL to query params. - var url = (0,_buildURL__WEBPACK_IMPORTED_MODULE_0__["default"])('photos', params); - fetch(url).then(function (data) { - return data.json(); - }).then(function () { - // Success, nothing else happens here - console.log('Image download successsfully triggered at Unsplash.'); // eslint-disable-line no-console - })["catch"](function (error) { - console.warn(error); - }); -} - -/***/ }), - -/***/ "./src/js/functions/session.js": -/*!*************************************!*\ - !*** ./src/js/functions/session.js ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ deleteSession: () => (/* binding */ deleteSession), -/* harmony export */ getSession: () => (/* binding */ getSession), -/* harmony export */ saveSession: () => (/* binding */ saveSession) -/* harmony export */ }); -/* harmony import */ var _constants_API__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/API */ "./src/js/constants/API.js"); -/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "./src/js/functions/helpers.js"); - - - -/** - * Get results from session storage by URL. - * - * @param {string} url The API URL. - * @return {Array|boolean} Session results. - */ -function getSession(url) { - if (!url || _constants_API__WEBPACK_IMPORTED_MODULE_0__.API.testmode) { - return false; // Exit if no URL or test m ode is enabled. - } - var session = sessionStorage.getItem((0,_helpers__WEBPACK_IMPORTED_MODULE_1__.md5Hash)(url)); - if (!session) { - return false; // Exit if no session data. - } - var data = JSON.parse(session); - var _data$expires = data.expires, - expires = _data$expires === void 0 ? 0 : _data$expires, - _data$error = data.error, - error = _data$error === void 0 ? null : _data$error; - if (error) { - return false; // Exit if session data has error entry. - } - - // Check if expiration time has passed. - var expired = Date.now() > expires; - - // Delete session data when expired. - if (expired) { - deleteSession(url); - } - return data && !expired ? data : false; -} - -/** - * Save API data to session storage by URL. - * - * @param {string} url Save results to session by URL. - * @param {Array} results The API results. - */ -function saveSession(url, results) { - if (!url || !results || results !== null && results !== void 0 && results.error) { - return false; - } - - // Set expiration to 2 hours. - results.expires = Date.now() + 7200000; - - // Save session data. - sessionStorage.setItem((0,_helpers__WEBPACK_IMPORTED_MODULE_1__.md5Hash)(url), JSON.stringify(results)); -} - -/** - * Remove/delete session storage by URL. - * - * @param {string} url The API URL. - */ -function deleteSession(url) { - if (!url) { - return false; - } - sessionStorage.removeItem((0,_helpers__WEBPACK_IMPORTED_MODULE_1__.md5Hash)(url)); -} - -/***/ }), - -/***/ "./src/js/functions/updatePluginSetting.js": -/*!*************************************************!*\ - !*** ./src/js/functions/updatePluginSetting.js ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ updatePluginSetting) -/* harmony export */ }); -/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js"); - - -/** - * Update plugin settings by specific key/value pair. - * - * @param {string} setting The previous provider. - * @param {string} value The value to save. - */ -function updatePluginSetting(setting, value) { - var _instant_img_localize; - var api = ((_instant_img_localize = instant_img_localize) === null || _instant_img_localize === void 0 ? void 0 : _instant_img_localize.root) + 'instant-images/settings/'; // eslint-disable-line no-undef - - var params = { - setting: setting, - value: value - }; - var config = { - headers: { - 'X-WP-Nonce': instant_img_localize.nonce, - // eslint-disable-line no-undef - 'Content-Type': 'application/json' - } - }; - axios__WEBPACK_IMPORTED_MODULE_0__["default"].post(api, JSON.stringify(params), config).then(function () {})["catch"](function (error) { - console.warn(error); - }); -} - -/***/ }), - -/***/ "./src/js/hooks/useArrowControls.js": -/*!******************************************!*\ - !*** ./src/js/hooks/useArrowControls.js ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ useArrowControls: () => (/* binding */ useArrowControls) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } -function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } - - -/** - * Detect up and down arrow presses. - * - * @param {boolean} active Is the element currently active. - * @param {Object} ref The container ref to select the focusable elements. - */ -function useArrowControls(active, ref) { - var focusedRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(active); - - /** - * Add event listener for arrow keys. - * - * @param {KeyboardEvent} e The event. - */ - function arrowHandler(e) { - var key = e.key; - if (focusedRef !== null && focusedRef !== void 0 && focusedRef.current && ref !== null && ref !== void 0 && ref.current) { - var focusable = ref === null || ref === void 0 ? void 0 : ref.current.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), input'); - if (!(focusable !== null && focusable !== void 0 && focusable.length)) { - // Exit if no focusable elements. - return; - } - var first = focusable[0]; - var last = focusable[focusable.length - 1]; - var _active = document.activeElement; // eslint-disable-line - var activeIndex = _toConsumableArray(focusable).indexOf(_active); - - // Up arrow. - if (key === 'ArrowUp') { - e.preventDefault(); - if (activeIndex === 0) { - last.focus({ - preventScroll: true - }); - } else { - focusable[activeIndex - 1].focus({ - preventScroll: true - }); - } - } - // Down Arrow - if (key === 'ArrowDown') { - e.preventDefault(); - if (activeIndex === focusable.length - 1 || activeIndex === -1) { - first.focus({ - preventScroll: true - }); - } else { - focusable[activeIndex + 1].focus({ - preventScroll: true - }); - } - } - } - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - focusedRef.current = active; - }, [active]); - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - document.addEventListener('keydown', arrowHandler, false); - return function () { - // Dispose of events. - document.removeEventListener('keydown', arrowHandler, false); - }; - }, []); // eslint-disable-line react-hooks/exhaustive-deps -} - -/***/ }), - -/***/ "./src/js/hooks/useClickOutside.js": -/*!*****************************************!*\ - !*** ./src/js/hooks/useClickOutside.js ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ useClickOutside: () => (/* binding */ useClickOutside) -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); - - -/** - * Detect clicks outside of ref. - * - * @param {Object} ref React ref. - * @param {Function} onClickOutside Function to invoke when clicked outside. - */ -function useClickOutside(ref, onClickOutside) { - /** - * Escape handler. - * - * @param {Event} e The key press event. - */ - function escapeClick(e) { - var key = e.key; - if (key === 'Escape') { - onClickOutside(); - } - } - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { - /** - * Invoke Function onClick outside of element - * - * @param {Event} event The event object. - */ - function handleClickOutside(event) { - if (ref.current && !ref.current.contains(event.target)) { - onClickOutside(); - } - } - - // Bind events. - document.addEventListener('mousedown', handleClickOutside); - document.addEventListener('keyup', handleClickOutside); - document.addEventListener('keydown', escapeClick, false); - return function () { - // Dispose of events. - document.removeEventListener('mousedown', handleClickOutside); - document.removeEventListener('keyup', handleClickOutside); - document.removeEventListener('keydown', escapeClick, false); - }; - }, [ref, onClickOutside]); //eslint-disable-line react-hooks/exhaustive-deps -} - -/***/ }), - -/***/ "./node_modules/crypto-js/aes.js": -/*!***************************************!*\ - !*** ./node_modules/crypto-js/aes.js ***! - \***************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - // Lookup tables - var SBOX = []; - var INV_SBOX = []; - var SUB_MIX_0 = []; - var SUB_MIX_1 = []; - var SUB_MIX_2 = []; - var SUB_MIX_3 = []; - var INV_SUB_MIX_0 = []; - var INV_SUB_MIX_1 = []; - var INV_SUB_MIX_2 = []; - var INV_SUB_MIX_3 = []; - - // Compute lookup tables - (function () { - // Compute double table - var d = []; - for (var i = 0; i < 256; i++) { - if (i < 128) { - d[i] = i << 1; - } else { - d[i] = (i << 1) ^ 0x11b; - } - } - - // Walk GF(2^8) - var x = 0; - var xi = 0; - for (var i = 0; i < 256; i++) { - // Compute sbox - var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); - sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; - SBOX[x] = sx; - INV_SBOX[sx] = x; - - // Compute multiplication - var x2 = d[x]; - var x4 = d[x2]; - var x8 = d[x4]; - - // Compute sub bytes, mix columns tables - var t = (d[sx] * 0x101) ^ (sx * 0x1010100); - SUB_MIX_0[x] = (t << 24) | (t >>> 8); - SUB_MIX_1[x] = (t << 16) | (t >>> 16); - SUB_MIX_2[x] = (t << 8) | (t >>> 24); - SUB_MIX_3[x] = t; - - // Compute inv sub bytes, inv mix columns tables - var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); - INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); - INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); - INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); - INV_SUB_MIX_3[sx] = t; - - // Compute next counter - if (!x) { - x = xi = 1; - } else { - x = x2 ^ d[d[d[x8 ^ x2]]]; - xi ^= d[d[xi]]; - } - } - }()); - - // Precomputed Rcon lookup - var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; - - /** - * AES block cipher algorithm. - */ - var AES = C_algo.AES = BlockCipher.extend({ - _doReset: function () { - var t; - - // Skip reset of nRounds has been set before and key did not change - if (this._nRounds && this._keyPriorReset === this._key) { - return; - } - - // Shortcuts - var key = this._keyPriorReset = this._key; - var keyWords = key.words; - var keySize = key.sigBytes / 4; - - // Compute number of rounds - var nRounds = this._nRounds = keySize + 6; - - // Compute number of key schedule rows - var ksRows = (nRounds + 1) * 4; - - // Compute key schedule - var keySchedule = this._keySchedule = []; - for (var ksRow = 0; ksRow < ksRows; ksRow++) { - if (ksRow < keySize) { - keySchedule[ksRow] = keyWords[ksRow]; - } else { - t = keySchedule[ksRow - 1]; - - if (!(ksRow % keySize)) { - // Rot word - t = (t << 8) | (t >>> 24); - - // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; - - // Mix Rcon - t ^= RCON[(ksRow / keySize) | 0] << 24; - } else if (keySize > 6 && ksRow % keySize == 4) { - // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; - } - - keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; - } - } - - // Compute inv key schedule - var invKeySchedule = this._invKeySchedule = []; - for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { - var ksRow = ksRows - invKsRow; - - if (invKsRow % 4) { - var t = keySchedule[ksRow]; - } else { - var t = keySchedule[ksRow - 4]; - } - - if (invKsRow < 4 || ksRow <= 4) { - invKeySchedule[invKsRow] = t; - } else { - invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ - INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; - } - } - }, - - encryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); - }, - - decryptBlock: function (M, offset) { - // Swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; - - this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); - - // Inv swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; - }, - - _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { - // Shortcut - var nRounds = this._nRounds; - - // Get input, add round key - var s0 = M[offset] ^ keySchedule[0]; - var s1 = M[offset + 1] ^ keySchedule[1]; - var s2 = M[offset + 2] ^ keySchedule[2]; - var s3 = M[offset + 3] ^ keySchedule[3]; - - // Key schedule row counter - var ksRow = 4; - - // Rounds - for (var round = 1; round < nRounds; round++) { - // Shift rows, sub bytes, mix columns, add round key - var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; - var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; - var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; - var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; - - // Update state - s0 = t0; - s1 = t1; - s2 = t2; - s3 = t3; - } - - // Shift rows, sub bytes, add round key - var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; - var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; - var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; - var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; - - // Set output - M[offset] = t0; - M[offset + 1] = t1; - M[offset + 2] = t2; - M[offset + 3] = t3; - }, - - keySize: 256/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); - */ - C.AES = BlockCipher._createHelper(AES); - }()); - - - return CryptoJS.AES; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/blowfish.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/blowfish.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - const N = 16; - - //Origin pbox and sbox, derived from PI - const ORIG_P = [ - 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, - 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89, - 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C, - 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917, - 0x9216D5D9, 0x8979FB1B - ]; - - const ORIG_S = [ - [ 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7, - 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99, - 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16, - 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E, - 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE, - 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013, - 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF, - 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E, - 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60, - 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440, - 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE, - 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A, - 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E, - 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677, - 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193, - 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032, - 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88, - 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239, - 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E, - 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0, - 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3, - 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98, - 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88, - 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE, - 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6, - 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D, - 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B, - 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7, - 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA, - 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463, - 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F, - 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09, - 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3, - 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB, - 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279, - 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8, - 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB, - 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82, - 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB, - 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573, - 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0, - 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B, - 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790, - 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8, - 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4, - 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0, - 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7, - 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C, - 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD, - 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1, - 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299, - 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9, - 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477, - 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF, - 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49, - 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF, - 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA, - 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5, - 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41, - 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915, - 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400, - 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915, - 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664, - 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A ], - [ 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623, - 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266, - 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1, - 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E, - 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6, - 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1, - 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E, - 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1, - 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737, - 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8, - 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF, - 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD, - 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701, - 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7, - 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41, - 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331, - 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF, - 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF, - 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E, - 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87, - 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C, - 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2, - 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16, - 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD, - 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B, - 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509, - 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E, - 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3, - 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F, - 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A, - 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4, - 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960, - 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66, - 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28, - 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802, - 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84, - 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510, - 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF, - 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14, - 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E, - 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50, - 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7, - 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8, - 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281, - 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99, - 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696, - 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128, - 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73, - 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0, - 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0, - 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105, - 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250, - 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3, - 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285, - 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00, - 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061, - 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB, - 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E, - 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735, - 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC, - 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9, - 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340, - 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20, - 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7 ], - [ 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934, - 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068, - 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF, - 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840, - 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45, - 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504, - 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A, - 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB, - 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE, - 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6, - 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42, - 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B, - 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2, - 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB, - 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527, - 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B, - 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33, - 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C, - 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3, - 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC, - 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17, - 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564, - 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B, - 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115, - 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922, - 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728, - 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0, - 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E, - 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37, - 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D, - 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804, - 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B, - 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3, - 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB, - 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D, - 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C, - 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350, - 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9, - 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A, - 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE, - 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D, - 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC, - 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F, - 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61, - 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2, - 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9, - 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2, - 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C, - 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E, - 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633, - 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10, - 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169, - 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52, - 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027, - 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5, - 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62, - 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634, - 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76, - 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24, - 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC, - 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4, - 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C, - 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837, - 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0 ], - [ 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B, - 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE, - 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B, - 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4, - 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8, - 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6, - 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304, - 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22, - 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4, - 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6, - 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9, - 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59, - 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593, - 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51, - 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28, - 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C, - 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B, - 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28, - 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C, - 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD, - 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A, - 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319, - 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB, - 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F, - 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991, - 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32, - 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680, - 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166, - 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE, - 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB, - 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5, - 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47, - 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370, - 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D, - 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84, - 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048, - 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8, - 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD, - 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9, - 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7, - 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38, - 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F, - 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C, - 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525, - 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1, - 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442, - 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964, - 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E, - 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8, - 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D, - 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F, - 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299, - 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02, - 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC, - 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614, - 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A, - 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6, - 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B, - 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0, - 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060, - 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E, - 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9, - 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F, - 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6 ] - ]; - - var BLOWFISH_CTX = { - pbox: [], - sbox: [] - } - - function F(ctx, x){ - let a = (x >> 24) & 0xFF; - let b = (x >> 16) & 0xFF; - let c = (x >> 8) & 0xFF; - let d = x & 0xFF; - - let y = ctx.sbox[0][a] + ctx.sbox[1][b]; - y = y ^ ctx.sbox[2][c]; - y = y + ctx.sbox[3][d]; - - return y; - } - - function BlowFish_Encrypt(ctx, left, right){ - let Xl = left; - let Xr = right; - let temp; - - for(let i = 0; i < N; ++i){ - Xl = Xl ^ ctx.pbox[i]; - Xr = F(ctx, Xl) ^ Xr; - - temp = Xl; - Xl = Xr; - Xr = temp; - } - - temp = Xl; - Xl = Xr; - Xr = temp; - - Xr = Xr ^ ctx.pbox[N]; - Xl = Xl ^ ctx.pbox[N + 1]; - - return {left: Xl, right: Xr}; - } - - function BlowFish_Decrypt(ctx, left, right){ - let Xl = left; - let Xr = right; - let temp; - - for(let i = N + 1; i > 1; --i){ - Xl = Xl ^ ctx.pbox[i]; - Xr = F(ctx, Xl) ^ Xr; - - temp = Xl; - Xl = Xr; - Xr = temp; - } - - temp = Xl; - Xl = Xr; - Xr = temp; - - Xr = Xr ^ ctx.pbox[1]; - Xl = Xl ^ ctx.pbox[0]; - - return {left: Xl, right: Xr}; - } - - /** - * Initialization ctx's pbox and sbox. - * - * @param {Object} ctx The object has pbox and sbox. - * @param {Array} key An array of 32-bit words. - * @param {int} keysize The length of the key. - * - * @example - * - * BlowFishInit(BLOWFISH_CTX, key, 128/32); - */ - function BlowFishInit(ctx, key, keysize) - { - for(let Row = 0; Row < 4; Row++) - { - ctx.sbox[Row] = []; - for(let Col = 0; Col < 256; Col++) - { - ctx.sbox[Row][Col] = ORIG_S[Row][Col]; - } - } - - let keyIndex = 0; - for(let index = 0; index < N + 2; index++) - { - ctx.pbox[index] = ORIG_P[index] ^ key[keyIndex]; - keyIndex++; - if(keyIndex >= keysize) - { - keyIndex = 0; - } - } - - let Data1 = 0; - let Data2 = 0; - let res = 0; - for(let i = 0; i < N + 2; i += 2) - { - res = BlowFish_Encrypt(ctx, Data1, Data2); - Data1 = res.left; - Data2 = res.right; - ctx.pbox[i] = Data1; - ctx.pbox[i + 1] = Data2; - } - - for(let i = 0; i < 4; i++) - { - for(let j = 0; j < 256; j += 2) - { - res = BlowFish_Encrypt(ctx, Data1, Data2); - Data1 = res.left; - Data2 = res.right; - ctx.sbox[i][j] = Data1; - ctx.sbox[i][j + 1] = Data2; - } - } - - return true; - } - - /** - * Blowfish block cipher algorithm. - */ - var Blowfish = C_algo.Blowfish = BlockCipher.extend({ - _doReset: function () { - // Skip reset of nRounds has been set before and key did not change - if (this._keyPriorReset === this._key) { - return; - } - - // Shortcuts - var key = this._keyPriorReset = this._key; - var keyWords = key.words; - var keySize = key.sigBytes / 4; - - //Initialization pbox and sbox - BlowFishInit(BLOWFISH_CTX, keyWords, keySize); - }, - - encryptBlock: function (M, offset) { - var res = BlowFish_Encrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); - M[offset] = res.left; - M[offset + 1] = res.right; - }, - - decryptBlock: function (M, offset) { - var res = BlowFish_Decrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); - M[offset] = res.left; - M[offset + 1] = res.right; - }, - - blockSize: 64/32, - - keySize: 128/32, - - ivSize: 64/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.Blowfish.encrypt(message, key, cfg); - * var plaintext = CryptoJS.Blowfish.decrypt(ciphertext, key, cfg); - */ - C.Blowfish = BlockCipher._createHelper(Blowfish); - }()); - - - return CryptoJS.Blowfish; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/cipher-core.js": -/*!***********************************************!*\ - !*** ./node_modules/crypto-js/cipher-core.js ***! - \***********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Cipher core components. - */ - CryptoJS.lib.Cipher || (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var Base64 = C_enc.Base64; - var C_algo = C.algo; - var EvpKDF = C_algo.EvpKDF; - - /** - * Abstract base cipher template. - * - * @property {number} keySize This cipher's key size. Default: 4 (128 bits) - * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) - * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. - * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. - */ - var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ - /** - * Configuration options. - * - * @property {WordArray} iv The IV to use for this operation. - */ - cfg: Base.extend(), - - /** - * Creates this cipher in encryption mode. - * - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {Cipher} A cipher instance. - * - * @static - * - * @example - * - * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); - */ - createEncryptor: function (key, cfg) { - return this.create(this._ENC_XFORM_MODE, key, cfg); - }, - - /** - * Creates this cipher in decryption mode. - * - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {Cipher} A cipher instance. - * - * @static - * - * @example - * - * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); - */ - createDecryptor: function (key, cfg) { - return this.create(this._DEC_XFORM_MODE, key, cfg); - }, - - /** - * Initializes a newly created cipher. - * - * @param {number} xformMode Either the encryption or decryption transormation mode constant. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @example - * - * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); - */ - init: function (xformMode, key, cfg) { - // Apply config defaults - this.cfg = this.cfg.extend(cfg); - - // Store transform mode and key - this._xformMode = xformMode; - this._key = key; - - // Set initial values - this.reset(); - }, - - /** - * Resets this cipher to its initial state. - * - * @example - * - * cipher.reset(); - */ - reset: function () { - // Reset data buffer - BufferedBlockAlgorithm.reset.call(this); - - // Perform concrete-cipher logic - this._doReset(); - }, - - /** - * Adds data to be encrypted or decrypted. - * - * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. - * - * @return {WordArray} The data after processing. - * - * @example - * - * var encrypted = cipher.process('data'); - * var encrypted = cipher.process(wordArray); - */ - process: function (dataUpdate) { - // Append - this._append(dataUpdate); - - // Process available blocks - return this._process(); - }, - - /** - * Finalizes the encryption or decryption process. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. - * - * @return {WordArray} The data after final processing. - * - * @example - * - * var encrypted = cipher.finalize(); - * var encrypted = cipher.finalize('data'); - * var encrypted = cipher.finalize(wordArray); - */ - finalize: function (dataUpdate) { - // Final data update - if (dataUpdate) { - this._append(dataUpdate); - } - - // Perform concrete-cipher logic - var finalProcessedData = this._doFinalize(); - - return finalProcessedData; - }, - - keySize: 128/32, - - ivSize: 128/32, - - _ENC_XFORM_MODE: 1, - - _DEC_XFORM_MODE: 2, - - /** - * Creates shortcut functions to a cipher's object interface. - * - * @param {Cipher} cipher The cipher to create a helper for. - * - * @return {Object} An object with encrypt and decrypt shortcut functions. - * - * @static - * - * @example - * - * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); - */ - _createHelper: (function () { - function selectCipherStrategy(key) { - if (typeof key == 'string') { - return PasswordBasedCipher; - } else { - return SerializableCipher; - } - } - - return function (cipher) { - return { - encrypt: function (message, key, cfg) { - return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); - }, - - decrypt: function (ciphertext, key, cfg) { - return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); - } - }; - }; - }()) - }); - - /** - * Abstract base stream cipher template. - * - * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) - */ - var StreamCipher = C_lib.StreamCipher = Cipher.extend({ - _doFinalize: function () { - // Process partial blocks - var finalProcessedBlocks = this._process(!!'flush'); - - return finalProcessedBlocks; - }, - - blockSize: 1 - }); - - /** - * Mode namespace. - */ - var C_mode = C.mode = {}; - - /** - * Abstract base block cipher mode template. - */ - var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ - /** - * Creates this mode for encryption. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @static - * - * @example - * - * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); - */ - createEncryptor: function (cipher, iv) { - return this.Encryptor.create(cipher, iv); - }, - - /** - * Creates this mode for decryption. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @static - * - * @example - * - * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); - */ - createDecryptor: function (cipher, iv) { - return this.Decryptor.create(cipher, iv); - }, - - /** - * Initializes a newly created mode. - * - * @param {Cipher} cipher A block cipher instance. - * @param {Array} iv The IV words. - * - * @example - * - * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); - */ - init: function (cipher, iv) { - this._cipher = cipher; - this._iv = iv; - } - }); - - /** - * Cipher Block Chaining mode. - */ - var CBC = C_mode.CBC = (function () { - /** - * Abstract base CBC mode. - */ - var CBC = BlockCipherMode.extend(); - - /** - * CBC encryptor. - */ - CBC.Encryptor = CBC.extend({ - /** - * Processes the data block at offset. - * - * @param {Array} words The data words to operate on. - * @param {number} offset The offset where the block starts. - * - * @example - * - * mode.processBlock(data.words, offset); - */ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // XOR and encrypt - xorBlock.call(this, words, offset, blockSize); - cipher.encryptBlock(words, offset); - - // Remember this block to use with next block - this._prevBlock = words.slice(offset, offset + blockSize); - } - }); - - /** - * CBC decryptor. - */ - CBC.Decryptor = CBC.extend({ - /** - * Processes the data block at offset. - * - * @param {Array} words The data words to operate on. - * @param {number} offset The offset where the block starts. - * - * @example - * - * mode.processBlock(data.words, offset); - */ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // Remember this block to use with next block - var thisBlock = words.slice(offset, offset + blockSize); - - // Decrypt and XOR - cipher.decryptBlock(words, offset); - xorBlock.call(this, words, offset, blockSize); - - // This block becomes the previous block - this._prevBlock = thisBlock; - } - }); - - function xorBlock(words, offset, blockSize) { - var block; - - // Shortcut - var iv = this._iv; - - // Choose mixing block - if (iv) { - block = iv; - - // Remove IV for subsequent blocks - this._iv = undefined; - } else { - block = this._prevBlock; - } - - // XOR blocks - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= block[i]; - } - } - - return CBC; - }()); - - /** - * Padding namespace. - */ - var C_pad = C.pad = {}; - - /** - * PKCS #5/7 padding strategy. - */ - var Pkcs7 = C_pad.Pkcs7 = { - /** - * Pads data using the algorithm defined in PKCS #5/7. - * - * @param {WordArray} data The data to pad. - * @param {number} blockSize The multiple that the data should be padded to. - * - * @static - * - * @example - * - * CryptoJS.pad.Pkcs7.pad(wordArray, 4); - */ - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - - // Create padding word - var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; - - // Create padding - var paddingWords = []; - for (var i = 0; i < nPaddingBytes; i += 4) { - paddingWords.push(paddingWord); - } - var padding = WordArray.create(paddingWords, nPaddingBytes); - - // Add padding - data.concat(padding); - }, - - /** - * Unpads data that had been padded using the algorithm defined in PKCS #5/7. - * - * @param {WordArray} data The data to unpad. - * - * @static - * - * @example - * - * CryptoJS.pad.Pkcs7.unpad(wordArray); - */ - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - /** - * Abstract base block cipher template. - * - * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) - */ - var BlockCipher = C_lib.BlockCipher = Cipher.extend({ - /** - * Configuration options. - * - * @property {Mode} mode The block mode to use. Default: CBC - * @property {Padding} padding The padding strategy to use. Default: Pkcs7 - */ - cfg: Cipher.cfg.extend({ - mode: CBC, - padding: Pkcs7 - }), - - reset: function () { - var modeCreator; - - // Reset cipher - Cipher.reset.call(this); - - // Shortcuts - var cfg = this.cfg; - var iv = cfg.iv; - var mode = cfg.mode; - - // Reset block mode - if (this._xformMode == this._ENC_XFORM_MODE) { - modeCreator = mode.createEncryptor; - } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { - modeCreator = mode.createDecryptor; - // Keep at least one block in the buffer for unpadding - this._minBufferSize = 1; - } - - if (this._mode && this._mode.__creator == modeCreator) { - this._mode.init(this, iv && iv.words); - } else { - this._mode = modeCreator.call(mode, this, iv && iv.words); - this._mode.__creator = modeCreator; - } - }, - - _doProcessBlock: function (words, offset) { - this._mode.processBlock(words, offset); - }, - - _doFinalize: function () { - var finalProcessedBlocks; - - // Shortcut - var padding = this.cfg.padding; - - // Finalize - if (this._xformMode == this._ENC_XFORM_MODE) { - // Pad data - padding.pad(this._data, this.blockSize); - - // Process final blocks - finalProcessedBlocks = this._process(!!'flush'); - } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { - // Process final blocks - finalProcessedBlocks = this._process(!!'flush'); - - // Unpad data - padding.unpad(finalProcessedBlocks); - } - - return finalProcessedBlocks; - }, - - blockSize: 128/32 - }); - - /** - * A collection of cipher parameters. - * - * @property {WordArray} ciphertext The raw ciphertext. - * @property {WordArray} key The key to this ciphertext. - * @property {WordArray} iv The IV used in the ciphering operation. - * @property {WordArray} salt The salt used with a key derivation function. - * @property {Cipher} algorithm The cipher algorithm. - * @property {Mode} mode The block mode used in the ciphering operation. - * @property {Padding} padding The padding scheme used in the ciphering operation. - * @property {number} blockSize The block size of the cipher. - * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. - */ - var CipherParams = C_lib.CipherParams = Base.extend({ - /** - * Initializes a newly created cipher params object. - * - * @param {Object} cipherParams An object with any of the possible cipher parameters. - * - * @example - * - * var cipherParams = CryptoJS.lib.CipherParams.create({ - * ciphertext: ciphertextWordArray, - * key: keyWordArray, - * iv: ivWordArray, - * salt: saltWordArray, - * algorithm: CryptoJS.algo.AES, - * mode: CryptoJS.mode.CBC, - * padding: CryptoJS.pad.PKCS7, - * blockSize: 4, - * formatter: CryptoJS.format.OpenSSL - * }); - */ - init: function (cipherParams) { - this.mixIn(cipherParams); - }, - - /** - * Converts this cipher params object to a string. - * - * @param {Format} formatter (Optional) The formatting strategy to use. - * - * @return {string} The stringified cipher params. - * - * @throws Error If neither the formatter nor the default formatter is set. - * - * @example - * - * var string = cipherParams + ''; - * var string = cipherParams.toString(); - * var string = cipherParams.toString(CryptoJS.format.OpenSSL); - */ - toString: function (formatter) { - return (formatter || this.formatter).stringify(this); - } - }); - - /** - * Format namespace. - */ - var C_format = C.format = {}; - - /** - * OpenSSL formatting strategy. - */ - var OpenSSLFormatter = C_format.OpenSSL = { - /** - * Converts a cipher params object to an OpenSSL-compatible string. - * - * @param {CipherParams} cipherParams The cipher params object. - * - * @return {string} The OpenSSL-compatible string. - * - * @static - * - * @example - * - * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); - */ - stringify: function (cipherParams) { - var wordArray; - - // Shortcuts - var ciphertext = cipherParams.ciphertext; - var salt = cipherParams.salt; - - // Format - if (salt) { - wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); - } else { - wordArray = ciphertext; - } - - return wordArray.toString(Base64); - }, - - /** - * Converts an OpenSSL-compatible string to a cipher params object. - * - * @param {string} openSSLStr The OpenSSL-compatible string. - * - * @return {CipherParams} The cipher params object. - * - * @static - * - * @example - * - * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); - */ - parse: function (openSSLStr) { - var salt; - - // Parse base64 - var ciphertext = Base64.parse(openSSLStr); - - // Shortcut - var ciphertextWords = ciphertext.words; - - // Test for salt - if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { - // Extract salt - salt = WordArray.create(ciphertextWords.slice(2, 4)); - - // Remove salt from ciphertext - ciphertextWords.splice(0, 4); - ciphertext.sigBytes -= 16; - } - - return CipherParams.create({ ciphertext: ciphertext, salt: salt }); - } - }; - - /** - * A cipher wrapper that returns ciphertext as a serializable cipher params object. - */ - var SerializableCipher = C_lib.SerializableCipher = Base.extend({ - /** - * Configuration options. - * - * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL - */ - cfg: Base.extend({ - format: OpenSSLFormatter - }), - - /** - * Encrypts a message. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {WordArray|string} message The message to encrypt. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {CipherParams} A cipher params object. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); - * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - */ - encrypt: function (cipher, message, key, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Encrypt - var encryptor = cipher.createEncryptor(key, cfg); - var ciphertext = encryptor.finalize(message); - - // Shortcut - var cipherCfg = encryptor.cfg; - - // Create and return serializable cipher params - return CipherParams.create({ - ciphertext: ciphertext, - key: key, - iv: cipherCfg.iv, - algorithm: cipher, - mode: cipherCfg.mode, - padding: cipherCfg.padding, - blockSize: cipher.blockSize, - formatter: cfg.format - }); - }, - - /** - * Decrypts serialized ciphertext. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {CipherParams|string} ciphertext The ciphertext to decrypt. - * @param {WordArray} key The key. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {WordArray} The plaintext. - * - * @static - * - * @example - * - * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); - */ - decrypt: function (cipher, ciphertext, key, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Convert string to CipherParams - ciphertext = this._parse(ciphertext, cfg.format); - - // Decrypt - var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); - - return plaintext; - }, - - /** - * Converts serialized ciphertext to CipherParams, - * else assumed CipherParams already and returns ciphertext unchanged. - * - * @param {CipherParams|string} ciphertext The ciphertext. - * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. - * - * @return {CipherParams} The unserialized ciphertext. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); - */ - _parse: function (ciphertext, format) { - if (typeof ciphertext == 'string') { - return format.parse(ciphertext, this); - } else { - return ciphertext; - } - } - }); - - /** - * Key derivation function namespace. - */ - var C_kdf = C.kdf = {}; - - /** - * OpenSSL key derivation function. - */ - var OpenSSLKdf = C_kdf.OpenSSL = { - /** - * Derives a key and IV from a password. - * - * @param {string} password The password to derive from. - * @param {number} keySize The size in words of the key to generate. - * @param {number} ivSize The size in words of the IV to generate. - * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. - * - * @return {CipherParams} A cipher params object with the key, IV, and salt. - * - * @static - * - * @example - * - * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); - * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); - */ - execute: function (password, keySize, ivSize, salt, hasher) { - // Generate random salt - if (!salt) { - salt = WordArray.random(64/8); - } - - // Derive key and IV - if (!hasher) { - var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); - } else { - var key = EvpKDF.create({ keySize: keySize + ivSize, hasher: hasher }).compute(password, salt); - } - - - // Separate key and IV - var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); - key.sigBytes = keySize * 4; - - // Return params - return CipherParams.create({ key: key, iv: iv, salt: salt }); - } - }; - - /** - * A serializable cipher wrapper that derives the key from a password, - * and returns ciphertext as a serializable cipher params object. - */ - var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ - /** - * Configuration options. - * - * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL - */ - cfg: SerializableCipher.cfg.extend({ - kdf: OpenSSLKdf - }), - - /** - * Encrypts a message using a password. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {WordArray|string} message The message to encrypt. - * @param {string} password The password. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {CipherParams} A cipher params object. - * - * @static - * - * @example - * - * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); - * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); - */ - encrypt: function (cipher, message, password, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Derive key and other params - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher); - - // Add IV to config - cfg.iv = derivedParams.iv; - - // Encrypt - var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); - - // Mix in derived params - ciphertext.mixIn(derivedParams); - - return ciphertext; - }, - - /** - * Decrypts serialized ciphertext using a password. - * - * @param {Cipher} cipher The cipher algorithm to use. - * @param {CipherParams|string} ciphertext The ciphertext to decrypt. - * @param {string} password The password. - * @param {Object} cfg (Optional) The configuration options to use for this operation. - * - * @return {WordArray} The plaintext. - * - * @static - * - * @example - * - * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); - * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); - */ - decrypt: function (cipher, ciphertext, password, cfg) { - // Apply config defaults - cfg = this.cfg.extend(cfg); - - // Convert string to CipherParams - ciphertext = this._parse(ciphertext, cfg.format); - - // Derive key and other params - var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher); - - // Add IV to config - cfg.iv = derivedParams.iv; - - // Decrypt - var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); - - return plaintext; - } - }); - }()); - - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/core.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/core.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(); - } - else {} -}(this, function () { - - /*globals window, global, require*/ - - /** - * CryptoJS core components. - */ - var CryptoJS = CryptoJS || (function (Math, undefined) { - - var crypto; - - // Native crypto from window (Browser) - if (typeof window !== 'undefined' && window.crypto) { - crypto = window.crypto; - } - - // Native crypto in web worker (Browser) - if (typeof self !== 'undefined' && self.crypto) { - crypto = self.crypto; - } - - // Native crypto from worker - if (typeof globalThis !== 'undefined' && globalThis.crypto) { - crypto = globalThis.crypto; - } - - // Native (experimental IE 11) crypto from window (Browser) - if (!crypto && typeof window !== 'undefined' && window.msCrypto) { - crypto = window.msCrypto; - } - - // Native crypto from global (NodeJS) - if (!crypto && typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.crypto) { - crypto = __webpack_require__.g.crypto; - } - - // Native crypto import via require (NodeJS) - if (!crypto && "function" === 'function') { - try { - crypto = __webpack_require__(/*! crypto */ "?9157"); - } catch (err) {} - } - - /* - * Cryptographically secure pseudorandom number generator - * - * As Math.random() is cryptographically not safe to use - */ - var cryptoSecureRandomInt = function () { - if (crypto) { - // Use getRandomValues method (Browser) - if (typeof crypto.getRandomValues === 'function') { - try { - return crypto.getRandomValues(new Uint32Array(1))[0]; - } catch (err) {} - } - - // Use randomBytes method (NodeJS) - if (typeof crypto.randomBytes === 'function') { - try { - return crypto.randomBytes(4).readInt32LE(); - } catch (err) {} - } - } - - throw new Error('Native crypto module could not be used to get secure random number.'); - }; - - /* - * Local polyfill of Object.create - - */ - var create = Object.create || (function () { - function F() {} - - return function (obj) { - var subtype; - - F.prototype = obj; - - subtype = new F(); - - F.prototype = null; - - return subtype; - }; - }()); - - /** - * CryptoJS namespace. - */ - var C = {}; - - /** - * Library namespace. - */ - var C_lib = C.lib = {}; - - /** - * Base object for prototypal inheritance. - */ - var Base = C_lib.Base = (function () { - - - return { - /** - * Creates a new object that inherits from this object. - * - * @param {Object} overrides Properties to copy into the new object. - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * field: 'value', - * - * method: function () { - * } - * }); - */ - extend: function (overrides) { - // Spawn - var subtype = create(this); - - // Augment - if (overrides) { - subtype.mixIn(overrides); - } - - // Create default initializer - if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { - subtype.init = function () { - subtype.$super.init.apply(this, arguments); - }; - } - - // Initializer's prototype is the subtype object - subtype.init.prototype = subtype; - - // Reference supertype - subtype.$super = this; - - return subtype; - }, - - /** - * Extends this object and runs the init method. - * Arguments to create() will be passed to init(). - * - * @return {Object} The new object. - * - * @static - * - * @example - * - * var instance = MyType.create(); - */ - create: function () { - var instance = this.extend(); - instance.init.apply(instance, arguments); - - return instance; - }, - - /** - * Initializes a newly created object. - * Override this method to add some logic when your objects are created. - * - * @example - * - * var MyType = CryptoJS.lib.Base.extend({ - * init: function () { - * // ... - * } - * }); - */ - init: function () { - }, - - /** - * Copies properties into this object. - * - * @param {Object} properties The properties to mix in. - * - * @example - * - * MyType.mixIn({ - * field: 'value' - * }); - */ - mixIn: function (properties) { - for (var propertyName in properties) { - if (properties.hasOwnProperty(propertyName)) { - this[propertyName] = properties[propertyName]; - } - } - - // IE won't copy toString using the loop above - if (properties.hasOwnProperty('toString')) { - this.toString = properties.toString; - } - }, - - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = instance.clone(); - */ - clone: function () { - return this.init.prototype.extend(this); - } - }; - }()); - - /** - * An array of 32-bit words. - * - * @property {Array} words The array of 32-bit words. - * @property {number} sigBytes The number of significant bytes in this word array. - */ - var WordArray = C_lib.WordArray = Base.extend({ - /** - * Initializes a newly created word array. - * - * @param {Array} words (Optional) An array of 32-bit words. - * @param {number} sigBytes (Optional) The number of significant bytes in the words. - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.create(); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); - * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); - */ - init: function (words, sigBytes) { - words = this.words = words || []; - - if (sigBytes != undefined) { - this.sigBytes = sigBytes; - } else { - this.sigBytes = words.length * 4; - } - }, - - /** - * Converts this word array to a string. - * - * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex - * - * @return {string} The stringified word array. - * - * @example - * - * var string = wordArray + ''; - * var string = wordArray.toString(); - * var string = wordArray.toString(CryptoJS.enc.Utf8); - */ - toString: function (encoder) { - return (encoder || Hex).stringify(this); - }, - - /** - * Concatenates a word array to this word array. - * - * @param {WordArray} wordArray The word array to append. - * - * @return {WordArray} This word array. - * - * @example - * - * wordArray1.concat(wordArray2); - */ - concat: function (wordArray) { - // Shortcuts - var thisWords = this.words; - var thatWords = wordArray.words; - var thisSigBytes = this.sigBytes; - var thatSigBytes = wordArray.sigBytes; - - // Clamp excess bits - this.clamp(); - - // Concat - if (thisSigBytes % 4) { - // Copy one byte at a time - for (var i = 0; i < thatSigBytes; i++) { - var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); - } - } else { - // Copy one word at a time - for (var j = 0; j < thatSigBytes; j += 4) { - thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2]; - } - } - this.sigBytes += thatSigBytes; - - // Chainable - return this; - }, - - /** - * Removes insignificant bits. - * - * @example - * - * wordArray.clamp(); - */ - clamp: function () { - // Shortcuts - var words = this.words; - var sigBytes = this.sigBytes; - - // Clamp - words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); - words.length = Math.ceil(sigBytes / 4); - }, - - /** - * Creates a copy of this word array. - * - * @return {WordArray} The clone. - * - * @example - * - * var clone = wordArray.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - clone.words = this.words.slice(0); - - return clone; - }, - - /** - * Creates a word array filled with random bytes. - * - * @param {number} nBytes The number of random bytes to generate. - * - * @return {WordArray} The random word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.lib.WordArray.random(16); - */ - random: function (nBytes) { - var words = []; - - for (var i = 0; i < nBytes; i += 4) { - words.push(cryptoSecureRandomInt()); - } - - return new WordArray.init(words, nBytes); - } - }); - - /** - * Encoder namespace. - */ - var C_enc = C.enc = {}; - - /** - * Hex encoding strategy. - */ - var Hex = C_enc.Hex = { - /** - * Converts a word array to a hex string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The hex string. - * - * @static - * - * @example - * - * var hexString = CryptoJS.enc.Hex.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var hexChars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - hexChars.push((bite >>> 4).toString(16)); - hexChars.push((bite & 0x0f).toString(16)); - } - - return hexChars.join(''); - }, - - /** - * Converts a hex string to a word array. - * - * @param {string} hexStr The hex string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Hex.parse(hexString); - */ - parse: function (hexStr) { - // Shortcut - var hexStrLength = hexStr.length; - - // Convert - var words = []; - for (var i = 0; i < hexStrLength; i += 2) { - words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); - } - - return new WordArray.init(words, hexStrLength / 2); - } - }; - - /** - * Latin1 encoding strategy. - */ - var Latin1 = C_enc.Latin1 = { - /** - * Converts a word array to a Latin1 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The Latin1 string. - * - * @static - * - * @example - * - * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var latin1Chars = []; - for (var i = 0; i < sigBytes; i++) { - var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - latin1Chars.push(String.fromCharCode(bite)); - } - - return latin1Chars.join(''); - }, - - /** - * Converts a Latin1 string to a word array. - * - * @param {string} latin1Str The Latin1 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); - */ - parse: function (latin1Str) { - // Shortcut - var latin1StrLength = latin1Str.length; - - // Convert - var words = []; - for (var i = 0; i < latin1StrLength; i++) { - words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); - } - - return new WordArray.init(words, latin1StrLength); - } - }; - - /** - * UTF-8 encoding strategy. - */ - var Utf8 = C_enc.Utf8 = { - /** - * Converts a word array to a UTF-8 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-8 string. - * - * @static - * - * @example - * - * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); - */ - stringify: function (wordArray) { - try { - return decodeURIComponent(escape(Latin1.stringify(wordArray))); - } catch (e) { - throw new Error('Malformed UTF-8 data'); - } - }, - - /** - * Converts a UTF-8 string to a word array. - * - * @param {string} utf8Str The UTF-8 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); - */ - parse: function (utf8Str) { - return Latin1.parse(unescape(encodeURIComponent(utf8Str))); - } - }; - - /** - * Abstract buffered block algorithm template. - * - * The property blockSize must be implemented in a concrete subtype. - * - * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 - */ - var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ - /** - * Resets this block algorithm's data buffer to its initial state. - * - * @example - * - * bufferedBlockAlgorithm.reset(); - */ - reset: function () { - // Initial values - this._data = new WordArray.init(); - this._nDataBytes = 0; - }, - - /** - * Adds new data to this block algorithm's buffer. - * - * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. - * - * @example - * - * bufferedBlockAlgorithm._append('data'); - * bufferedBlockAlgorithm._append(wordArray); - */ - _append: function (data) { - // Convert string to WordArray, else assume WordArray already - if (typeof data == 'string') { - data = Utf8.parse(data); - } - - // Append - this._data.concat(data); - this._nDataBytes += data.sigBytes; - }, - - /** - * Processes available data blocks. - * - * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. - * - * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. - * - * @return {WordArray} The processed data. - * - * @example - * - * var processedData = bufferedBlockAlgorithm._process(); - * var processedData = bufferedBlockAlgorithm._process(!!'flush'); - */ - _process: function (doFlush) { - var processedWords; - - // Shortcuts - var data = this._data; - var dataWords = data.words; - var dataSigBytes = data.sigBytes; - var blockSize = this.blockSize; - var blockSizeBytes = blockSize * 4; - - // Count blocks ready - var nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - // Round up to include partial blocks - nBlocksReady = Math.ceil(nBlocksReady); - } else { - // Round down to include only full blocks, - // less the number of blocks that must remain in the buffer - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } - - // Count words ready - var nWordsReady = nBlocksReady * blockSize; - - // Count bytes ready - var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); - - // Process blocks - if (nWordsReady) { - for (var offset = 0; offset < nWordsReady; offset += blockSize) { - // Perform concrete-algorithm logic - this._doProcessBlock(dataWords, offset); - } - - // Remove processed words - processedWords = dataWords.splice(0, nWordsReady); - data.sigBytes -= nBytesReady; - } - - // Return processed words - return new WordArray.init(processedWords, nBytesReady); - }, - - /** - * Creates a copy of this object. - * - * @return {Object} The clone. - * - * @example - * - * var clone = bufferedBlockAlgorithm.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - clone._data = this._data.clone(); - - return clone; - }, - - _minBufferSize: 0 - }); - - /** - * Abstract hasher template. - * - * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) - */ - var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ - /** - * Configuration options. - */ - cfg: Base.extend(), - - /** - * Initializes a newly created hasher. - * - * @param {Object} cfg (Optional) The configuration options to use for this hash computation. - * - * @example - * - * var hasher = CryptoJS.algo.SHA256.create(); - */ - init: function (cfg) { - // Apply config defaults - this.cfg = this.cfg.extend(cfg); - - // Set initial values - this.reset(); - }, - - /** - * Resets this hasher to its initial state. - * - * @example - * - * hasher.reset(); - */ - reset: function () { - // Reset data buffer - BufferedBlockAlgorithm.reset.call(this); - - // Perform concrete-hasher logic - this._doReset(); - }, - - /** - * Updates this hasher with a message. - * - * @param {WordArray|string} messageUpdate The message to append. - * - * @return {Hasher} This hasher. - * - * @example - * - * hasher.update('message'); - * hasher.update(wordArray); - */ - update: function (messageUpdate) { - // Append - this._append(messageUpdate); - - // Update the hash - this._process(); - - // Chainable - return this; - }, - - /** - * Finalizes the hash computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} messageUpdate (Optional) A final message update. - * - * @return {WordArray} The hash. - * - * @example - * - * var hash = hasher.finalize(); - * var hash = hasher.finalize('message'); - * var hash = hasher.finalize(wordArray); - */ - finalize: function (messageUpdate) { - // Final message update - if (messageUpdate) { - this._append(messageUpdate); - } - - // Perform concrete-hasher logic - var hash = this._doFinalize(); - - return hash; - }, - - blockSize: 512/32, - - /** - * Creates a shortcut function to a hasher's object interface. - * - * @param {Hasher} hasher The hasher to create a helper for. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); - */ - _createHelper: function (hasher) { - return function (message, cfg) { - return new hasher.init(cfg).finalize(message); - }; - }, - - /** - * Creates a shortcut function to the HMAC's object interface. - * - * @param {Hasher} hasher The hasher to use in this HMAC helper. - * - * @return {Function} The shortcut function. - * - * @static - * - * @example - * - * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); - */ - _createHmacHelper: function (hasher) { - return function (message, key) { - return new C_algo.HMAC.init(hasher, key).finalize(message); - }; - } - }); - - /** - * Algorithm namespace. - */ - var C_algo = C.algo = {}; - - return C; - }(Math)); - - - return CryptoJS; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/enc-base64.js": -/*!**********************************************!*\ - !*** ./node_modules/crypto-js/enc-base64.js ***! - \**********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - - /** - * Base64 encoding strategy. - */ - var Base64 = C_enc.Base64 = { - /** - * Converts a word array to a Base64 string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The Base64 string. - * - * @static - * - * @example - * - * var base64String = CryptoJS.enc.Base64.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var map = this._map; - - // Clamp excess bits - wordArray.clamp(); - - // Convert - var base64Chars = []; - for (var i = 0; i < sigBytes; i += 3) { - var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; - var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; - - var triplet = (byte1 << 16) | (byte2 << 8) | byte3; - - for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { - base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); - } - } - - // Add padding - var paddingChar = map.charAt(64); - if (paddingChar) { - while (base64Chars.length % 4) { - base64Chars.push(paddingChar); - } - } - - return base64Chars.join(''); - }, - - /** - * Converts a Base64 string to a word array. - * - * @param {string} base64Str The Base64 string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Base64.parse(base64String); - */ - parse: function (base64Str) { - // Shortcuts - var base64StrLength = base64Str.length; - var map = this._map; - var reverseMap = this._reverseMap; - - if (!reverseMap) { - reverseMap = this._reverseMap = []; - for (var j = 0; j < map.length; j++) { - reverseMap[map.charCodeAt(j)] = j; - } - } - - // Ignore padding - var paddingChar = map.charAt(64); - if (paddingChar) { - var paddingIndex = base64Str.indexOf(paddingChar); - if (paddingIndex !== -1) { - base64StrLength = paddingIndex; - } - } - - // Convert - return parseLoop(base64Str, base64StrLength, reverseMap); - - }, - - _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' - }; - - function parseLoop(base64Str, base64StrLength, reverseMap) { - var words = []; - var nBytes = 0; - for (var i = 0; i < base64StrLength; i++) { - if (i % 4) { - var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); - var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); - var bitsCombined = bits1 | bits2; - words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); - nBytes++; - } - } - return WordArray.create(words, nBytes); - } - }()); - - - return CryptoJS.enc.Base64; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/enc-base64url.js": -/*!*************************************************!*\ - !*** ./node_modules/crypto-js/enc-base64url.js ***! - \*************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - - /** - * Base64url encoding strategy. - */ - var Base64url = C_enc.Base64url = { - /** - * Converts a word array to a Base64url string. - * - * @param {WordArray} wordArray The word array. - * - * @param {boolean} urlSafe Whether to use url safe - * - * @return {string} The Base64url string. - * - * @static - * - * @example - * - * var base64String = CryptoJS.enc.Base64url.stringify(wordArray); - */ - stringify: function (wordArray, urlSafe) { - if (urlSafe === undefined) { - urlSafe = true - } - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - var map = urlSafe ? this._safe_map : this._map; - - // Clamp excess bits - wordArray.clamp(); - - // Convert - var base64Chars = []; - for (var i = 0; i < sigBytes; i += 3) { - var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; - var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; - var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; - - var triplet = (byte1 << 16) | (byte2 << 8) | byte3; - - for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { - base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); - } - } - - // Add padding - var paddingChar = map.charAt(64); - if (paddingChar) { - while (base64Chars.length % 4) { - base64Chars.push(paddingChar); - } - } - - return base64Chars.join(''); - }, - - /** - * Converts a Base64url string to a word array. - * - * @param {string} base64Str The Base64url string. - * - * @param {boolean} urlSafe Whether to use url safe - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Base64url.parse(base64String); - */ - parse: function (base64Str, urlSafe) { - if (urlSafe === undefined) { - urlSafe = true - } - - // Shortcuts - var base64StrLength = base64Str.length; - var map = urlSafe ? this._safe_map : this._map; - var reverseMap = this._reverseMap; - - if (!reverseMap) { - reverseMap = this._reverseMap = []; - for (var j = 0; j < map.length; j++) { - reverseMap[map.charCodeAt(j)] = j; - } - } - - // Ignore padding - var paddingChar = map.charAt(64); - if (paddingChar) { - var paddingIndex = base64Str.indexOf(paddingChar); - if (paddingIndex !== -1) { - base64StrLength = paddingIndex; - } - } - - // Convert - return parseLoop(base64Str, base64StrLength, reverseMap); - - }, - - _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', - _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', - }; - - function parseLoop(base64Str, base64StrLength, reverseMap) { - var words = []; - var nBytes = 0; - for (var i = 0; i < base64StrLength; i++) { - if (i % 4) { - var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); - var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); - var bitsCombined = bits1 | bits2; - words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); - nBytes++; - } - } - return WordArray.create(words, nBytes); - } - }()); - - - return CryptoJS.enc.Base64url; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/enc-utf16.js": -/*!*********************************************!*\ - !*** ./node_modules/crypto-js/enc-utf16.js ***! - \*********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_enc = C.enc; - - /** - * UTF-16 BE encoding strategy. - */ - var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { - /** - * Converts a word array to a UTF-16 BE string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-16 BE string. - * - * @static - * - * @example - * - * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var utf16Chars = []; - for (var i = 0; i < sigBytes; i += 2) { - var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; - utf16Chars.push(String.fromCharCode(codePoint)); - } - - return utf16Chars.join(''); - }, - - /** - * Converts a UTF-16 BE string to a word array. - * - * @param {string} utf16Str The UTF-16 BE string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); - */ - parse: function (utf16Str) { - // Shortcut - var utf16StrLength = utf16Str.length; - - // Convert - var words = []; - for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); - } - - return WordArray.create(words, utf16StrLength * 2); - } - }; - - /** - * UTF-16 LE encoding strategy. - */ - C_enc.Utf16LE = { - /** - * Converts a word array to a UTF-16 LE string. - * - * @param {WordArray} wordArray The word array. - * - * @return {string} The UTF-16 LE string. - * - * @static - * - * @example - * - * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); - */ - stringify: function (wordArray) { - // Shortcuts - var words = wordArray.words; - var sigBytes = wordArray.sigBytes; - - // Convert - var utf16Chars = []; - for (var i = 0; i < sigBytes; i += 2) { - var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); - utf16Chars.push(String.fromCharCode(codePoint)); - } - - return utf16Chars.join(''); - }, - - /** - * Converts a UTF-16 LE string to a word array. - * - * @param {string} utf16Str The UTF-16 LE string. - * - * @return {WordArray} The word array. - * - * @static - * - * @example - * - * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); - */ - parse: function (utf16Str) { - // Shortcut - var utf16StrLength = utf16Str.length; - - // Convert - var words = []; - for (var i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); - } - - return WordArray.create(words, utf16StrLength * 2); - } - }; - - function swapEndian(word) { - return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); - } - }()); - - - return CryptoJS.enc.Utf16; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/evpkdf.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/evpkdf.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha1 */ "./node_modules/crypto-js/sha1.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var MD5 = C_algo.MD5; - - /** - * This key derivation function is meant to conform with EVP_BytesToKey. - * www.openssl.org/docs/crypto/EVP_BytesToKey.html - */ - var EvpKDF = C_algo.EvpKDF = Base.extend({ - /** - * Configuration options. - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hash algorithm to use. Default: MD5 - * @property {number} iterations The number of iterations to perform. Default: 1 - */ - cfg: Base.extend({ - keySize: 128/32, - hasher: MD5, - iterations: 1 - }), - - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * var kdf = CryptoJS.algo.EvpKDF.create(); - * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); - * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); - */ - init: function (cfg) { - this.cfg = this.cfg.extend(cfg); - }, - - /** - * Derives a key from a password. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * var key = kdf.compute(password, salt); - */ - compute: function (password, salt) { - var block; - - // Shortcut - var cfg = this.cfg; - - // Init hasher - var hasher = cfg.hasher.create(); - - // Initial values - var derivedKey = WordArray.create(); - - // Shortcuts - var derivedKeyWords = derivedKey.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; - - // Generate key - while (derivedKeyWords.length < keySize) { - if (block) { - hasher.update(block); - } - block = hasher.update(password).finalize(salt); - hasher.reset(); - - // Iterations - for (var i = 1; i < iterations; i++) { - block = hasher.finalize(block); - hasher.reset(); - } - - derivedKey.concat(block); - } - derivedKey.sigBytes = keySize * 4; - - return derivedKey; - } - }); - - /** - * Derives a key from a password. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * @param {Object} cfg (Optional) The configuration options to use for this computation. - * - * @return {WordArray} The derived key. - * - * @static - * - * @example - * - * var key = CryptoJS.EvpKDF(password, salt); - * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); - * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); - */ - C.EvpKDF = function (password, salt, cfg) { - return EvpKDF.create(cfg).compute(password, salt); - }; - }()); - - - return CryptoJS.EvpKDF; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/format-hex.js": -/*!**********************************************!*\ - !*** ./node_modules/crypto-js/format-hex.js ***! - \**********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var CipherParams = C_lib.CipherParams; - var C_enc = C.enc; - var Hex = C_enc.Hex; - var C_format = C.format; - - var HexFormatter = C_format.Hex = { - /** - * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. - * - * @param {CipherParams} cipherParams The cipher params object. - * - * @return {string} The hexadecimally encoded string. - * - * @static - * - * @example - * - * var hexString = CryptoJS.format.Hex.stringify(cipherParams); - */ - stringify: function (cipherParams) { - return cipherParams.ciphertext.toString(Hex); - }, - - /** - * Converts a hexadecimally encoded ciphertext string to a cipher params object. - * - * @param {string} input The hexadecimally encoded string. - * - * @return {CipherParams} The cipher params object. - * - * @static - * - * @example - * - * var cipherParams = CryptoJS.format.Hex.parse(hexString); - */ - parse: function (input) { - var ciphertext = Hex.parse(input); - return CipherParams.create({ ciphertext: ciphertext }); - } - }; - }()); - - - return CryptoJS.format.Hex; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/hmac.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/hmac.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var C_enc = C.enc; - var Utf8 = C_enc.Utf8; - var C_algo = C.algo; - - /** - * HMAC algorithm. - */ - var HMAC = C_algo.HMAC = Base.extend({ - /** - * Initializes a newly created HMAC. - * - * @param {Hasher} hasher The hash algorithm to use. - * @param {WordArray|string} key The secret key. - * - * @example - * - * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); - */ - init: function (hasher, key) { - // Init hasher - hasher = this._hasher = new hasher.init(); - - // Convert string to WordArray, else assume WordArray already - if (typeof key == 'string') { - key = Utf8.parse(key); - } - - // Shortcuts - var hasherBlockSize = hasher.blockSize; - var hasherBlockSizeBytes = hasherBlockSize * 4; - - // Allow arbitrary length keys - if (key.sigBytes > hasherBlockSizeBytes) { - key = hasher.finalize(key); - } - - // Clamp excess bits - key.clamp(); - - // Clone key for inner and outer pads - var oKey = this._oKey = key.clone(); - var iKey = this._iKey = key.clone(); - - // Shortcuts - var oKeyWords = oKey.words; - var iKeyWords = iKey.words; - - // XOR keys with pad constants - for (var i = 0; i < hasherBlockSize; i++) { - oKeyWords[i] ^= 0x5c5c5c5c; - iKeyWords[i] ^= 0x36363636; - } - oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; - - // Set initial values - this.reset(); - }, - - /** - * Resets this HMAC to its initial state. - * - * @example - * - * hmacHasher.reset(); - */ - reset: function () { - // Shortcut - var hasher = this._hasher; - - // Reset - hasher.reset(); - hasher.update(this._iKey); - }, - - /** - * Updates this HMAC with a message. - * - * @param {WordArray|string} messageUpdate The message to append. - * - * @return {HMAC} This HMAC instance. - * - * @example - * - * hmacHasher.update('message'); - * hmacHasher.update(wordArray); - */ - update: function (messageUpdate) { - this._hasher.update(messageUpdate); - - // Chainable - return this; - }, - - /** - * Finalizes the HMAC computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param {WordArray|string} messageUpdate (Optional) A final message update. - * - * @return {WordArray} The HMAC. - * - * @example - * - * var hmac = hmacHasher.finalize(); - * var hmac = hmacHasher.finalize('message'); - * var hmac = hmacHasher.finalize(wordArray); - */ - finalize: function (messageUpdate) { - // Shortcut - var hasher = this._hasher; - - // Compute HMAC - var innerHash = hasher.finalize(messageUpdate); - hasher.reset(); - var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); - - return hmac; - } - }); - }()); - - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/index.js": -/*!*****************************************!*\ - !*** ./node_modules/crypto-js/index.js ***! - \*****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js"), __webpack_require__(/*! ./lib-typedarrays */ "./node_modules/crypto-js/lib-typedarrays.js"), __webpack_require__(/*! ./enc-utf16 */ "./node_modules/crypto-js/enc-utf16.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./enc-base64url */ "./node_modules/crypto-js/enc-base64url.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./sha1 */ "./node_modules/crypto-js/sha1.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js"), __webpack_require__(/*! ./sha224 */ "./node_modules/crypto-js/sha224.js"), __webpack_require__(/*! ./sha512 */ "./node_modules/crypto-js/sha512.js"), __webpack_require__(/*! ./sha384 */ "./node_modules/crypto-js/sha384.js"), __webpack_require__(/*! ./sha3 */ "./node_modules/crypto-js/sha3.js"), __webpack_require__(/*! ./ripemd160 */ "./node_modules/crypto-js/ripemd160.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js"), __webpack_require__(/*! ./pbkdf2 */ "./node_modules/crypto-js/pbkdf2.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js"), __webpack_require__(/*! ./mode-cfb */ "./node_modules/crypto-js/mode-cfb.js"), __webpack_require__(/*! ./mode-ctr */ "./node_modules/crypto-js/mode-ctr.js"), __webpack_require__(/*! ./mode-ctr-gladman */ "./node_modules/crypto-js/mode-ctr-gladman.js"), __webpack_require__(/*! ./mode-ofb */ "./node_modules/crypto-js/mode-ofb.js"), __webpack_require__(/*! ./mode-ecb */ "./node_modules/crypto-js/mode-ecb.js"), __webpack_require__(/*! ./pad-ansix923 */ "./node_modules/crypto-js/pad-ansix923.js"), __webpack_require__(/*! ./pad-iso10126 */ "./node_modules/crypto-js/pad-iso10126.js"), __webpack_require__(/*! ./pad-iso97971 */ "./node_modules/crypto-js/pad-iso97971.js"), __webpack_require__(/*! ./pad-zeropadding */ "./node_modules/crypto-js/pad-zeropadding.js"), __webpack_require__(/*! ./pad-nopadding */ "./node_modules/crypto-js/pad-nopadding.js"), __webpack_require__(/*! ./format-hex */ "./node_modules/crypto-js/format-hex.js"), __webpack_require__(/*! ./aes */ "./node_modules/crypto-js/aes.js"), __webpack_require__(/*! ./tripledes */ "./node_modules/crypto-js/tripledes.js"), __webpack_require__(/*! ./rc4 */ "./node_modules/crypto-js/rc4.js"), __webpack_require__(/*! ./rabbit */ "./node_modules/crypto-js/rabbit.js"), __webpack_require__(/*! ./rabbit-legacy */ "./node_modules/crypto-js/rabbit-legacy.js"), __webpack_require__(/*! ./blowfish */ "./node_modules/crypto-js/blowfish.js")); - } - else {} -}(this, function (CryptoJS) { - - return CryptoJS; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/lib-typedarrays.js": -/*!***************************************************!*\ - !*** ./node_modules/crypto-js/lib-typedarrays.js ***! - \***************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Check if typed arrays are supported - if (typeof ArrayBuffer != 'function') { - return; - } - - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - - // Reference original init - var superInit = WordArray.init; - - // Augment WordArray.init to handle typed arrays - var subInit = WordArray.init = function (typedArray) { - // Convert buffers to uint8 - if (typedArray instanceof ArrayBuffer) { - typedArray = new Uint8Array(typedArray); - } - - // Convert other array views to uint8 - if ( - typedArray instanceof Int8Array || - (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || - typedArray instanceof Int16Array || - typedArray instanceof Uint16Array || - typedArray instanceof Int32Array || - typedArray instanceof Uint32Array || - typedArray instanceof Float32Array || - typedArray instanceof Float64Array - ) { - typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); - } - - // Handle Uint8Array - if (typedArray instanceof Uint8Array) { - // Shortcut - var typedArrayByteLength = typedArray.byteLength; - - // Extract bytes - var words = []; - for (var i = 0; i < typedArrayByteLength; i++) { - words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); - } - - // Initialize this word array - superInit.call(this, words, typedArrayByteLength); - } else { - // Else call normal init - superInit.apply(this, arguments); - } - }; - - subInit.prototype = WordArray; - }()); - - - return CryptoJS.lib.WordArray; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/md5.js": -/*!***************************************!*\ - !*** ./node_modules/crypto-js/md5.js ***! - \***************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Constants table - var T = []; - - // Compute constants - (function () { - for (var i = 0; i < 64; i++) { - T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; - } - }()); - - /** - * MD5 hash algorithm. - */ - var MD5 = C_algo.MD5 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0x67452301, 0xefcdab89, - 0x98badcfe, 0x10325476 - ]); - }, - - _doProcessBlock: function (M, offset) { - // Swap endian - for (var i = 0; i < 16; i++) { - // Shortcuts - var offset_i = offset + i; - var M_offset_i = M[offset_i]; - - M[offset_i] = ( - (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | - (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) - ); - } - - // Shortcuts - var H = this._hash.words; - - var M_offset_0 = M[offset + 0]; - var M_offset_1 = M[offset + 1]; - var M_offset_2 = M[offset + 2]; - var M_offset_3 = M[offset + 3]; - var M_offset_4 = M[offset + 4]; - var M_offset_5 = M[offset + 5]; - var M_offset_6 = M[offset + 6]; - var M_offset_7 = M[offset + 7]; - var M_offset_8 = M[offset + 8]; - var M_offset_9 = M[offset + 9]; - var M_offset_10 = M[offset + 10]; - var M_offset_11 = M[offset + 11]; - var M_offset_12 = M[offset + 12]; - var M_offset_13 = M[offset + 13]; - var M_offset_14 = M[offset + 14]; - var M_offset_15 = M[offset + 15]; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - - // Computation - a = FF(a, b, c, d, M_offset_0, 7, T[0]); - d = FF(d, a, b, c, M_offset_1, 12, T[1]); - c = FF(c, d, a, b, M_offset_2, 17, T[2]); - b = FF(b, c, d, a, M_offset_3, 22, T[3]); - a = FF(a, b, c, d, M_offset_4, 7, T[4]); - d = FF(d, a, b, c, M_offset_5, 12, T[5]); - c = FF(c, d, a, b, M_offset_6, 17, T[6]); - b = FF(b, c, d, a, M_offset_7, 22, T[7]); - a = FF(a, b, c, d, M_offset_8, 7, T[8]); - d = FF(d, a, b, c, M_offset_9, 12, T[9]); - c = FF(c, d, a, b, M_offset_10, 17, T[10]); - b = FF(b, c, d, a, M_offset_11, 22, T[11]); - a = FF(a, b, c, d, M_offset_12, 7, T[12]); - d = FF(d, a, b, c, M_offset_13, 12, T[13]); - c = FF(c, d, a, b, M_offset_14, 17, T[14]); - b = FF(b, c, d, a, M_offset_15, 22, T[15]); - - a = GG(a, b, c, d, M_offset_1, 5, T[16]); - d = GG(d, a, b, c, M_offset_6, 9, T[17]); - c = GG(c, d, a, b, M_offset_11, 14, T[18]); - b = GG(b, c, d, a, M_offset_0, 20, T[19]); - a = GG(a, b, c, d, M_offset_5, 5, T[20]); - d = GG(d, a, b, c, M_offset_10, 9, T[21]); - c = GG(c, d, a, b, M_offset_15, 14, T[22]); - b = GG(b, c, d, a, M_offset_4, 20, T[23]); - a = GG(a, b, c, d, M_offset_9, 5, T[24]); - d = GG(d, a, b, c, M_offset_14, 9, T[25]); - c = GG(c, d, a, b, M_offset_3, 14, T[26]); - b = GG(b, c, d, a, M_offset_8, 20, T[27]); - a = GG(a, b, c, d, M_offset_13, 5, T[28]); - d = GG(d, a, b, c, M_offset_2, 9, T[29]); - c = GG(c, d, a, b, M_offset_7, 14, T[30]); - b = GG(b, c, d, a, M_offset_12, 20, T[31]); - - a = HH(a, b, c, d, M_offset_5, 4, T[32]); - d = HH(d, a, b, c, M_offset_8, 11, T[33]); - c = HH(c, d, a, b, M_offset_11, 16, T[34]); - b = HH(b, c, d, a, M_offset_14, 23, T[35]); - a = HH(a, b, c, d, M_offset_1, 4, T[36]); - d = HH(d, a, b, c, M_offset_4, 11, T[37]); - c = HH(c, d, a, b, M_offset_7, 16, T[38]); - b = HH(b, c, d, a, M_offset_10, 23, T[39]); - a = HH(a, b, c, d, M_offset_13, 4, T[40]); - d = HH(d, a, b, c, M_offset_0, 11, T[41]); - c = HH(c, d, a, b, M_offset_3, 16, T[42]); - b = HH(b, c, d, a, M_offset_6, 23, T[43]); - a = HH(a, b, c, d, M_offset_9, 4, T[44]); - d = HH(d, a, b, c, M_offset_12, 11, T[45]); - c = HH(c, d, a, b, M_offset_15, 16, T[46]); - b = HH(b, c, d, a, M_offset_2, 23, T[47]); - - a = II(a, b, c, d, M_offset_0, 6, T[48]); - d = II(d, a, b, c, M_offset_7, 10, T[49]); - c = II(c, d, a, b, M_offset_14, 15, T[50]); - b = II(b, c, d, a, M_offset_5, 21, T[51]); - a = II(a, b, c, d, M_offset_12, 6, T[52]); - d = II(d, a, b, c, M_offset_3, 10, T[53]); - c = II(c, d, a, b, M_offset_10, 15, T[54]); - b = II(b, c, d, a, M_offset_1, 21, T[55]); - a = II(a, b, c, d, M_offset_8, 6, T[56]); - d = II(d, a, b, c, M_offset_15, 10, T[57]); - c = II(c, d, a, b, M_offset_6, 15, T[58]); - b = II(b, c, d, a, M_offset_13, 21, T[59]); - a = II(a, b, c, d, M_offset_4, 6, T[60]); - d = II(d, a, b, c, M_offset_11, 10, T[61]); - c = II(c, d, a, b, M_offset_2, 15, T[62]); - b = II(b, c, d, a, M_offset_9, 21, T[63]); - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - - var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); - var nBitsTotalL = nBitsTotal; - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( - (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | - (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) - ); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( - (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | - (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) - ); - - data.sigBytes = (dataWords.length + 1) * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var hash = this._hash; - var H = hash.words; - - // Swap endian - for (var i = 0; i < 4; i++) { - // Shortcut - var H_i = H[i]; - - H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | - (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); - } - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - function FF(a, b, c, d, x, s, t) { - var n = a + ((b & c) | (~b & d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function GG(a, b, c, d, x, s, t) { - var n = a + ((b & d) | (c & ~d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function HH(a, b, c, d, x, s, t) { - var n = a + (b ^ c ^ d) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - function II(a, b, c, d, x, s, t) { - var n = a + (c ^ (b | ~d)) + x + t; - return ((n << s) | (n >>> (32 - s))) + b; - } - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.MD5('message'); - * var hash = CryptoJS.MD5(wordArray); - */ - C.MD5 = Hasher._createHelper(MD5); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacMD5(message, key); - */ - C.HmacMD5 = Hasher._createHmacHelper(MD5); - }(Math)); - - - return CryptoJS.MD5; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-cfb.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-cfb.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Cipher Feedback block mode. - */ - CryptoJS.mode.CFB = (function () { - var CFB = CryptoJS.lib.BlockCipherMode.extend(); - - CFB.Encryptor = CFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - - // Remember this block to use with next block - this._prevBlock = words.slice(offset, offset + blockSize); - } - }); - - CFB.Decryptor = CFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher; - var blockSize = cipher.blockSize; - - // Remember this block to use with next block - var thisBlock = words.slice(offset, offset + blockSize); - - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - - // This block becomes the previous block - this._prevBlock = thisBlock; - } - }); - - function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { - var keystream; - - // Shortcut - var iv = this._iv; - - // Generate keystream - if (iv) { - keystream = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } else { - keystream = this._prevBlock; - } - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - - return CFB; - }()); - - - return CryptoJS.mode.CFB; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ctr-gladman.js": -/*!****************************************************!*\ - !*** ./node_modules/crypto-js/mode-ctr-gladman.js ***! - \****************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** @preserve - * Counter block mode compatible with Dr Brian Gladman fileenc.c - * derived from CryptoJS.mode.CTR - * Jan Hruby jhruby.web@gmail.com - */ - CryptoJS.mode.CTRGladman = (function () { - var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); - - function incWord(word) - { - if (((word >> 24) & 0xff) === 0xff) { //overflow - var b1 = (word >> 16)&0xff; - var b2 = (word >> 8)&0xff; - var b3 = word & 0xff; - - if (b1 === 0xff) // overflow b1 - { - b1 = 0; - if (b2 === 0xff) - { - b2 = 0; - if (b3 === 0xff) - { - b3 = 0; - } - else - { - ++b3; - } - } - else - { - ++b2; - } - } - else - { - ++b1; - } - - word = 0; - word += (b1 << 16); - word += (b2 << 8); - word += b3; - } - else - { - word += (0x01 << 24); - } - return word; - } - - function incCounter(counter) - { - if ((counter[0] = incWord(counter[0])) === 0) - { - // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 - counter[1] = incWord(counter[1]); - } - return counter; - } - - var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; - - // Generate keystream - if (iv) { - counter = this._counter = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - - incCounter(counter); - - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - CTRGladman.Decryptor = Encryptor; - - return CTRGladman; - }()); - - - - - return CryptoJS.mode.CTRGladman; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ctr.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-ctr.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Counter block mode. - */ - CryptoJS.mode.CTR = (function () { - var CTR = CryptoJS.lib.BlockCipherMode.extend(); - - var Encryptor = CTR.Encryptor = CTR.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var counter = this._counter; - - // Generate keystream - if (iv) { - counter = this._counter = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - var keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - - // Increment counter - counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - CTR.Decryptor = Encryptor; - - return CTR; - }()); - - - return CryptoJS.mode.CTR; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ecb.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-ecb.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Electronic Codebook block mode. - */ - CryptoJS.mode.ECB = (function () { - var ECB = CryptoJS.lib.BlockCipherMode.extend(); - - ECB.Encryptor = ECB.extend({ - processBlock: function (words, offset) { - this._cipher.encryptBlock(words, offset); - } - }); - - ECB.Decryptor = ECB.extend({ - processBlock: function (words, offset) { - this._cipher.decryptBlock(words, offset); - } - }); - - return ECB; - }()); - - - return CryptoJS.mode.ECB; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/mode-ofb.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/mode-ofb.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Output Feedback block mode. - */ - CryptoJS.mode.OFB = (function () { - var OFB = CryptoJS.lib.BlockCipherMode.extend(); - - var Encryptor = OFB.Encryptor = OFB.extend({ - processBlock: function (words, offset) { - // Shortcuts - var cipher = this._cipher - var blockSize = cipher.blockSize; - var iv = this._iv; - var keystream = this._keystream; - - // Generate keystream - if (iv) { - keystream = this._keystream = iv.slice(0); - - // Remove IV for subsequent blocks - this._iv = undefined; - } - cipher.encryptBlock(keystream, 0); - - // Encrypt - for (var i = 0; i < blockSize; i++) { - words[offset + i] ^= keystream[i]; - } - } - }); - - OFB.Decryptor = Encryptor; - - return OFB; - }()); - - - return CryptoJS.mode.OFB; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-ansix923.js": -/*!************************************************!*\ - !*** ./node_modules/crypto-js/pad-ansix923.js ***! - \************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * ANSI X.923 padding strategy. - */ - CryptoJS.pad.AnsiX923 = { - pad: function (data, blockSize) { - // Shortcuts - var dataSigBytes = data.sigBytes; - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; - - // Compute last byte position - var lastBytePos = dataSigBytes + nPaddingBytes - 1; - - // Pad - data.clamp(); - data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); - data.sigBytes += nPaddingBytes; - }, - - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - - return CryptoJS.pad.Ansix923; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-iso10126.js": -/*!************************************************!*\ - !*** ./node_modules/crypto-js/pad-iso10126.js ***! - \************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * ISO 10126 padding strategy. - */ - CryptoJS.pad.Iso10126 = { - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Count padding bytes - var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - - // Pad - data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). - concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); - }, - - unpad: function (data) { - // Get number of padding bytes from last byte - var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; - - // Remove padding - data.sigBytes -= nPaddingBytes; - } - }; - - - return CryptoJS.pad.Iso10126; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-iso97971.js": -/*!************************************************!*\ - !*** ./node_modules/crypto-js/pad-iso97971.js ***! - \************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * ISO/IEC 9797-1 Padding Method 2. - */ - CryptoJS.pad.Iso97971 = { - pad: function (data, blockSize) { - // Add 0x80 byte - data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); - - // Zero pad the rest - CryptoJS.pad.ZeroPadding.pad(data, blockSize); - }, - - unpad: function (data) { - // Remove zero padding - CryptoJS.pad.ZeroPadding.unpad(data); - - // Remove one more byte -- the 0x80 byte - data.sigBytes--; - } - }; - - - return CryptoJS.pad.Iso97971; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-nopadding.js": -/*!*************************************************!*\ - !*** ./node_modules/crypto-js/pad-nopadding.js ***! - \*************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * A noop padding strategy. - */ - CryptoJS.pad.NoPadding = { - pad: function () { - }, - - unpad: function () { - } - }; - - - return CryptoJS.pad.NoPadding; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pad-zeropadding.js": -/*!***************************************************!*\ - !*** ./node_modules/crypto-js/pad-zeropadding.js ***! - \***************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** - * Zero padding strategy. - */ - CryptoJS.pad.ZeroPadding = { - pad: function (data, blockSize) { - // Shortcut - var blockSizeBytes = blockSize * 4; - - // Pad - data.clamp(); - data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); - }, - - unpad: function (data) { - // Shortcut - var dataWords = data.words; - - // Unpad - var i = data.sigBytes - 1; - for (var i = data.sigBytes - 1; i >= 0; i--) { - if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { - data.sigBytes = i + 1; - break; - } - } - } - }; - - - return CryptoJS.pad.ZeroPadding; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/pbkdf2.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/pbkdf2.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js"), __webpack_require__(/*! ./hmac */ "./node_modules/crypto-js/hmac.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA256 = C_algo.SHA256; - var HMAC = C_algo.HMAC; - - /** - * Password-Based Key Derivation Function 2 algorithm. - */ - var PBKDF2 = C_algo.PBKDF2 = Base.extend({ - /** - * Configuration options. - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hasher to use. Default: SHA256 - * @property {number} iterations The number of iterations to perform. Default: 250000 - */ - cfg: Base.extend({ - keySize: 128/32, - hasher: SHA256, - iterations: 250000 - }), - - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * var kdf = CryptoJS.algo.PBKDF2.create(); - * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); - * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); - */ - init: function (cfg) { - this.cfg = this.cfg.extend(cfg); - }, - - /** - * Computes the Password-Based Key Derivation Function 2. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * var key = kdf.compute(password, salt); - */ - compute: function (password, salt) { - // Shortcut - var cfg = this.cfg; - - // Init HMAC - var hmac = HMAC.create(cfg.hasher, password); - - // Initial values - var derivedKey = WordArray.create(); - var blockIndex = WordArray.create([0x00000001]); - - // Shortcuts - var derivedKeyWords = derivedKey.words; - var blockIndexWords = blockIndex.words; - var keySize = cfg.keySize; - var iterations = cfg.iterations; - - // Generate key - while (derivedKeyWords.length < keySize) { - var block = hmac.update(salt).finalize(blockIndex); - hmac.reset(); - - // Shortcuts - var blockWords = block.words; - var blockWordsLength = blockWords.length; - - // Iterations - var intermediate = block; - for (var i = 1; i < iterations; i++) { - intermediate = hmac.finalize(intermediate); - hmac.reset(); - - // Shortcut - var intermediateWords = intermediate.words; - - // XOR intermediate with block - for (var j = 0; j < blockWordsLength; j++) { - blockWords[j] ^= intermediateWords[j]; - } - } - - derivedKey.concat(block); - blockIndexWords[0]++; - } - derivedKey.sigBytes = keySize * 4; - - return derivedKey; - } - }); - - /** - * Computes the Password-Based Key Derivation Function 2. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * @param {Object} cfg (Optional) The configuration options to use for this computation. - * - * @return {WordArray} The derived key. - * - * @static - * - * @example - * - * var key = CryptoJS.PBKDF2(password, salt); - * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); - * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); - */ - C.PBKDF2 = function (password, salt, cfg) { - return PBKDF2.create(cfg).compute(password, salt); - }; - }()); - - - return CryptoJS.PBKDF2; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/rabbit-legacy.js": -/*!*************************************************!*\ - !*** ./node_modules/crypto-js/rabbit-legacy.js ***! - \*************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - // Reusable objects - var S = []; - var C_ = []; - var G = []; - - /** - * Rabbit stream cipher algorithm. - * - * This is a legacy version that neglected to convert the key to little-endian. - * This error doesn't affect the cipher's security, - * but it does affect its compatibility with other implementations. - */ - var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var K = this._key.words; - var iv = this.cfg.iv; - - // Generate initial state values - var X = this._X = [ - K[0], (K[3] << 16) | (K[2] >>> 16), - K[1], (K[0] << 16) | (K[3] >>> 16), - K[2], (K[1] << 16) | (K[0] >>> 16), - K[3], (K[2] << 16) | (K[1] >>> 16) - ]; - - // Generate initial counter values - var C = this._C = [ - (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), - (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), - (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), - (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) - ]; - - // Carry bit - this._b = 0; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - - // Modify the counters - for (var i = 0; i < 8; i++) { - C[i] ^= X[(i + 4) & 7]; - } - - // IV setup - if (iv) { - // Shortcuts - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; - - // Generate four subvectors - var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); - var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); - var i1 = (i0 >>> 16) | (i2 & 0xffff0000); - var i3 = (i2 << 16) | (i0 & 0x0000ffff); - - // Modify counter values - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - } - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var X = this._X; - - // Iterate the system - nextState.call(this); - - // Generate four keystream words - S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); - S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); - S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); - S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); - - for (var i = 0; i < 4; i++) { - // Swap endian - S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | - (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); - - // Encrypt - M[offset + i] ^= S[i]; - } - }, - - blockSize: 128/32, - - ivSize: 64/32 - }); - - function nextState() { - // Shortcuts - var X = this._X; - var C = this._C; - - // Save old counter values - for (var i = 0; i < 8; i++) { - C_[i] = C[i]; - } - - // Calculate new counter values - C[0] = (C[0] + 0x4d34d34d + this._b) | 0; - C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; - C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; - C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; - C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; - C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; - C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; - C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; - this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; - - // Calculate the g-values - for (var i = 0; i < 8; i++) { - var gx = X[i] + C[i]; - - // Construct high and low argument for squaring - var ga = gx & 0xffff; - var gb = gx >>> 16; - - // Calculate high and low result of squaring - var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; - var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); - - // High XOR low - G[i] = gh ^ gl; - } - - // Calculate new state values - X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; - X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; - X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; - X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; - X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; - X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; - X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; - X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); - */ - C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); - }()); - - - return CryptoJS.RabbitLegacy; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/rabbit.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/rabbit.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - // Reusable objects - var S = []; - var C_ = []; - var G = []; - - /** - * Rabbit stream cipher algorithm - */ - var Rabbit = C_algo.Rabbit = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var K = this._key.words; - var iv = this.cfg.iv; - - // Swap endian - for (var i = 0; i < 4; i++) { - K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | - (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); - } - - // Generate initial state values - var X = this._X = [ - K[0], (K[3] << 16) | (K[2] >>> 16), - K[1], (K[0] << 16) | (K[3] >>> 16), - K[2], (K[1] << 16) | (K[0] >>> 16), - K[3], (K[2] << 16) | (K[1] >>> 16) - ]; - - // Generate initial counter values - var C = this._C = [ - (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), - (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), - (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), - (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) - ]; - - // Carry bit - this._b = 0; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - - // Modify the counters - for (var i = 0; i < 8; i++) { - C[i] ^= X[(i + 4) & 7]; - } - - // IV setup - if (iv) { - // Shortcuts - var IV = iv.words; - var IV_0 = IV[0]; - var IV_1 = IV[1]; - - // Generate four subvectors - var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); - var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); - var i1 = (i0 >>> 16) | (i2 & 0xffff0000); - var i3 = (i2 << 16) | (i0 & 0x0000ffff); - - // Modify counter values - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; - - // Iterate the system four times - for (var i = 0; i < 4; i++) { - nextState.call(this); - } - } - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var X = this._X; - - // Iterate the system - nextState.call(this); - - // Generate four keystream words - S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); - S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); - S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); - S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); - - for (var i = 0; i < 4; i++) { - // Swap endian - S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | - (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); - - // Encrypt - M[offset + i] ^= S[i]; - } - }, - - blockSize: 128/32, - - ivSize: 64/32 - }); - - function nextState() { - // Shortcuts - var X = this._X; - var C = this._C; - - // Save old counter values - for (var i = 0; i < 8; i++) { - C_[i] = C[i]; - } - - // Calculate new counter values - C[0] = (C[0] + 0x4d34d34d + this._b) | 0; - C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; - C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; - C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; - C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; - C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; - C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; - C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; - this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; - - // Calculate the g-values - for (var i = 0; i < 8; i++) { - var gx = X[i] + C[i]; - - // Construct high and low argument for squaring - var ga = gx & 0xffff; - var gb = gx >>> 16; - - // Calculate high and low result of squaring - var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; - var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); - - // High XOR low - G[i] = gh ^ gl; - } - - // Calculate new state values - X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; - X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; - X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; - X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; - X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; - X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; - X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; - X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); - * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); - */ - C.Rabbit = StreamCipher._createHelper(Rabbit); - }()); - - - return CryptoJS.Rabbit; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/rc4.js": -/*!***************************************!*\ - !*** ./node_modules/crypto-js/rc4.js ***! - \***************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var StreamCipher = C_lib.StreamCipher; - var C_algo = C.algo; - - /** - * RC4 stream cipher algorithm. - */ - var RC4 = C_algo.RC4 = StreamCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - var keySigBytes = key.sigBytes; - - // Init sbox - var S = this._S = []; - for (var i = 0; i < 256; i++) { - S[i] = i; - } - - // Key setup - for (var i = 0, j = 0; i < 256; i++) { - var keyByteIndex = i % keySigBytes; - var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; - - j = (j + S[i] + keyByte) % 256; - - // Swap - var t = S[i]; - S[i] = S[j]; - S[j] = t; - } - - // Counters - this._i = this._j = 0; - }, - - _doProcessBlock: function (M, offset) { - M[offset] ^= generateKeystreamWord.call(this); - }, - - keySize: 256/32, - - ivSize: 0 - }); - - function generateKeystreamWord() { - // Shortcuts - var S = this._S; - var i = this._i; - var j = this._j; - - // Generate keystream word - var keystreamWord = 0; - for (var n = 0; n < 4; n++) { - i = (i + 1) % 256; - j = (j + S[i]) % 256; - - // Swap - var t = S[i]; - S[i] = S[j]; - S[j] = t; - - keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); - } - - // Update counters - this._i = i; - this._j = j; - - return keystreamWord; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); - */ - C.RC4 = StreamCipher._createHelper(RC4); - - /** - * Modified RC4 stream cipher algorithm. - */ - var RC4Drop = C_algo.RC4Drop = RC4.extend({ - /** - * Configuration options. - * - * @property {number} drop The number of keystream words to drop. Default 192 - */ - cfg: RC4.cfg.extend({ - drop: 192 - }), - - _doReset: function () { - RC4._doReset.call(this); - - // Drop - for (var i = this.cfg.drop; i > 0; i--) { - generateKeystreamWord.call(this); - } - } - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); - * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); - */ - C.RC4Drop = StreamCipher._createHelper(RC4Drop); - }()); - - - return CryptoJS.RC4; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/ripemd160.js": -/*!*********************************************!*\ - !*** ./node_modules/crypto-js/ripemd160.js ***! - \*********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - /** @preserve - (c) 2012 by Cédric Mesnil. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Constants table - var _zl = WordArray.create([ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, - 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, - 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, - 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); - var _zr = WordArray.create([ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, - 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, - 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, - 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, - 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); - var _sl = WordArray.create([ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, - 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, - 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, - 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, - 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); - var _sr = WordArray.create([ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, - 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, - 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, - 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, - 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); - - var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); - var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); - - /** - * RIPEMD160 hash algorithm. - */ - var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ - _doReset: function () { - this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); - }, - - _doProcessBlock: function (M, offset) { - - // Swap endian - for (var i = 0; i < 16; i++) { - // Shortcuts - var offset_i = offset + i; - var M_offset_i = M[offset_i]; - - // Swap - M[offset_i] = ( - (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | - (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) - ); - } - // Shortcut - var H = this._hash.words; - var hl = _hl.words; - var hr = _hr.words; - var zl = _zl.words; - var zr = _zr.words; - var sl = _sl.words; - var sr = _sr.words; - - // Working variables - var al, bl, cl, dl, el; - var ar, br, cr, dr, er; - - ar = al = H[0]; - br = bl = H[1]; - cr = cl = H[2]; - dr = dl = H[3]; - er = el = H[4]; - // Computation - var t; - for (var i = 0; i < 80; i += 1) { - t = (al + M[offset+zl[i]])|0; - if (i<16){ - t += f1(bl,cl,dl) + hl[0]; - } else if (i<32) { - t += f2(bl,cl,dl) + hl[1]; - } else if (i<48) { - t += f3(bl,cl,dl) + hl[2]; - } else if (i<64) { - t += f4(bl,cl,dl) + hl[3]; - } else {// if (i<80) { - t += f5(bl,cl,dl) + hl[4]; - } - t = t|0; - t = rotl(t,sl[i]); - t = (t+el)|0; - al = el; - el = dl; - dl = rotl(cl, 10); - cl = bl; - bl = t; - - t = (ar + M[offset+zr[i]])|0; - if (i<16){ - t += f5(br,cr,dr) + hr[0]; - } else if (i<32) { - t += f4(br,cr,dr) + hr[1]; - } else if (i<48) { - t += f3(br,cr,dr) + hr[2]; - } else if (i<64) { - t += f2(br,cr,dr) + hr[3]; - } else {// if (i<80) { - t += f1(br,cr,dr) + hr[4]; - } - t = t|0; - t = rotl(t,sr[i]) ; - t = (t+er)|0; - ar = er; - er = dr; - dr = rotl(cr, 10); - cr = br; - br = t; - } - // Intermediate hash value - t = (H[1] + cl + dr)|0; - H[1] = (H[2] + dl + er)|0; - H[2] = (H[3] + el + ar)|0; - H[3] = (H[4] + al + br)|0; - H[4] = (H[0] + bl + cr)|0; - H[0] = t; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( - (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | - (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) - ); - data.sigBytes = (dataWords.length + 1) * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var hash = this._hash; - var H = hash.words; - - // Swap endian - for (var i = 0; i < 5; i++) { - // Shortcut - var H_i = H[i]; - - // Swap - H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | - (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); - } - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - - function f1(x, y, z) { - return ((x) ^ (y) ^ (z)); - - } - - function f2(x, y, z) { - return (((x)&(y)) | ((~x)&(z))); - } - - function f3(x, y, z) { - return (((x) | (~(y))) ^ (z)); - } - - function f4(x, y, z) { - return (((x) & (z)) | ((y)&(~(z)))); - } - - function f5(x, y, z) { - return ((x) ^ ((y) |(~(z)))); - - } - - function rotl(x,n) { - return (x<>>(32-n)); - } - - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.RIPEMD160('message'); - * var hash = CryptoJS.RIPEMD160(wordArray); - */ - C.RIPEMD160 = Hasher._createHelper(RIPEMD160); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacRIPEMD160(message, key); - */ - C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); - }(Math)); - - - return CryptoJS.RIPEMD160; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha1.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/sha1.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Reusable object - var W = []; - - /** - * SHA-1 hash algorithm. - */ - var SHA1 = C_algo.SHA1 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0x67452301, 0xefcdab89, - 0x98badcfe, 0x10325476, - 0xc3d2e1f0 - ]); - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var H = this._hash.words; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - - // Computation - for (var i = 0; i < 80; i++) { - if (i < 16) { - W[i] = M[offset + i] | 0; - } else { - var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; - W[i] = (n << 1) | (n >>> 31); - } - - var t = ((a << 5) | (a >>> 27)) + e + W[i]; - if (i < 20) { - t += ((b & c) | (~b & d)) + 0x5a827999; - } else if (i < 40) { - t += (b ^ c ^ d) + 0x6ed9eba1; - } else if (i < 60) { - t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; - } else /* if (i < 80) */ { - t += (b ^ c ^ d) - 0x359d3e2a; - } - - e = d; - d = c; - c = (b << 30) | (b >>> 2); - b = a; - a = t; - } - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - H[4] = (H[4] + e) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Return final computed hash - return this._hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA1('message'); - * var hash = CryptoJS.SHA1(wordArray); - */ - C.SHA1 = Hasher._createHelper(SHA1); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA1(message, key); - */ - C.HmacSHA1 = Hasher._createHmacHelper(SHA1); - }()); - - - return CryptoJS.SHA1; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha224.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha224.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./sha256 */ "./node_modules/crypto-js/sha256.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var C_algo = C.algo; - var SHA256 = C_algo.SHA256; - - /** - * SHA-224 hash algorithm. - */ - var SHA224 = C_algo.SHA224 = SHA256.extend({ - _doReset: function () { - this._hash = new WordArray.init([ - 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, - 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 - ]); - }, - - _doFinalize: function () { - var hash = SHA256._doFinalize.call(this); - - hash.sigBytes -= 4; - - return hash; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA224('message'); - * var hash = CryptoJS.SHA224(wordArray); - */ - C.SHA224 = SHA256._createHelper(SHA224); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA224(message, key); - */ - C.HmacSHA224 = SHA256._createHmacHelper(SHA224); - }()); - - - return CryptoJS.SHA224; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha256.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha256.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_algo = C.algo; - - // Initialization and round constants tables - var H = []; - var K = []; - - // Compute constants - (function () { - function isPrime(n) { - var sqrtN = Math.sqrt(n); - for (var factor = 2; factor <= sqrtN; factor++) { - if (!(n % factor)) { - return false; - } - } - - return true; - } - - function getFractionalBits(n) { - return ((n - (n | 0)) * 0x100000000) | 0; - } - - var n = 2; - var nPrime = 0; - while (nPrime < 64) { - if (isPrime(n)) { - if (nPrime < 8) { - H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); - } - K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); - - nPrime++; - } - - n++; - } - }()); - - // Reusable object - var W = []; - - /** - * SHA-256 hash algorithm. - */ - var SHA256 = C_algo.SHA256 = Hasher.extend({ - _doReset: function () { - this._hash = new WordArray.init(H.slice(0)); - }, - - _doProcessBlock: function (M, offset) { - // Shortcut - var H = this._hash.words; - - // Working variables - var a = H[0]; - var b = H[1]; - var c = H[2]; - var d = H[3]; - var e = H[4]; - var f = H[5]; - var g = H[6]; - var h = H[7]; - - // Computation - for (var i = 0; i < 64; i++) { - if (i < 16) { - W[i] = M[offset + i] | 0; - } else { - var gamma0x = W[i - 15]; - var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ - ((gamma0x << 14) | (gamma0x >>> 18)) ^ - (gamma0x >>> 3); - - var gamma1x = W[i - 2]; - var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ - ((gamma1x << 13) | (gamma1x >>> 19)) ^ - (gamma1x >>> 10); - - W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; - } - - var ch = (e & f) ^ (~e & g); - var maj = (a & b) ^ (a & c) ^ (b & c); - - var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); - var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); - - var t1 = h + sigma1 + ch + K[i] + W[i]; - var t2 = sigma0 + maj; - - h = g; - g = f; - f = e; - e = (d + t1) | 0; - d = c; - c = b; - b = a; - a = (t1 + t2) | 0; - } - - // Intermediate hash value - H[0] = (H[0] + a) | 0; - H[1] = (H[1] + b) | 0; - H[2] = (H[2] + c) | 0; - H[3] = (H[3] + d) | 0; - H[4] = (H[4] + e) | 0; - H[5] = (H[5] + f) | 0; - H[6] = (H[6] + g) | 0; - H[7] = (H[7] + h) | 0; - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Return final computed hash - return this._hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA256('message'); - * var hash = CryptoJS.SHA256(wordArray); - */ - C.SHA256 = Hasher._createHelper(SHA256); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA256(message, key); - */ - C.HmacSHA256 = Hasher._createHmacHelper(SHA256); - }(Math)); - - - return CryptoJS.SHA256; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha3.js": -/*!****************************************!*\ - !*** ./node_modules/crypto-js/sha3.js ***! - \****************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (Math) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var C_algo = C.algo; - - // Constants tables - var RHO_OFFSETS = []; - var PI_INDEXES = []; - var ROUND_CONSTANTS = []; - - // Compute Constants - (function () { - // Compute rho offset constants - var x = 1, y = 0; - for (var t = 0; t < 24; t++) { - RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; - - var newX = y % 5; - var newY = (2 * x + 3 * y) % 5; - x = newX; - y = newY; - } - - // Compute pi index constants - for (var x = 0; x < 5; x++) { - for (var y = 0; y < 5; y++) { - PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; - } - } - - // Compute round constants - var LFSR = 0x01; - for (var i = 0; i < 24; i++) { - var roundConstantMsw = 0; - var roundConstantLsw = 0; - - for (var j = 0; j < 7; j++) { - if (LFSR & 0x01) { - var bitPosition = (1 << j) - 1; - if (bitPosition < 32) { - roundConstantLsw ^= 1 << bitPosition; - } else /* if (bitPosition >= 32) */ { - roundConstantMsw ^= 1 << (bitPosition - 32); - } - } - - // Compute next LFSR - if (LFSR & 0x80) { - // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 - LFSR = (LFSR << 1) ^ 0x71; - } else { - LFSR <<= 1; - } - } - - ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); - } - }()); - - // Reusable objects for temporary values - var T = []; - (function () { - for (var i = 0; i < 25; i++) { - T[i] = X64Word.create(); - } - }()); - - /** - * SHA-3 hash algorithm. - */ - var SHA3 = C_algo.SHA3 = Hasher.extend({ - /** - * Configuration options. - * - * @property {number} outputLength - * The desired number of bits in the output hash. - * Only values permitted are: 224, 256, 384, 512. - * Default: 512 - */ - cfg: Hasher.cfg.extend({ - outputLength: 512 - }), - - _doReset: function () { - var state = this._state = [] - for (var i = 0; i < 25; i++) { - state[i] = new X64Word.init(); - } - - this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; - }, - - _doProcessBlock: function (M, offset) { - // Shortcuts - var state = this._state; - var nBlockSizeLanes = this.blockSize / 2; - - // Absorb - for (var i = 0; i < nBlockSizeLanes; i++) { - // Shortcuts - var M2i = M[offset + 2 * i]; - var M2i1 = M[offset + 2 * i + 1]; - - // Swap endian - M2i = ( - (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | - (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) - ); - M2i1 = ( - (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | - (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) - ); - - // Absorb message into state - var lane = state[i]; - lane.high ^= M2i1; - lane.low ^= M2i; - } - - // Rounds - for (var round = 0; round < 24; round++) { - // Theta - for (var x = 0; x < 5; x++) { - // Mix column lanes - var tMsw = 0, tLsw = 0; - for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - tMsw ^= lane.high; - tLsw ^= lane.low; - } - - // Temporary values - var Tx = T[x]; - Tx.high = tMsw; - Tx.low = tLsw; - } - for (var x = 0; x < 5; x++) { - // Shortcuts - var Tx4 = T[(x + 4) % 5]; - var Tx1 = T[(x + 1) % 5]; - var Tx1Msw = Tx1.high; - var Tx1Lsw = Tx1.low; - - // Mix surrounding columns - var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); - var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); - for (var y = 0; y < 5; y++) { - var lane = state[x + 5 * y]; - lane.high ^= tMsw; - lane.low ^= tLsw; - } - } - - // Rho Pi - for (var laneIndex = 1; laneIndex < 25; laneIndex++) { - var tMsw; - var tLsw; - - // Shortcuts - var lane = state[laneIndex]; - var laneMsw = lane.high; - var laneLsw = lane.low; - var rhoOffset = RHO_OFFSETS[laneIndex]; - - // Rotate lanes - if (rhoOffset < 32) { - tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); - tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); - } else /* if (rhoOffset >= 32) */ { - tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); - tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); - } - - // Transpose lanes - var TPiLane = T[PI_INDEXES[laneIndex]]; - TPiLane.high = tMsw; - TPiLane.low = tLsw; - } - - // Rho pi at x = y = 0 - var T0 = T[0]; - var state0 = state[0]; - T0.high = state0.high; - T0.low = state0.low; - - // Chi - for (var x = 0; x < 5; x++) { - for (var y = 0; y < 5; y++) { - // Shortcuts - var laneIndex = x + 5 * y; - var lane = state[laneIndex]; - var TLane = T[laneIndex]; - var Tx1Lane = T[((x + 1) % 5) + 5 * y]; - var Tx2Lane = T[((x + 2) % 5) + 5 * y]; - - // Mix rows - lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); - lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); - } - } - - // Iota - var lane = state[0]; - var roundConstant = ROUND_CONSTANTS[round]; - lane.high ^= roundConstant.high; - lane.low ^= roundConstant.low; - } - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - var blockSizeBits = this.blockSize * 32; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); - dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Shortcuts - var state = this._state; - var outputLengthBytes = this.cfg.outputLength / 8; - var outputLengthLanes = outputLengthBytes / 8; - - // Squeeze - var hashWords = []; - for (var i = 0; i < outputLengthLanes; i++) { - // Shortcuts - var lane = state[i]; - var laneMsw = lane.high; - var laneLsw = lane.low; - - // Swap endian - laneMsw = ( - (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | - (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) - ); - laneLsw = ( - (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | - (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) - ); - - // Squeeze state to retrieve hash - hashWords.push(laneLsw); - hashWords.push(laneMsw); - } - - // Return final computed hash - return new WordArray.init(hashWords, outputLengthBytes); - }, - - clone: function () { - var clone = Hasher.clone.call(this); - - var state = clone._state = this._state.slice(0); - for (var i = 0; i < 25; i++) { - state[i] = state[i].clone(); - } - - return clone; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA3('message'); - * var hash = CryptoJS.SHA3(wordArray); - */ - C.SHA3 = Hasher._createHelper(SHA3); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA3(message, key); - */ - C.HmacSHA3 = Hasher._createHmacHelper(SHA3); - }(Math)); - - - return CryptoJS.SHA3; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha384.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha384.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js"), __webpack_require__(/*! ./sha512 */ "./node_modules/crypto-js/sha512.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; - var SHA512 = C_algo.SHA512; - - /** - * SHA-384 hash algorithm. - */ - var SHA384 = C_algo.SHA384 = SHA512.extend({ - _doReset: function () { - this._hash = new X64WordArray.init([ - new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), - new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), - new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), - new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) - ]); - }, - - _doFinalize: function () { - var hash = SHA512._doFinalize.call(this); - - hash.sigBytes -= 16; - - return hash; - } - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA384('message'); - * var hash = CryptoJS.SHA384(wordArray); - */ - C.SHA384 = SHA512._createHelper(SHA384); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA384(message, key); - */ - C.HmacSHA384 = SHA512._createHmacHelper(SHA384); - }()); - - - return CryptoJS.SHA384; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/sha512.js": -/*!******************************************!*\ - !*** ./node_modules/crypto-js/sha512.js ***! - \******************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./x64-core */ "./node_modules/crypto-js/x64-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Hasher = C_lib.Hasher; - var C_x64 = C.x64; - var X64Word = C_x64.Word; - var X64WordArray = C_x64.WordArray; - var C_algo = C.algo; - - function X64Word_create() { - return X64Word.create.apply(X64Word, arguments); - } - - // Constants - var K = [ - X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), - X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), - X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), - X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), - X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), - X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), - X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), - X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), - X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), - X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), - X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), - X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), - X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), - X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), - X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), - X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), - X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), - X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), - X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), - X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), - X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), - X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), - X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), - X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), - X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), - X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), - X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), - X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), - X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), - X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), - X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), - X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), - X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), - X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), - X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), - X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), - X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), - X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), - X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), - X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) - ]; - - // Reusable objects - var W = []; - (function () { - for (var i = 0; i < 80; i++) { - W[i] = X64Word_create(); - } - }()); - - /** - * SHA-512 hash algorithm. - */ - var SHA512 = C_algo.SHA512 = Hasher.extend({ - _doReset: function () { - this._hash = new X64WordArray.init([ - new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), - new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), - new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), - new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) - ]); - }, - - _doProcessBlock: function (M, offset) { - // Shortcuts - var H = this._hash.words; - - var H0 = H[0]; - var H1 = H[1]; - var H2 = H[2]; - var H3 = H[3]; - var H4 = H[4]; - var H5 = H[5]; - var H6 = H[6]; - var H7 = H[7]; - - var H0h = H0.high; - var H0l = H0.low; - var H1h = H1.high; - var H1l = H1.low; - var H2h = H2.high; - var H2l = H2.low; - var H3h = H3.high; - var H3l = H3.low; - var H4h = H4.high; - var H4l = H4.low; - var H5h = H5.high; - var H5l = H5.low; - var H6h = H6.high; - var H6l = H6.low; - var H7h = H7.high; - var H7l = H7.low; - - // Working variables - var ah = H0h; - var al = H0l; - var bh = H1h; - var bl = H1l; - var ch = H2h; - var cl = H2l; - var dh = H3h; - var dl = H3l; - var eh = H4h; - var el = H4l; - var fh = H5h; - var fl = H5l; - var gh = H6h; - var gl = H6l; - var hh = H7h; - var hl = H7l; - - // Rounds - for (var i = 0; i < 80; i++) { - var Wil; - var Wih; - - // Shortcut - var Wi = W[i]; - - // Extend message - if (i < 16) { - Wih = Wi.high = M[offset + i * 2] | 0; - Wil = Wi.low = M[offset + i * 2 + 1] | 0; - } else { - // Gamma0 - var gamma0x = W[i - 15]; - var gamma0xh = gamma0x.high; - var gamma0xl = gamma0x.low; - var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); - var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); - - // Gamma1 - var gamma1x = W[i - 2]; - var gamma1xh = gamma1x.high; - var gamma1xl = gamma1x.low; - var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); - var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); - - // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] - var Wi7 = W[i - 7]; - var Wi7h = Wi7.high; - var Wi7l = Wi7.low; - - var Wi16 = W[i - 16]; - var Wi16h = Wi16.high; - var Wi16l = Wi16.low; - - Wil = gamma0l + Wi7l; - Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); - Wil = Wil + gamma1l; - Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); - Wil = Wil + Wi16l; - Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); - - Wi.high = Wih; - Wi.low = Wil; - } - - var chh = (eh & fh) ^ (~eh & gh); - var chl = (el & fl) ^ (~el & gl); - var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); - var majl = (al & bl) ^ (al & cl) ^ (bl & cl); - - var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); - var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); - var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); - var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); - - // t1 = h + sigma1 + ch + K[i] + W[i] - var Ki = K[i]; - var Kih = Ki.high; - var Kil = Ki.low; - - var t1l = hl + sigma1l; - var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); - var t1l = t1l + chl; - var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); - var t1l = t1l + Kil; - var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); - var t1l = t1l + Wil; - var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); - - // t2 = sigma0 + maj - var t2l = sigma0l + majl; - var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); - - // Update working variables - hh = gh; - hl = gl; - gh = fh; - gl = fl; - fh = eh; - fl = el; - el = (dl + t1l) | 0; - eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; - dh = ch; - dl = cl; - ch = bh; - cl = bl; - bh = ah; - bl = al; - al = (t1l + t2l) | 0; - ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; - } - - // Intermediate hash value - H0l = H0.low = (H0l + al); - H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); - H1l = H1.low = (H1l + bl); - H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); - H2l = H2.low = (H2l + cl); - H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); - H3l = H3.low = (H3l + dl); - H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); - H4l = H4.low = (H4l + el); - H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); - H5l = H5.low = (H5l + fl); - H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); - H6l = H6.low = (H6l + gl); - H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); - H7l = H7.low = (H7l + hl); - H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); - }, - - _doFinalize: function () { - // Shortcuts - var data = this._data; - var dataWords = data.words; - - var nBitsTotal = this._nDataBytes * 8; - var nBitsLeft = data.sigBytes * 8; - - // Add padding - dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); - dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); - dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - - // Hash final blocks - this._process(); - - // Convert hash to 32-bit word array before returning - var hash = this._hash.toX32(); - - // Return final computed hash - return hash; - }, - - clone: function () { - var clone = Hasher.clone.call(this); - clone._hash = this._hash.clone(); - - return clone; - }, - - blockSize: 1024/32 - }); - - /** - * Shortcut function to the hasher's object interface. - * - * @param {WordArray|string} message The message to hash. - * - * @return {WordArray} The hash. - * - * @static - * - * @example - * - * var hash = CryptoJS.SHA512('message'); - * var hash = CryptoJS.SHA512(wordArray); - */ - C.SHA512 = Hasher._createHelper(SHA512); - - /** - * Shortcut function to the HMAC's object interface. - * - * @param {WordArray|string} message The message to hash. - * @param {WordArray|string} key The secret key. - * - * @return {WordArray} The HMAC. - * - * @static - * - * @example - * - * var hmac = CryptoJS.HmacSHA512(message, key); - */ - C.HmacSHA512 = Hasher._createHmacHelper(SHA512); - }()); - - - return CryptoJS.SHA512; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/tripledes.js": -/*!*********************************************!*\ - !*** ./node_modules/crypto-js/tripledes.js ***! - \*********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory, undef) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js"), __webpack_require__(/*! ./enc-base64 */ "./node_modules/crypto-js/enc-base64.js"), __webpack_require__(/*! ./md5 */ "./node_modules/crypto-js/md5.js"), __webpack_require__(/*! ./evpkdf */ "./node_modules/crypto-js/evpkdf.js"), __webpack_require__(/*! ./cipher-core */ "./node_modules/crypto-js/cipher-core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var WordArray = C_lib.WordArray; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - // Permuted Choice 1 constants - var PC1 = [ - 57, 49, 41, 33, 25, 17, 9, 1, - 58, 50, 42, 34, 26, 18, 10, 2, - 59, 51, 43, 35, 27, 19, 11, 3, - 60, 52, 44, 36, 63, 55, 47, 39, - 31, 23, 15, 7, 62, 54, 46, 38, - 30, 22, 14, 6, 61, 53, 45, 37, - 29, 21, 13, 5, 28, 20, 12, 4 - ]; - - // Permuted Choice 2 constants - var PC2 = [ - 14, 17, 11, 24, 1, 5, - 3, 28, 15, 6, 21, 10, - 23, 19, 12, 4, 26, 8, - 16, 7, 27, 20, 13, 2, - 41, 52, 31, 37, 47, 55, - 30, 40, 51, 45, 33, 48, - 44, 49, 39, 56, 34, 53, - 46, 42, 50, 36, 29, 32 - ]; - - // Cumulative bit shift constants - var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; - - // SBOXes and round permutation constants - var SBOX_P = [ - { - 0x0: 0x808200, - 0x10000000: 0x8000, - 0x20000000: 0x808002, - 0x30000000: 0x2, - 0x40000000: 0x200, - 0x50000000: 0x808202, - 0x60000000: 0x800202, - 0x70000000: 0x800000, - 0x80000000: 0x202, - 0x90000000: 0x800200, - 0xa0000000: 0x8200, - 0xb0000000: 0x808000, - 0xc0000000: 0x8002, - 0xd0000000: 0x800002, - 0xe0000000: 0x0, - 0xf0000000: 0x8202, - 0x8000000: 0x0, - 0x18000000: 0x808202, - 0x28000000: 0x8202, - 0x38000000: 0x8000, - 0x48000000: 0x808200, - 0x58000000: 0x200, - 0x68000000: 0x808002, - 0x78000000: 0x2, - 0x88000000: 0x800200, - 0x98000000: 0x8200, - 0xa8000000: 0x808000, - 0xb8000000: 0x800202, - 0xc8000000: 0x800002, - 0xd8000000: 0x8002, - 0xe8000000: 0x202, - 0xf8000000: 0x800000, - 0x1: 0x8000, - 0x10000001: 0x2, - 0x20000001: 0x808200, - 0x30000001: 0x800000, - 0x40000001: 0x808002, - 0x50000001: 0x8200, - 0x60000001: 0x200, - 0x70000001: 0x800202, - 0x80000001: 0x808202, - 0x90000001: 0x808000, - 0xa0000001: 0x800002, - 0xb0000001: 0x8202, - 0xc0000001: 0x202, - 0xd0000001: 0x800200, - 0xe0000001: 0x8002, - 0xf0000001: 0x0, - 0x8000001: 0x808202, - 0x18000001: 0x808000, - 0x28000001: 0x800000, - 0x38000001: 0x200, - 0x48000001: 0x8000, - 0x58000001: 0x800002, - 0x68000001: 0x2, - 0x78000001: 0x8202, - 0x88000001: 0x8002, - 0x98000001: 0x800202, - 0xa8000001: 0x202, - 0xb8000001: 0x808200, - 0xc8000001: 0x800200, - 0xd8000001: 0x0, - 0xe8000001: 0x8200, - 0xf8000001: 0x808002 - }, - { - 0x0: 0x40084010, - 0x1000000: 0x4000, - 0x2000000: 0x80000, - 0x3000000: 0x40080010, - 0x4000000: 0x40000010, - 0x5000000: 0x40084000, - 0x6000000: 0x40004000, - 0x7000000: 0x10, - 0x8000000: 0x84000, - 0x9000000: 0x40004010, - 0xa000000: 0x40000000, - 0xb000000: 0x84010, - 0xc000000: 0x80010, - 0xd000000: 0x0, - 0xe000000: 0x4010, - 0xf000000: 0x40080000, - 0x800000: 0x40004000, - 0x1800000: 0x84010, - 0x2800000: 0x10, - 0x3800000: 0x40004010, - 0x4800000: 0x40084010, - 0x5800000: 0x40000000, - 0x6800000: 0x80000, - 0x7800000: 0x40080010, - 0x8800000: 0x80010, - 0x9800000: 0x0, - 0xa800000: 0x4000, - 0xb800000: 0x40080000, - 0xc800000: 0x40000010, - 0xd800000: 0x84000, - 0xe800000: 0x40084000, - 0xf800000: 0x4010, - 0x10000000: 0x0, - 0x11000000: 0x40080010, - 0x12000000: 0x40004010, - 0x13000000: 0x40084000, - 0x14000000: 0x40080000, - 0x15000000: 0x10, - 0x16000000: 0x84010, - 0x17000000: 0x4000, - 0x18000000: 0x4010, - 0x19000000: 0x80000, - 0x1a000000: 0x80010, - 0x1b000000: 0x40000010, - 0x1c000000: 0x84000, - 0x1d000000: 0x40004000, - 0x1e000000: 0x40000000, - 0x1f000000: 0x40084010, - 0x10800000: 0x84010, - 0x11800000: 0x80000, - 0x12800000: 0x40080000, - 0x13800000: 0x4000, - 0x14800000: 0x40004000, - 0x15800000: 0x40084010, - 0x16800000: 0x10, - 0x17800000: 0x40000000, - 0x18800000: 0x40084000, - 0x19800000: 0x40000010, - 0x1a800000: 0x40004010, - 0x1b800000: 0x80010, - 0x1c800000: 0x0, - 0x1d800000: 0x4010, - 0x1e800000: 0x40080010, - 0x1f800000: 0x84000 - }, - { - 0x0: 0x104, - 0x100000: 0x0, - 0x200000: 0x4000100, - 0x300000: 0x10104, - 0x400000: 0x10004, - 0x500000: 0x4000004, - 0x600000: 0x4010104, - 0x700000: 0x4010000, - 0x800000: 0x4000000, - 0x900000: 0x4010100, - 0xa00000: 0x10100, - 0xb00000: 0x4010004, - 0xc00000: 0x4000104, - 0xd00000: 0x10000, - 0xe00000: 0x4, - 0xf00000: 0x100, - 0x80000: 0x4010100, - 0x180000: 0x4010004, - 0x280000: 0x0, - 0x380000: 0x4000100, - 0x480000: 0x4000004, - 0x580000: 0x10000, - 0x680000: 0x10004, - 0x780000: 0x104, - 0x880000: 0x4, - 0x980000: 0x100, - 0xa80000: 0x4010000, - 0xb80000: 0x10104, - 0xc80000: 0x10100, - 0xd80000: 0x4000104, - 0xe80000: 0x4010104, - 0xf80000: 0x4000000, - 0x1000000: 0x4010100, - 0x1100000: 0x10004, - 0x1200000: 0x10000, - 0x1300000: 0x4000100, - 0x1400000: 0x100, - 0x1500000: 0x4010104, - 0x1600000: 0x4000004, - 0x1700000: 0x0, - 0x1800000: 0x4000104, - 0x1900000: 0x4000000, - 0x1a00000: 0x4, - 0x1b00000: 0x10100, - 0x1c00000: 0x4010000, - 0x1d00000: 0x104, - 0x1e00000: 0x10104, - 0x1f00000: 0x4010004, - 0x1080000: 0x4000000, - 0x1180000: 0x104, - 0x1280000: 0x4010100, - 0x1380000: 0x0, - 0x1480000: 0x10004, - 0x1580000: 0x4000100, - 0x1680000: 0x100, - 0x1780000: 0x4010004, - 0x1880000: 0x10000, - 0x1980000: 0x4010104, - 0x1a80000: 0x10104, - 0x1b80000: 0x4000004, - 0x1c80000: 0x4000104, - 0x1d80000: 0x4010000, - 0x1e80000: 0x4, - 0x1f80000: 0x10100 - }, - { - 0x0: 0x80401000, - 0x10000: 0x80001040, - 0x20000: 0x401040, - 0x30000: 0x80400000, - 0x40000: 0x0, - 0x50000: 0x401000, - 0x60000: 0x80000040, - 0x70000: 0x400040, - 0x80000: 0x80000000, - 0x90000: 0x400000, - 0xa0000: 0x40, - 0xb0000: 0x80001000, - 0xc0000: 0x80400040, - 0xd0000: 0x1040, - 0xe0000: 0x1000, - 0xf0000: 0x80401040, - 0x8000: 0x80001040, - 0x18000: 0x40, - 0x28000: 0x80400040, - 0x38000: 0x80001000, - 0x48000: 0x401000, - 0x58000: 0x80401040, - 0x68000: 0x0, - 0x78000: 0x80400000, - 0x88000: 0x1000, - 0x98000: 0x80401000, - 0xa8000: 0x400000, - 0xb8000: 0x1040, - 0xc8000: 0x80000000, - 0xd8000: 0x400040, - 0xe8000: 0x401040, - 0xf8000: 0x80000040, - 0x100000: 0x400040, - 0x110000: 0x401000, - 0x120000: 0x80000040, - 0x130000: 0x0, - 0x140000: 0x1040, - 0x150000: 0x80400040, - 0x160000: 0x80401000, - 0x170000: 0x80001040, - 0x180000: 0x80401040, - 0x190000: 0x80000000, - 0x1a0000: 0x80400000, - 0x1b0000: 0x401040, - 0x1c0000: 0x80001000, - 0x1d0000: 0x400000, - 0x1e0000: 0x40, - 0x1f0000: 0x1000, - 0x108000: 0x80400000, - 0x118000: 0x80401040, - 0x128000: 0x0, - 0x138000: 0x401000, - 0x148000: 0x400040, - 0x158000: 0x80000000, - 0x168000: 0x80001040, - 0x178000: 0x40, - 0x188000: 0x80000040, - 0x198000: 0x1000, - 0x1a8000: 0x80001000, - 0x1b8000: 0x80400040, - 0x1c8000: 0x1040, - 0x1d8000: 0x80401000, - 0x1e8000: 0x400000, - 0x1f8000: 0x401040 - }, - { - 0x0: 0x80, - 0x1000: 0x1040000, - 0x2000: 0x40000, - 0x3000: 0x20000000, - 0x4000: 0x20040080, - 0x5000: 0x1000080, - 0x6000: 0x21000080, - 0x7000: 0x40080, - 0x8000: 0x1000000, - 0x9000: 0x20040000, - 0xa000: 0x20000080, - 0xb000: 0x21040080, - 0xc000: 0x21040000, - 0xd000: 0x0, - 0xe000: 0x1040080, - 0xf000: 0x21000000, - 0x800: 0x1040080, - 0x1800: 0x21000080, - 0x2800: 0x80, - 0x3800: 0x1040000, - 0x4800: 0x40000, - 0x5800: 0x20040080, - 0x6800: 0x21040000, - 0x7800: 0x20000000, - 0x8800: 0x20040000, - 0x9800: 0x0, - 0xa800: 0x21040080, - 0xb800: 0x1000080, - 0xc800: 0x20000080, - 0xd800: 0x21000000, - 0xe800: 0x1000000, - 0xf800: 0x40080, - 0x10000: 0x40000, - 0x11000: 0x80, - 0x12000: 0x20000000, - 0x13000: 0x21000080, - 0x14000: 0x1000080, - 0x15000: 0x21040000, - 0x16000: 0x20040080, - 0x17000: 0x1000000, - 0x18000: 0x21040080, - 0x19000: 0x21000000, - 0x1a000: 0x1040000, - 0x1b000: 0x20040000, - 0x1c000: 0x40080, - 0x1d000: 0x20000080, - 0x1e000: 0x0, - 0x1f000: 0x1040080, - 0x10800: 0x21000080, - 0x11800: 0x1000000, - 0x12800: 0x1040000, - 0x13800: 0x20040080, - 0x14800: 0x20000000, - 0x15800: 0x1040080, - 0x16800: 0x80, - 0x17800: 0x21040000, - 0x18800: 0x40080, - 0x19800: 0x21040080, - 0x1a800: 0x0, - 0x1b800: 0x21000000, - 0x1c800: 0x1000080, - 0x1d800: 0x40000, - 0x1e800: 0x20040000, - 0x1f800: 0x20000080 - }, - { - 0x0: 0x10000008, - 0x100: 0x2000, - 0x200: 0x10200000, - 0x300: 0x10202008, - 0x400: 0x10002000, - 0x500: 0x200000, - 0x600: 0x200008, - 0x700: 0x10000000, - 0x800: 0x0, - 0x900: 0x10002008, - 0xa00: 0x202000, - 0xb00: 0x8, - 0xc00: 0x10200008, - 0xd00: 0x202008, - 0xe00: 0x2008, - 0xf00: 0x10202000, - 0x80: 0x10200000, - 0x180: 0x10202008, - 0x280: 0x8, - 0x380: 0x200000, - 0x480: 0x202008, - 0x580: 0x10000008, - 0x680: 0x10002000, - 0x780: 0x2008, - 0x880: 0x200008, - 0x980: 0x2000, - 0xa80: 0x10002008, - 0xb80: 0x10200008, - 0xc80: 0x0, - 0xd80: 0x10202000, - 0xe80: 0x202000, - 0xf80: 0x10000000, - 0x1000: 0x10002000, - 0x1100: 0x10200008, - 0x1200: 0x10202008, - 0x1300: 0x2008, - 0x1400: 0x200000, - 0x1500: 0x10000000, - 0x1600: 0x10000008, - 0x1700: 0x202000, - 0x1800: 0x202008, - 0x1900: 0x0, - 0x1a00: 0x8, - 0x1b00: 0x10200000, - 0x1c00: 0x2000, - 0x1d00: 0x10002008, - 0x1e00: 0x10202000, - 0x1f00: 0x200008, - 0x1080: 0x8, - 0x1180: 0x202000, - 0x1280: 0x200000, - 0x1380: 0x10000008, - 0x1480: 0x10002000, - 0x1580: 0x2008, - 0x1680: 0x10202008, - 0x1780: 0x10200000, - 0x1880: 0x10202000, - 0x1980: 0x10200008, - 0x1a80: 0x2000, - 0x1b80: 0x202008, - 0x1c80: 0x200008, - 0x1d80: 0x0, - 0x1e80: 0x10000000, - 0x1f80: 0x10002008 - }, - { - 0x0: 0x100000, - 0x10: 0x2000401, - 0x20: 0x400, - 0x30: 0x100401, - 0x40: 0x2100401, - 0x50: 0x0, - 0x60: 0x1, - 0x70: 0x2100001, - 0x80: 0x2000400, - 0x90: 0x100001, - 0xa0: 0x2000001, - 0xb0: 0x2100400, - 0xc0: 0x2100000, - 0xd0: 0x401, - 0xe0: 0x100400, - 0xf0: 0x2000000, - 0x8: 0x2100001, - 0x18: 0x0, - 0x28: 0x2000401, - 0x38: 0x2100400, - 0x48: 0x100000, - 0x58: 0x2000001, - 0x68: 0x2000000, - 0x78: 0x401, - 0x88: 0x100401, - 0x98: 0x2000400, - 0xa8: 0x2100000, - 0xb8: 0x100001, - 0xc8: 0x400, - 0xd8: 0x2100401, - 0xe8: 0x1, - 0xf8: 0x100400, - 0x100: 0x2000000, - 0x110: 0x100000, - 0x120: 0x2000401, - 0x130: 0x2100001, - 0x140: 0x100001, - 0x150: 0x2000400, - 0x160: 0x2100400, - 0x170: 0x100401, - 0x180: 0x401, - 0x190: 0x2100401, - 0x1a0: 0x100400, - 0x1b0: 0x1, - 0x1c0: 0x0, - 0x1d0: 0x2100000, - 0x1e0: 0x2000001, - 0x1f0: 0x400, - 0x108: 0x100400, - 0x118: 0x2000401, - 0x128: 0x2100001, - 0x138: 0x1, - 0x148: 0x2000000, - 0x158: 0x100000, - 0x168: 0x401, - 0x178: 0x2100400, - 0x188: 0x2000001, - 0x198: 0x2100000, - 0x1a8: 0x0, - 0x1b8: 0x2100401, - 0x1c8: 0x100401, - 0x1d8: 0x400, - 0x1e8: 0x2000400, - 0x1f8: 0x100001 - }, - { - 0x0: 0x8000820, - 0x1: 0x20000, - 0x2: 0x8000000, - 0x3: 0x20, - 0x4: 0x20020, - 0x5: 0x8020820, - 0x6: 0x8020800, - 0x7: 0x800, - 0x8: 0x8020000, - 0x9: 0x8000800, - 0xa: 0x20800, - 0xb: 0x8020020, - 0xc: 0x820, - 0xd: 0x0, - 0xe: 0x8000020, - 0xf: 0x20820, - 0x80000000: 0x800, - 0x80000001: 0x8020820, - 0x80000002: 0x8000820, - 0x80000003: 0x8000000, - 0x80000004: 0x8020000, - 0x80000005: 0x20800, - 0x80000006: 0x20820, - 0x80000007: 0x20, - 0x80000008: 0x8000020, - 0x80000009: 0x820, - 0x8000000a: 0x20020, - 0x8000000b: 0x8020800, - 0x8000000c: 0x0, - 0x8000000d: 0x8020020, - 0x8000000e: 0x8000800, - 0x8000000f: 0x20000, - 0x10: 0x20820, - 0x11: 0x8020800, - 0x12: 0x20, - 0x13: 0x800, - 0x14: 0x8000800, - 0x15: 0x8000020, - 0x16: 0x8020020, - 0x17: 0x20000, - 0x18: 0x0, - 0x19: 0x20020, - 0x1a: 0x8020000, - 0x1b: 0x8000820, - 0x1c: 0x8020820, - 0x1d: 0x20800, - 0x1e: 0x820, - 0x1f: 0x8000000, - 0x80000010: 0x20000, - 0x80000011: 0x800, - 0x80000012: 0x8020020, - 0x80000013: 0x20820, - 0x80000014: 0x20, - 0x80000015: 0x8020000, - 0x80000016: 0x8000000, - 0x80000017: 0x8000820, - 0x80000018: 0x8020820, - 0x80000019: 0x8000020, - 0x8000001a: 0x8000800, - 0x8000001b: 0x0, - 0x8000001c: 0x20800, - 0x8000001d: 0x820, - 0x8000001e: 0x20020, - 0x8000001f: 0x8020800 - } - ]; - - // Masks that select the SBOX input - var SBOX_MASK = [ - 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, - 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f - ]; - - /** - * DES block cipher algorithm. - */ - var DES = C_algo.DES = BlockCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - - // Select 56 bits according to PC1 - var keyBits = []; - for (var i = 0; i < 56; i++) { - var keyBitPos = PC1[i] - 1; - keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; - } - - // Assemble 16 subkeys - var subKeys = this._subKeys = []; - for (var nSubKey = 0; nSubKey < 16; nSubKey++) { - // Create subkey - var subKey = subKeys[nSubKey] = []; - - // Shortcut - var bitShift = BIT_SHIFTS[nSubKey]; - - // Select 48 bits according to PC2 - for (var i = 0; i < 24; i++) { - // Select from the left 28 key bits - subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); - - // Select from the right 28 key bits - subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); - } - - // Since each subkey is applied to an expanded 32-bit input, - // the subkey can be broken into 8 values scaled to 32-bits, - // which allows the key to be used without expansion - subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); - for (var i = 1; i < 7; i++) { - subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); - } - subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); - } - - // Compute inverse subkeys - var invSubKeys = this._invSubKeys = []; - for (var i = 0; i < 16; i++) { - invSubKeys[i] = subKeys[15 - i]; - } - }, - - encryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._subKeys); - }, - - decryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._invSubKeys); - }, - - _doCryptBlock: function (M, offset, subKeys) { - // Get input - this._lBlock = M[offset]; - this._rBlock = M[offset + 1]; - - // Initial permutation - exchangeLR.call(this, 4, 0x0f0f0f0f); - exchangeLR.call(this, 16, 0x0000ffff); - exchangeRL.call(this, 2, 0x33333333); - exchangeRL.call(this, 8, 0x00ff00ff); - exchangeLR.call(this, 1, 0x55555555); - - // Rounds - for (var round = 0; round < 16; round++) { - // Shortcuts - var subKey = subKeys[round]; - var lBlock = this._lBlock; - var rBlock = this._rBlock; - - // Feistel function - var f = 0; - for (var i = 0; i < 8; i++) { - f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; - } - this._lBlock = rBlock; - this._rBlock = lBlock ^ f; - } - - // Undo swap from last round - var t = this._lBlock; - this._lBlock = this._rBlock; - this._rBlock = t; - - // Final permutation - exchangeLR.call(this, 1, 0x55555555); - exchangeRL.call(this, 8, 0x00ff00ff); - exchangeRL.call(this, 2, 0x33333333); - exchangeLR.call(this, 16, 0x0000ffff); - exchangeLR.call(this, 4, 0x0f0f0f0f); - - // Set output - M[offset] = this._lBlock; - M[offset + 1] = this._rBlock; - }, - - keySize: 64/32, - - ivSize: 64/32, - - blockSize: 64/32 - }); - - // Swap bits across the left and right words - function exchangeLR(offset, mask) { - var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; - this._rBlock ^= t; - this._lBlock ^= t << offset; - } - - function exchangeRL(offset, mask) { - var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; - this._lBlock ^= t; - this._rBlock ^= t << offset; - } - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); - */ - C.DES = BlockCipher._createHelper(DES); - - /** - * Triple-DES block cipher algorithm. - */ - var TripleDES = C_algo.TripleDES = BlockCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - // Make sure the key length is valid (64, 128 or >= 192 bit) - if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) { - throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.'); - } - - // Extend the key according to the keying options defined in 3DES standard - var key1 = keyWords.slice(0, 2); - var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4); - var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6); - - // Create DES instances - this._des1 = DES.createEncryptor(WordArray.create(key1)); - this._des2 = DES.createEncryptor(WordArray.create(key2)); - this._des3 = DES.createEncryptor(WordArray.create(key3)); - }, - - encryptBlock: function (M, offset) { - this._des1.encryptBlock(M, offset); - this._des2.decryptBlock(M, offset); - this._des3.encryptBlock(M, offset); - }, - - decryptBlock: function (M, offset) { - this._des3.decryptBlock(M, offset); - this._des2.encryptBlock(M, offset); - this._des1.decryptBlock(M, offset); - }, - - keySize: 192/32, - - ivSize: 64/32, - - blockSize: 64/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); - */ - C.TripleDES = BlockCipher._createHelper(TripleDES); - }()); - - - return CryptoJS.TripleDES; - -})); - -/***/ }), - -/***/ "./node_modules/crypto-js/x64-core.js": -/*!********************************************!*\ - !*** ./node_modules/crypto-js/x64-core.js ***! - \********************************************/ -/***/ (function(module, exports, __webpack_require__) { - -;(function (root, factory) { - if (true) { - // CommonJS - module.exports = exports = factory(__webpack_require__(/*! ./core */ "./node_modules/crypto-js/core.js")); - } - else {} -}(this, function (CryptoJS) { - - (function (undefined) { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var Base = C_lib.Base; - var X32WordArray = C_lib.WordArray; - - /** - * x64 namespace. - */ - var C_x64 = C.x64 = {}; - - /** - * A 64-bit word. - */ - var X64Word = C_x64.Word = Base.extend({ - /** - * Initializes a newly created 64-bit word. - * - * @param {number} high The high 32 bits. - * @param {number} low The low 32 bits. - * - * @example - * - * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); - */ - init: function (high, low) { - this.high = high; - this.low = low; - } - - /** - * Bitwise NOTs this word. - * - * @return {X64Word} A new x64-Word object after negating. - * - * @example - * - * var negated = x64Word.not(); - */ - // not: function () { - // var high = ~this.high; - // var low = ~this.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise ANDs this word with the passed word. - * - * @param {X64Word} word The x64-Word to AND with this word. - * - * @return {X64Word} A new x64-Word object after ANDing. - * - * @example - * - * var anded = x64Word.and(anotherX64Word); - */ - // and: function (word) { - // var high = this.high & word.high; - // var low = this.low & word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise ORs this word with the passed word. - * - * @param {X64Word} word The x64-Word to OR with this word. - * - * @return {X64Word} A new x64-Word object after ORing. - * - * @example - * - * var ored = x64Word.or(anotherX64Word); - */ - // or: function (word) { - // var high = this.high | word.high; - // var low = this.low | word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Bitwise XORs this word with the passed word. - * - * @param {X64Word} word The x64-Word to XOR with this word. - * - * @return {X64Word} A new x64-Word object after XORing. - * - * @example - * - * var xored = x64Word.xor(anotherX64Word); - */ - // xor: function (word) { - // var high = this.high ^ word.high; - // var low = this.low ^ word.low; - - // return X64Word.create(high, low); - // }, - - /** - * Shifts this word n bits to the left. - * - * @param {number} n The number of bits to shift. - * - * @return {X64Word} A new x64-Word object after shifting. - * - * @example - * - * var shifted = x64Word.shiftL(25); - */ - // shiftL: function (n) { - // if (n < 32) { - // var high = (this.high << n) | (this.low >>> (32 - n)); - // var low = this.low << n; - // } else { - // var high = this.low << (n - 32); - // var low = 0; - // } - - // return X64Word.create(high, low); - // }, - - /** - * Shifts this word n bits to the right. - * - * @param {number} n The number of bits to shift. - * - * @return {X64Word} A new x64-Word object after shifting. - * - * @example - * - * var shifted = x64Word.shiftR(7); - */ - // shiftR: function (n) { - // if (n < 32) { - // var low = (this.low >>> n) | (this.high << (32 - n)); - // var high = this.high >>> n; - // } else { - // var low = this.high >>> (n - 32); - // var high = 0; - // } - - // return X64Word.create(high, low); - // }, - - /** - * Rotates this word n bits to the left. - * - * @param {number} n The number of bits to rotate. - * - * @return {X64Word} A new x64-Word object after rotating. - * - * @example - * - * var rotated = x64Word.rotL(25); - */ - // rotL: function (n) { - // return this.shiftL(n).or(this.shiftR(64 - n)); - // }, - - /** - * Rotates this word n bits to the right. - * - * @param {number} n The number of bits to rotate. - * - * @return {X64Word} A new x64-Word object after rotating. - * - * @example - * - * var rotated = x64Word.rotR(7); - */ - // rotR: function (n) { - // return this.shiftR(n).or(this.shiftL(64 - n)); - // }, - - /** - * Adds this word with the passed word. - * - * @param {X64Word} word The x64-Word to add with this word. - * - * @return {X64Word} A new x64-Word object after adding. - * - * @example - * - * var added = x64Word.add(anotherX64Word); - */ - // add: function (word) { - // var low = (this.low + word.low) | 0; - // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; - // var high = (this.high + word.high + carry) | 0; - - // return X64Word.create(high, low); - // } - }); - - /** - * An array of 64-bit words. - * - * @property {Array} words The array of CryptoJS.x64.Word objects. - * @property {number} sigBytes The number of significant bytes in this word array. - */ - var X64WordArray = C_x64.WordArray = Base.extend({ - /** - * Initializes a newly created word array. - * - * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. - * @param {number} sigBytes (Optional) The number of significant bytes in the words. - * - * @example - * - * var wordArray = CryptoJS.x64.WordArray.create(); - * - * var wordArray = CryptoJS.x64.WordArray.create([ - * CryptoJS.x64.Word.create(0x00010203, 0x04050607), - * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) - * ]); - * - * var wordArray = CryptoJS.x64.WordArray.create([ - * CryptoJS.x64.Word.create(0x00010203, 0x04050607), - * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) - * ], 10); - */ - init: function (words, sigBytes) { - words = this.words = words || []; - - if (sigBytes != undefined) { - this.sigBytes = sigBytes; - } else { - this.sigBytes = words.length * 8; - } - }, - - /** - * Converts this 64-bit word array to a 32-bit word array. - * - * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. - * - * @example - * - * var x32WordArray = x64WordArray.toX32(); - */ - toX32: function () { - // Shortcuts - var x64Words = this.words; - var x64WordsLength = x64Words.length; - - // Convert - var x32Words = []; - for (var i = 0; i < x64WordsLength; i++) { - var x64Word = x64Words[i]; - x32Words.push(x64Word.high); - x32Words.push(x64Word.low); - } - - return X32WordArray.create(x32Words, this.sigBytes); - }, - - /** - * Creates a copy of this word array. - * - * @return {X64WordArray} The clone. - * - * @example - * - * var clone = x64WordArray.clone(); - */ - clone: function () { - var clone = Base.clone.call(this); - - // Clone "words" array - var words = clone.words = this.words.slice(0); - - // Clone each X64Word object - var wordsLength = words.length; - for (var i = 0; i < wordsLength; i++) { - words[i] = words[i].clone(); - } - - return clone; - } - }); - }()); - - - return CryptoJS; - -})); - -/***/ }), - -/***/ "./node_modules/desandro-matches-selector/matches-selector.js": -/*!********************************************************************!*\ - !*** ./node_modules/desandro-matches-selector/matches-selector.js ***! - \********************************************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * matchesSelector v2.0.2 - * matchesSelector( element, '.selector' ) - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true */ - -( function( window, factory ) { - /*global define: false, module: false */ - 'use strict'; - // universal module definition - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory() { - 'use strict'; - - var matchesMethod = ( function() { - var ElemProto = window.Element.prototype; - // check for the standard method name first - if ( ElemProto.matches ) { - return 'matches'; - } - // check un-prefixed - if ( ElemProto.matchesSelector ) { - return 'matchesSelector'; - } - // check vendor prefixes - var prefixes = [ 'webkit', 'moz', 'ms', 'o' ]; - - for ( var i=0; i < prefixes.length; i++ ) { - var prefix = prefixes[i]; - var method = prefix + 'MatchesSelector'; - if ( ElemProto[ method ] ) { - return method; - } - } - })(); - - return function matchesSelector( elem, selector ) { - return elem[ matchesMethod ]( selector ); - }; - -})); - - -/***/ }), - -/***/ "./node_modules/ev-emitter/ev-emitter.js": -/*!***********************************************!*\ - !*** ./node_modules/ev-emitter/ev-emitter.js ***! - \***********************************************/ -/***/ (function(module) { - -/** - * EvEmitter v2.1.1 - * Lil' event emitter - * MIT License - */ - -( function( global, factory ) { - // universal module definition - if ( true && module.exports ) { - // CommonJS - Browserify, Webpack - module.exports = factory(); - } else { - // Browser globals - global.EvEmitter = factory(); - } - -}( typeof window != 'undefined' ? window : this, function() { - -function EvEmitter() {} - -let proto = EvEmitter.prototype; - -proto.on = function( eventName, listener ) { - if ( !eventName || !listener ) return this; - - // set events hash - let events = this._events = this._events || {}; - // set listeners array - let listeners = events[ eventName ] = events[ eventName ] || []; - // only add once - if ( !listeners.includes( listener ) ) { - listeners.push( listener ); - } - - return this; -}; - -proto.once = function( eventName, listener ) { - if ( !eventName || !listener ) return this; - - // add event - this.on( eventName, listener ); - // set once flag - // set onceEvents hash - let onceEvents = this._onceEvents = this._onceEvents || {}; - // set onceListeners object - let onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {}; - // set flag - onceListeners[ listener ] = true; - - return this; -}; - -proto.off = function( eventName, listener ) { - let listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) return this; - - let index = listeners.indexOf( listener ); - if ( index != -1 ) { - listeners.splice( index, 1 ); - } - - return this; -}; - -proto.emitEvent = function( eventName, args ) { - let listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) return this; - - // copy over to avoid interference if .off() in listener - listeners = listeners.slice( 0 ); - args = args || []; - // once stuff - let onceListeners = this._onceEvents && this._onceEvents[ eventName ]; - - for ( let listener of listeners ) { - let isOnce = onceListeners && onceListeners[ listener ]; - if ( isOnce ) { - // remove listener - // remove before trigger to prevent recursion - this.off( eventName, listener ); - // unset once flag - delete onceListeners[ listener ]; - } - // trigger listener - listener.apply( this, args ); - } - - return this; -}; - -proto.allOff = function() { - delete this._events; - delete this._onceEvents; - return this; -}; - -return EvEmitter; - -} ) ); - - -/***/ }), - -/***/ "./node_modules/fizzy-ui-utils/utils.js": -/*!**********************************************!*\ - !*** ./node_modules/fizzy-ui-utils/utils.js ***! - \**********************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * Fizzy UI utils v2.0.7 - * MIT license - */ - -/*jshint browser: true, undef: true, unused: true, strict: true */ - -( function( window, factory ) { - // universal module definition - /*jshint strict: false */ /*globals define, module, require */ - - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! desandro-matches-selector/matches-selector */ "./node_modules/desandro-matches-selector/matches-selector.js") - ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( matchesSelector ) { - return factory( window, matchesSelector ); - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( window, matchesSelector ) { - -'use strict'; - -var utils = {}; - -// ----- extend ----- // - -// extends objects -utils.extend = function( a, b ) { - for ( var prop in b ) { - a[ prop ] = b[ prop ]; - } - return a; -}; - -// ----- modulo ----- // - -utils.modulo = function( num, div ) { - return ( ( num % div ) + div ) % div; -}; - -// ----- makeArray ----- // - -var arraySlice = Array.prototype.slice; - -// turn element or nodeList into an array -utils.makeArray = function( obj ) { - if ( Array.isArray( obj ) ) { - // use object if already an array - return obj; - } - // return empty array if undefined or null. #6 - if ( obj === null || obj === undefined ) { - return []; - } - - var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number'; - if ( isArrayLike ) { - // convert nodeList to array - return arraySlice.call( obj ); - } - - // array of single index - return [ obj ]; -}; - -// ----- removeFrom ----- // - -utils.removeFrom = function( ary, obj ) { - var index = ary.indexOf( obj ); - if ( index != -1 ) { - ary.splice( index, 1 ); - } -}; - -// ----- getParent ----- // - -utils.getParent = function( elem, selector ) { - while ( elem.parentNode && elem != document.body ) { - elem = elem.parentNode; - if ( matchesSelector( elem, selector ) ) { - return elem; - } - } -}; - -// ----- getQueryElement ----- // - -// use element as selector string -utils.getQueryElement = function( elem ) { - if ( typeof elem == 'string' ) { - return document.querySelector( elem ); - } - return elem; -}; - -// ----- handleEvent ----- // - -// enable .ontype to trigger from .addEventListener( elem, 'type' ) -utils.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -// ----- filterFindElements ----- // - -utils.filterFindElements = function( elems, selector ) { - // make array of elems - elems = utils.makeArray( elems ); - var ffElems = []; - - elems.forEach( function( elem ) { - // check that elem is an actual element - if ( !( elem instanceof HTMLElement ) ) { - return; - } - // add elem if no selector - if ( !selector ) { - ffElems.push( elem ); - return; - } - // filter & find items if we have a selector - // filter - if ( matchesSelector( elem, selector ) ) { - ffElems.push( elem ); - } - // find children - var childElems = elem.querySelectorAll( selector ); - // concat childElems to filterFound array - for ( var i=0; i < childElems.length; i++ ) { - ffElems.push( childElems[i] ); - } - }); - - return ffElems; -}; - -// ----- debounceMethod ----- // - -utils.debounceMethod = function( _class, methodName, threshold ) { - threshold = threshold || 100; - // original method - var method = _class.prototype[ methodName ]; - var timeoutName = methodName + 'Timeout'; - - _class.prototype[ methodName ] = function() { - var timeout = this[ timeoutName ]; - clearTimeout( timeout ); - - var args = arguments; - var _this = this; - this[ timeoutName ] = setTimeout( function() { - method.apply( _this, args ); - delete _this[ timeoutName ]; - }, threshold ); - }; -}; - -// ----- docReady ----- // - -utils.docReady = function( callback ) { - var readyState = document.readyState; - if ( readyState == 'complete' || readyState == 'interactive' ) { - // do async to allow for other scripts to run. metafizzy/flickity#441 - setTimeout( callback ); - } else { - document.addEventListener( 'DOMContentLoaded', callback ); - } -}; - -// ----- htmlInit ----- // - -// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/ -utils.toDashed = function( str ) { - return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) { - return $1 + '-' + $2; - }).toLowerCase(); -}; - -var console = window.console; -/** - * allow user to initialize classes via [data-namespace] or .js-namespace class - * htmlInit( Widget, 'widgetName' ) - * options are parsed from data-namespace-options - */ -utils.htmlInit = function( WidgetClass, namespace ) { - utils.docReady( function() { - var dashedNamespace = utils.toDashed( namespace ); - var dataAttr = 'data-' + dashedNamespace; - var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' ); - var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace ); - var elems = utils.makeArray( dataAttrElems ) - .concat( utils.makeArray( jsDashElems ) ); - var dataOptionsAttr = dataAttr + '-options'; - var jQuery = window.jQuery; - - elems.forEach( function( elem ) { - var attr = elem.getAttribute( dataAttr ) || - elem.getAttribute( dataOptionsAttr ); - var options; - try { - options = attr && JSON.parse( attr ); - } catch ( error ) { - // log error, do not initialize - if ( console ) { - console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className + - ': ' + error ); - } - return; - } - // initialize - var instance = new WidgetClass( elem, options ); - // make available via $().data('namespace') - if ( jQuery ) { - jQuery.data( elem, namespace, instance ); - } - }); - - }); -}; - -// ----- ----- // - -return utils; - -})); - - -/***/ }), - -/***/ "./node_modules/get-size/get-size.js": -/*!*******************************************!*\ - !*** ./node_modules/get-size/get-size.js ***! - \*******************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - * getSize v2.0.3 - * measure size of elements - * MIT license - */ - -/* jshint browser: true, strict: true, undef: true, unused: true */ -/* globals console: false */ - -( function( window, factory ) { - /* jshint strict: false */ /* globals define, module */ - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -})( window, function factory() { -'use strict'; - -// -------------------------- helpers -------------------------- // - -// get a number from a string, not a percentage -function getStyleSize( value ) { - var num = parseFloat( value ); - // not a percent like '100%', and a number - var isValid = value.indexOf('%') == -1 && !isNaN( num ); - return isValid && num; -} - -function noop() {} - -var logError = typeof console == 'undefined' ? noop : - function( message ) { - console.error( message ); - }; - -// -------------------------- measurements -------------------------- // - -var measurements = [ - 'paddingLeft', - 'paddingRight', - 'paddingTop', - 'paddingBottom', - 'marginLeft', - 'marginRight', - 'marginTop', - 'marginBottom', - 'borderLeftWidth', - 'borderRightWidth', - 'borderTopWidth', - 'borderBottomWidth' -]; - -var measurementsLength = measurements.length; - -function getZeroSize() { - var size = { - width: 0, - height: 0, - innerWidth: 0, - innerHeight: 0, - outerWidth: 0, - outerHeight: 0 - }; - for ( var i=0; i < measurementsLength; i++ ) { - var measurement = measurements[i]; - size[ measurement ] = 0; - } - return size; -} - -// -------------------------- getStyle -------------------------- // - -/** - * getStyle, get style of element, check for Firefox bug - * https://bugzilla.mozilla.org/show_bug.cgi?id=548397 - */ -function getStyle( elem ) { - var style = getComputedStyle( elem ); - if ( !style ) { - logError( 'Style returned ' + style + - '. Are you running this code in a hidden iframe on Firefox? ' + - 'See https://bit.ly/getsizebug1' ); - } - return style; -} - -// -------------------------- setup -------------------------- // - -var isSetup = false; - -var isBoxSizeOuter; - -/** - * setup - * check isBoxSizerOuter - * do on first getSize() rather than on page load for Firefox bug - */ -function setup() { - // setup once - if ( isSetup ) { - return; - } - isSetup = true; - - // -------------------------- box sizing -------------------------- // - - /** - * Chrome & Safari measure the outer-width on style.width on border-box elems - * IE11 & Firefox<29 measures the inner-width - */ - var div = document.createElement('div'); - div.style.width = '200px'; - div.style.padding = '1px 2px 3px 4px'; - div.style.borderStyle = 'solid'; - div.style.borderWidth = '1px 2px 3px 4px'; - div.style.boxSizing = 'border-box'; - - var body = document.body || document.documentElement; - body.appendChild( div ); - var style = getStyle( div ); - // round value for browser zoom. desandro/masonry#928 - isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200; - getSize.isBoxSizeOuter = isBoxSizeOuter; - - body.removeChild( div ); -} - -// -------------------------- getSize -------------------------- // - -function getSize( elem ) { - setup(); - - // use querySeletor if elem is string - if ( typeof elem == 'string' ) { - elem = document.querySelector( elem ); - } - - // do not proceed on non-objects - if ( !elem || typeof elem != 'object' || !elem.nodeType ) { - return; - } - - var style = getStyle( elem ); - - // if hidden, everything is 0 - if ( style.display == 'none' ) { - return getZeroSize(); - } - - var size = {}; - size.width = elem.offsetWidth; - size.height = elem.offsetHeight; - - var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box'; - - // get all measurements - for ( var i=0; i < measurementsLength; i++ ) { - var measurement = measurements[i]; - var value = style[ measurement ]; - var num = parseFloat( value ); - // any 'auto', 'medium' value will be 0 - size[ measurement ] = !isNaN( num ) ? num : 0; - } - - var paddingWidth = size.paddingLeft + size.paddingRight; - var paddingHeight = size.paddingTop + size.paddingBottom; - var marginWidth = size.marginLeft + size.marginRight; - var marginHeight = size.marginTop + size.marginBottom; - var borderWidth = size.borderLeftWidth + size.borderRightWidth; - var borderHeight = size.borderTopWidth + size.borderBottomWidth; - - var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter; - - // overwrite width and height if we can get it from style - var styleWidth = getStyleSize( style.width ); - if ( styleWidth !== false ) { - size.width = styleWidth + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth ); - } - - var styleHeight = getStyleSize( style.height ); - if ( styleHeight !== false ) { - size.height = styleHeight + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight ); - } - - size.innerWidth = size.width - ( paddingWidth + borderWidth ); - size.innerHeight = size.height - ( paddingHeight + borderHeight ); - - size.outerWidth = size.width + marginWidth; - size.outerHeight = size.height + marginHeight; - - return size; -} - -return getSize; - -}); - - -/***/ }), - -/***/ "./node_modules/imagesloaded/imagesloaded.js": -/*!***************************************************!*\ - !*** ./node_modules/imagesloaded/imagesloaded.js ***! - \***************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -/*! - * imagesLoaded v5.0.0 - * JavaScript is all like "You images are done yet or what?" - * MIT License - */ - -( function( window, factory ) { - // universal module definition - if ( true && module.exports ) { - // CommonJS - module.exports = factory( window, __webpack_require__(/*! ev-emitter */ "./node_modules/ev-emitter/ev-emitter.js") ); - } else { - // browser global - window.imagesLoaded = factory( window, window.EvEmitter ); - } - -} )( typeof window !== 'undefined' ? window : this, - function factory( window, EvEmitter ) { - -let $ = window.jQuery; -let console = window.console; - -// -------------------------- helpers -------------------------- // - -// turn element or nodeList into an array -function makeArray( obj ) { - // use object if already an array - if ( Array.isArray( obj ) ) return obj; - - let isArrayLike = typeof obj == 'object' && typeof obj.length == 'number'; - // convert nodeList to array - if ( isArrayLike ) return [ ...obj ]; - - // array of single index - return [ obj ]; -} - -// -------------------------- imagesLoaded -------------------------- // - -/** - * @param {[Array, Element, NodeList, String]} elem - * @param {[Object, Function]} options - if function, use as callback - * @param {Function} onAlways - callback function - * @returns {ImagesLoaded} - */ -function ImagesLoaded( elem, options, onAlways ) { - // coerce ImagesLoaded() without new, to be new ImagesLoaded() - if ( !( this instanceof ImagesLoaded ) ) { - return new ImagesLoaded( elem, options, onAlways ); - } - // use elem as selector string - let queryElem = elem; - if ( typeof elem == 'string' ) { - queryElem = document.querySelectorAll( elem ); - } - // bail if bad element - if ( !queryElem ) { - console.error(`Bad element for imagesLoaded ${queryElem || elem}`); - return; - } - - this.elements = makeArray( queryElem ); - this.options = {}; - // shift arguments if no options set - if ( typeof options == 'function' ) { - onAlways = options; - } else { - Object.assign( this.options, options ); - } - - if ( onAlways ) this.on( 'always', onAlways ); - - this.getImages(); - // add jQuery Deferred object - if ( $ ) this.jqDeferred = new $.Deferred(); - - // HACK check async to allow time to bind listeners - setTimeout( this.check.bind( this ) ); -} - -ImagesLoaded.prototype = Object.create( EvEmitter.prototype ); - -ImagesLoaded.prototype.getImages = function() { - this.images = []; - - // filter & find items if we have an item selector - this.elements.forEach( this.addElementImages, this ); -}; - -const elementNodeTypes = [ 1, 9, 11 ]; - -/** - * @param {Node} elem - */ -ImagesLoaded.prototype.addElementImages = function( elem ) { - // filter siblings - if ( elem.nodeName === 'IMG' ) { - this.addImage( elem ); - } - // get background image on element - if ( this.options.background === true ) { - this.addElementBackgroundImages( elem ); - } - - // find children - // no non-element nodes, #143 - let { nodeType } = elem; - if ( !nodeType || !elementNodeTypes.includes( nodeType ) ) return; - - let childImgs = elem.querySelectorAll('img'); - // concat childElems to filterFound array - for ( let img of childImgs ) { - this.addImage( img ); - } - - // get child background images - if ( typeof this.options.background == 'string' ) { - let children = elem.querySelectorAll( this.options.background ); - for ( let child of children ) { - this.addElementBackgroundImages( child ); - } - } -}; - -const reURL = /url\((['"])?(.*?)\1\)/gi; - -ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) { - let style = getComputedStyle( elem ); - // Firefox returns null if in a hidden iframe https://bugzil.la/548397 - if ( !style ) return; - - // get url inside url("...") - let matches = reURL.exec( style.backgroundImage ); - while ( matches !== null ) { - let url = matches && matches[2]; - if ( url ) { - this.addBackground( url, elem ); - } - matches = reURL.exec( style.backgroundImage ); - } -}; - -/** - * @param {Image} img - */ -ImagesLoaded.prototype.addImage = function( img ) { - let loadingImage = new LoadingImage( img ); - this.images.push( loadingImage ); -}; - -ImagesLoaded.prototype.addBackground = function( url, elem ) { - let background = new Background( url, elem ); - this.images.push( background ); -}; - -ImagesLoaded.prototype.check = function() { - this.progressedCount = 0; - this.hasAnyBroken = false; - // complete if no images - if ( !this.images.length ) { - this.complete(); - return; - } - - /* eslint-disable-next-line func-style */ - let onProgress = ( image, elem, message ) => { - // HACK - Chrome triggers event before object properties have changed. #83 - setTimeout( () => { - this.progress( image, elem, message ); - } ); - }; - - this.images.forEach( function( loadingImage ) { - loadingImage.once( 'progress', onProgress ); - loadingImage.check(); - } ); -}; - -ImagesLoaded.prototype.progress = function( image, elem, message ) { - this.progressedCount++; - this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded; - // progress event - this.emitEvent( 'progress', [ this, image, elem ] ); - if ( this.jqDeferred && this.jqDeferred.notify ) { - this.jqDeferred.notify( this, image ); - } - // check if completed - if ( this.progressedCount === this.images.length ) { - this.complete(); - } - - if ( this.options.debug && console ) { - console.log( `progress: ${message}`, image, elem ); - } -}; - -ImagesLoaded.prototype.complete = function() { - let eventName = this.hasAnyBroken ? 'fail' : 'done'; - this.isComplete = true; - this.emitEvent( eventName, [ this ] ); - this.emitEvent( 'always', [ this ] ); - if ( this.jqDeferred ) { - let jqMethod = this.hasAnyBroken ? 'reject' : 'resolve'; - this.jqDeferred[ jqMethod ]( this ); - } -}; - -// -------------------------- -------------------------- // - -function LoadingImage( img ) { - this.img = img; -} - -LoadingImage.prototype = Object.create( EvEmitter.prototype ); - -LoadingImage.prototype.check = function() { - // If complete is true and browser supports natural sizes, - // try to check for image status manually. - let isComplete = this.getIsImageComplete(); - if ( isComplete ) { - // report based on naturalWidth - this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' ); - return; - } - - // If none of the checks above matched, simulate loading on detached element. - this.proxyImage = new Image(); - // add crossOrigin attribute. #204 - if ( this.img.crossOrigin ) { - this.proxyImage.crossOrigin = this.img.crossOrigin; - } - this.proxyImage.addEventListener( 'load', this ); - this.proxyImage.addEventListener( 'error', this ); - // bind to image as well for Firefox. #191 - this.img.addEventListener( 'load', this ); - this.img.addEventListener( 'error', this ); - this.proxyImage.src = this.img.currentSrc || this.img.src; -}; - -LoadingImage.prototype.getIsImageComplete = function() { - // check for non-zero, non-undefined naturalWidth - // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671 - return this.img.complete && this.img.naturalWidth; -}; - -LoadingImage.prototype.confirm = function( isLoaded, message ) { - this.isLoaded = isLoaded; - let { parentNode } = this.img; - // emit progress with parent or self - let elem = parentNode.nodeName === 'PICTURE' ? parentNode : this.img; - this.emitEvent( 'progress', [ this, elem, message ] ); -}; - -// ----- events ----- // - -// trigger specified handler for event type -LoadingImage.prototype.handleEvent = function( event ) { - let method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -LoadingImage.prototype.onload = function() { - this.confirm( true, 'onload' ); - this.unbindEvents(); -}; - -LoadingImage.prototype.onerror = function() { - this.confirm( false, 'onerror' ); - this.unbindEvents(); -}; - -LoadingImage.prototype.unbindEvents = function() { - this.proxyImage.removeEventListener( 'load', this ); - this.proxyImage.removeEventListener( 'error', this ); - this.img.removeEventListener( 'load', this ); - this.img.removeEventListener( 'error', this ); -}; - -// -------------------------- Background -------------------------- // - -function Background( url, element ) { - this.url = url; - this.element = element; - this.img = new Image(); -} - -// inherit LoadingImage prototype -Background.prototype = Object.create( LoadingImage.prototype ); - -Background.prototype.check = function() { - this.img.addEventListener( 'load', this ); - this.img.addEventListener( 'error', this ); - this.img.src = this.url; - // check if image is already complete - let isComplete = this.getIsImageComplete(); - if ( isComplete ) { - this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' ); - this.unbindEvents(); - } -}; - -Background.prototype.unbindEvents = function() { - this.img.removeEventListener( 'load', this ); - this.img.removeEventListener( 'error', this ); -}; - -Background.prototype.confirm = function( isLoaded, message ) { - this.isLoaded = isLoaded; - this.emitEvent( 'progress', [ this, this.element, message ] ); -}; - -// -------------------------- jQuery -------------------------- // - -ImagesLoaded.makeJQueryPlugin = function( jQuery ) { - jQuery = jQuery || window.jQuery; - if ( !jQuery ) return; - - // set local variable - $ = jQuery; - // $().imagesLoaded() - $.fn.imagesLoaded = function( options, onAlways ) { - let instance = new ImagesLoaded( this, options, onAlways ); - return instance.jqDeferred.promise( $( this ) ); - }; -}; -// try making plugin -ImagesLoaded.makeJQueryPlugin(); - -// -------------------------- -------------------------- // - -return ImagesLoaded; - -} ); - - -/***/ }), - -/***/ "./node_modules/masonry-layout/masonry.js": -/*!************************************************!*\ - !*** ./node_modules/masonry-layout/masonry.js ***! - \************************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - * Masonry v4.2.2 - * Cascading grid layout library - * https://masonry.desandro.com - * MIT License - * by David DeSandro - */ - -( function( window, factory ) { - // universal module definition - /* jshint strict: false */ /*globals define, module, require */ - if ( true ) { - // AMD - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! outlayer/outlayer */ "./node_modules/outlayer/outlayer.js"), - __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js") - ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( Outlayer, getSize ) { - -'use strict'; - -// -------------------------- masonryDefinition -------------------------- // - - // create an Outlayer layout class - var Masonry = Outlayer.create('masonry'); - // isFitWidth -> fitWidth - Masonry.compatOptions.fitWidth = 'isFitWidth'; - - var proto = Masonry.prototype; - - proto._resetLayout = function() { - this.getSize(); - this._getMeasurement( 'columnWidth', 'outerWidth' ); - this._getMeasurement( 'gutter', 'outerWidth' ); - this.measureColumns(); - - // reset column Y - this.colYs = []; - for ( var i=0; i < this.cols; i++ ) { - this.colYs.push( 0 ); - } - - this.maxY = 0; - this.horizontalColIndex = 0; - }; - - proto.measureColumns = function() { - this.getContainerWidth(); - // if columnWidth is 0, default to outerWidth of first item - if ( !this.columnWidth ) { - var firstItem = this.items[0]; - var firstItemElem = firstItem && firstItem.element; - // columnWidth fall back to item of first element - this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth || - // if first elem has no width, default to size of container - this.containerWidth; - } - - var columnWidth = this.columnWidth += this.gutter; - - // calculate columns - var containerWidth = this.containerWidth + this.gutter; - var cols = containerWidth / columnWidth; - // fix rounding errors, typically with gutters - var excess = columnWidth - containerWidth % columnWidth; - // if overshoot is less than a pixel, round up, otherwise floor it - var mathMethod = excess && excess < 1 ? 'round' : 'floor'; - cols = Math[ mathMethod ]( cols ); - this.cols = Math.max( cols, 1 ); - }; - - proto.getContainerWidth = function() { - // container is parent if fit width - var isFitWidth = this._getOption('fitWidth'); - var container = isFitWidth ? this.element.parentNode : this.element; - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var size = getSize( container ); - this.containerWidth = size && size.innerWidth; - }; - - proto._getItemLayoutPosition = function( item ) { - item.getSize(); - // how many columns does this brick span - var remainder = item.size.outerWidth % this.columnWidth; - var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil'; - // round if off by 1 pixel, otherwise use ceil - var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth ); - colSpan = Math.min( colSpan, this.cols ); - // use horizontal or top column position - var colPosMethod = this.options.horizontalOrder ? - '_getHorizontalColPosition' : '_getTopColPosition'; - var colPosition = this[ colPosMethod ]( colSpan, item ); - // position the brick - var position = { - x: this.columnWidth * colPosition.col, - y: colPosition.y - }; - // apply setHeight to necessary columns - var setHeight = colPosition.y + item.size.outerHeight; - var setMax = colSpan + colPosition.col; - for ( var i = colPosition.col; i < setMax; i++ ) { - this.colYs[i] = setHeight; - } - - return position; - }; - - proto._getTopColPosition = function( colSpan ) { - var colGroup = this._getTopColGroup( colSpan ); - // get the minimum Y value from the columns - var minimumY = Math.min.apply( Math, colGroup ); - - return { - col: colGroup.indexOf( minimumY ), - y: minimumY, - }; - }; - - /** - * @param {Number} colSpan - number of columns the element spans - * @returns {Array} colGroup - */ - proto._getTopColGroup = function( colSpan ) { - if ( colSpan < 2 ) { - // if brick spans only one column, use all the column Ys - return this.colYs; - } - - var colGroup = []; - // how many different places could this brick fit horizontally - var groupCount = this.cols + 1 - colSpan; - // for each group potential horizontal position - for ( var i = 0; i < groupCount; i++ ) { - colGroup[i] = this._getColGroupY( i, colSpan ); - } - return colGroup; - }; - - proto._getColGroupY = function( col, colSpan ) { - if ( colSpan < 2 ) { - return this.colYs[ col ]; - } - // make an array of colY values for that one group - var groupColYs = this.colYs.slice( col, col + colSpan ); - // and get the max value of the array - return Math.max.apply( Math, groupColYs ); - }; - - // get column position based on horizontal index. #873 - proto._getHorizontalColPosition = function( colSpan, item ) { - var col = this.horizontalColIndex % this.cols; - var isOver = colSpan > 1 && col + colSpan > this.cols; - // shift to next row if item can't fit on current row - col = isOver ? 0 : col; - // don't let zero-size items take up space - var hasSize = item.size.outerWidth && item.size.outerHeight; - this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex; - - return { - col: col, - y: this._getColGroupY( col, colSpan ), - }; - }; - - proto._manageStamp = function( stamp ) { - var stampSize = getSize( stamp ); - var offset = this._getElementOffset( stamp ); - // get the columns that this stamp affects - var isOriginLeft = this._getOption('originLeft'); - var firstX = isOriginLeft ? offset.left : offset.right; - var lastX = firstX + stampSize.outerWidth; - var firstCol = Math.floor( firstX / this.columnWidth ); - firstCol = Math.max( 0, firstCol ); - var lastCol = Math.floor( lastX / this.columnWidth ); - // lastCol should not go over if multiple of columnWidth #425 - lastCol -= lastX % this.columnWidth ? 0 : 1; - lastCol = Math.min( this.cols - 1, lastCol ); - // set colYs to bottom of the stamp - - var isOriginTop = this._getOption('originTop'); - var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) + - stampSize.outerHeight; - for ( var i = firstCol; i <= lastCol; i++ ) { - this.colYs[i] = Math.max( stampMaxY, this.colYs[i] ); - } - }; - - proto._getContainerSize = function() { - this.maxY = Math.max.apply( Math, this.colYs ); - var size = { - height: this.maxY - }; - - if ( this._getOption('fitWidth') ) { - size.width = this._getContainerFitWidth(); - } - - return size; - }; - - proto._getContainerFitWidth = function() { - var unusedCols = 0; - // count unused columns - var i = this.cols; - while ( --i ) { - if ( this.colYs[i] !== 0 ) { - break; - } - unusedCols++; - } - // fit container to columns that have been used - return ( this.cols - unusedCols ) * this.columnWidth - this.gutter; - }; - - proto.needsResizeLayout = function() { - var previousWidth = this.containerWidth; - this.getContainerWidth(); - return previousWidth != this.containerWidth; - }; - - return Masonry; - -})); - - -/***/ }), - -/***/ "./node_modules/outlayer/item.js": -/*!***************************************!*\ - !*** ./node_modules/outlayer/item.js ***! - \***************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * Outlayer Item - */ - -( function( window, factory ) { - // universal module definition - /* jshint strict: false */ /* globals define, module, require */ - if ( true ) { - // AMD - RequireJS - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js"), - __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js") - ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( EvEmitter, getSize ) { -'use strict'; - -// ----- helpers ----- // - -function isEmptyObj( obj ) { - for ( var prop in obj ) { - return false; - } - prop = null; - return true; -} - -// -------------------------- CSS3 support -------------------------- // - - -var docElemStyle = document.documentElement.style; - -var transitionProperty = typeof docElemStyle.transition == 'string' ? - 'transition' : 'WebkitTransition'; -var transformProperty = typeof docElemStyle.transform == 'string' ? - 'transform' : 'WebkitTransform'; - -var transitionEndEvent = { - WebkitTransition: 'webkitTransitionEnd', - transition: 'transitionend' -}[ transitionProperty ]; - -// cache all vendor properties that could have vendor prefix -var vendorProperties = { - transform: transformProperty, - transition: transitionProperty, - transitionDuration: transitionProperty + 'Duration', - transitionProperty: transitionProperty + 'Property', - transitionDelay: transitionProperty + 'Delay' -}; - -// -------------------------- Item -------------------------- // - -function Item( element, layout ) { - if ( !element ) { - return; - } - - this.element = element; - // parent layout class, i.e. Masonry, Isotope, or Packery - this.layout = layout; - this.position = { - x: 0, - y: 0 - }; - - this._create(); -} - -// inherit EvEmitter -var proto = Item.prototype = Object.create( EvEmitter.prototype ); -proto.constructor = Item; - -proto._create = function() { - // transition objects - this._transn = { - ingProperties: {}, - clean: {}, - onEnd: {} - }; - - this.css({ - position: 'absolute' - }); -}; - -// trigger specified handler for event type -proto.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -proto.getSize = function() { - this.size = getSize( this.element ); -}; - -/** - * apply CSS styles to element - * @param {Object} style - */ -proto.css = function( style ) { - var elemStyle = this.element.style; - - for ( var prop in style ) { - // use vendor property if available - var supportedProp = vendorProperties[ prop ] || prop; - elemStyle[ supportedProp ] = style[ prop ]; - } -}; - - // measure position, and sets it -proto.getPosition = function() { - var style = getComputedStyle( this.element ); - var isOriginLeft = this.layout._getOption('originLeft'); - var isOriginTop = this.layout._getOption('originTop'); - var xValue = style[ isOriginLeft ? 'left' : 'right' ]; - var yValue = style[ isOriginTop ? 'top' : 'bottom' ]; - var x = parseFloat( xValue ); - var y = parseFloat( yValue ); - // convert percent to pixels - var layoutSize = this.layout.size; - if ( xValue.indexOf('%') != -1 ) { - x = ( x / 100 ) * layoutSize.width; - } - if ( yValue.indexOf('%') != -1 ) { - y = ( y / 100 ) * layoutSize.height; - } - // clean up 'auto' or other non-integer values - x = isNaN( x ) ? 0 : x; - y = isNaN( y ) ? 0 : y; - // remove padding from measurement - x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight; - y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom; - - this.position.x = x; - this.position.y = y; -}; - -// set settled position, apply padding -proto.layoutPosition = function() { - var layoutSize = this.layout.size; - var style = {}; - var isOriginLeft = this.layout._getOption('originLeft'); - var isOriginTop = this.layout._getOption('originTop'); - - // x - var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight'; - var xProperty = isOriginLeft ? 'left' : 'right'; - var xResetProperty = isOriginLeft ? 'right' : 'left'; - - var x = this.position.x + layoutSize[ xPadding ]; - // set in percentage or pixels - style[ xProperty ] = this.getXValue( x ); - // reset other property - style[ xResetProperty ] = ''; - - // y - var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom'; - var yProperty = isOriginTop ? 'top' : 'bottom'; - var yResetProperty = isOriginTop ? 'bottom' : 'top'; - - var y = this.position.y + layoutSize[ yPadding ]; - // set in percentage or pixels - style[ yProperty ] = this.getYValue( y ); - // reset other property - style[ yResetProperty ] = ''; - - this.css( style ); - this.emitEvent( 'layout', [ this ] ); -}; - -proto.getXValue = function( x ) { - var isHorizontal = this.layout._getOption('horizontal'); - return this.layout.options.percentPosition && !isHorizontal ? - ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px'; -}; - -proto.getYValue = function( y ) { - var isHorizontal = this.layout._getOption('horizontal'); - return this.layout.options.percentPosition && isHorizontal ? - ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px'; -}; - -proto._transitionTo = function( x, y ) { - this.getPosition(); - // get current x & y from top/left - var curX = this.position.x; - var curY = this.position.y; - - var didNotMove = x == this.position.x && y == this.position.y; - - // save end position - this.setPosition( x, y ); - - // if did not move and not transitioning, just go to layout - if ( didNotMove && !this.isTransitioning ) { - this.layoutPosition(); - return; - } - - var transX = x - curX; - var transY = y - curY; - var transitionStyle = {}; - transitionStyle.transform = this.getTranslate( transX, transY ); - - this.transition({ - to: transitionStyle, - onTransitionEnd: { - transform: this.layoutPosition - }, - isCleaning: true - }); -}; - -proto.getTranslate = function( x, y ) { - // flip cooridinates if origin on right or bottom - var isOriginLeft = this.layout._getOption('originLeft'); - var isOriginTop = this.layout._getOption('originTop'); - x = isOriginLeft ? x : -x; - y = isOriginTop ? y : -y; - return 'translate3d(' + x + 'px, ' + y + 'px, 0)'; -}; - -// non transition + transform support -proto.goTo = function( x, y ) { - this.setPosition( x, y ); - this.layoutPosition(); -}; - -proto.moveTo = proto._transitionTo; - -proto.setPosition = function( x, y ) { - this.position.x = parseFloat( x ); - this.position.y = parseFloat( y ); -}; - -// ----- transition ----- // - -/** - * @param {Object} style - CSS - * @param {Function} onTransitionEnd - */ - -// non transition, just trigger callback -proto._nonTransition = function( args ) { - this.css( args.to ); - if ( args.isCleaning ) { - this._removeStyles( args.to ); - } - for ( var prop in args.onTransitionEnd ) { - args.onTransitionEnd[ prop ].call( this ); - } -}; - -/** - * proper transition - * @param {Object} args - arguments - * @param {Object} to - style to transition to - * @param {Object} from - style to start transition from - * @param {Boolean} isCleaning - removes transition styles after transition - * @param {Function} onTransitionEnd - callback - */ -proto.transition = function( args ) { - // redirect to nonTransition if no transition duration - if ( !parseFloat( this.layout.options.transitionDuration ) ) { - this._nonTransition( args ); - return; - } - - var _transition = this._transn; - // keep track of onTransitionEnd callback by css property - for ( var prop in args.onTransitionEnd ) { - _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ]; - } - // keep track of properties that are transitioning - for ( prop in args.to ) { - _transition.ingProperties[ prop ] = true; - // keep track of properties to clean up when transition is done - if ( args.isCleaning ) { - _transition.clean[ prop ] = true; - } - } - - // set from styles - if ( args.from ) { - this.css( args.from ); - // force redraw. http://blog.alexmaccaw.com/css-transitions - var h = this.element.offsetHeight; - // hack for JSHint to hush about unused var - h = null; - } - // enable transition - this.enableTransition( args.to ); - // set styles that are transitioning - this.css( args.to ); - - this.isTransitioning = true; - -}; - -// dash before all cap letters, including first for -// WebkitTransform => -webkit-transform -function toDashedAll( str ) { - return str.replace( /([A-Z])/g, function( $1 ) { - return '-' + $1.toLowerCase(); - }); -} - -var transitionProps = 'opacity,' + toDashedAll( transformProperty ); - -proto.enableTransition = function(/* style */) { - // HACK changing transitionProperty during a transition - // will cause transition to jump - if ( this.isTransitioning ) { - return; - } - - // make `transition: foo, bar, baz` from style object - // HACK un-comment this when enableTransition can work - // while a transition is happening - // var transitionValues = []; - // for ( var prop in style ) { - // // dash-ify camelCased properties like WebkitTransition - // prop = vendorProperties[ prop ] || prop; - // transitionValues.push( toDashedAll( prop ) ); - // } - // munge number to millisecond, to match stagger - var duration = this.layout.options.transitionDuration; - duration = typeof duration == 'number' ? duration + 'ms' : duration; - // enable transition styles - this.css({ - transitionProperty: transitionProps, - transitionDuration: duration, - transitionDelay: this.staggerDelay || 0 - }); - // listen for transition end event - this.element.addEventListener( transitionEndEvent, this, false ); -}; - -// ----- events ----- // - -proto.onwebkitTransitionEnd = function( event ) { - this.ontransitionend( event ); -}; - -proto.onotransitionend = function( event ) { - this.ontransitionend( event ); -}; - -// properties that I munge to make my life easier -var dashedVendorProperties = { - '-webkit-transform': 'transform' -}; - -proto.ontransitionend = function( event ) { - // disregard bubbled events from children - if ( event.target !== this.element ) { - return; - } - var _transition = this._transn; - // get property name of transitioned property, convert to prefix-free - var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName; - - // remove property that has completed transitioning - delete _transition.ingProperties[ propertyName ]; - // check if any properties are still transitioning - if ( isEmptyObj( _transition.ingProperties ) ) { - // all properties have completed transitioning - this.disableTransition(); - } - // clean style - if ( propertyName in _transition.clean ) { - // clean up style - this.element.style[ event.propertyName ] = ''; - delete _transition.clean[ propertyName ]; - } - // trigger onTransitionEnd callback - if ( propertyName in _transition.onEnd ) { - var onTransitionEnd = _transition.onEnd[ propertyName ]; - onTransitionEnd.call( this ); - delete _transition.onEnd[ propertyName ]; - } - - this.emitEvent( 'transitionEnd', [ this ] ); -}; - -proto.disableTransition = function() { - this.removeTransitionStyles(); - this.element.removeEventListener( transitionEndEvent, this, false ); - this.isTransitioning = false; -}; - -/** - * removes style property from element - * @param {Object} style -**/ -proto._removeStyles = function( style ) { - // clean up transition styles - var cleanStyle = {}; - for ( var prop in style ) { - cleanStyle[ prop ] = ''; - } - this.css( cleanStyle ); -}; - -var cleanTransitionStyle = { - transitionProperty: '', - transitionDuration: '', - transitionDelay: '' -}; - -proto.removeTransitionStyles = function() { - // remove transition - this.css( cleanTransitionStyle ); -}; - -// ----- stagger ----- // - -proto.stagger = function( delay ) { - delay = isNaN( delay ) ? 0 : delay; - this.staggerDelay = delay + 'ms'; -}; - -// ----- show/hide/remove ----- // - -// remove element from DOM -proto.removeElem = function() { - this.element.parentNode.removeChild( this.element ); - // remove display: none - this.css({ display: '' }); - this.emitEvent( 'remove', [ this ] ); -}; - -proto.remove = function() { - // just remove element if no transition support or no transition - if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) { - this.removeElem(); - return; - } - - // start transition - this.once( 'transitionEnd', function() { - this.removeElem(); - }); - this.hide(); -}; - -proto.reveal = function() { - delete this.isHidden; - // remove display: none - this.css({ display: '' }); - - var options = this.layout.options; - - var onTransitionEnd = {}; - var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle'); - onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd; - - this.transition({ - from: options.hiddenStyle, - to: options.visibleStyle, - isCleaning: true, - onTransitionEnd: onTransitionEnd - }); -}; - -proto.onRevealTransitionEnd = function() { - // check if still visible - // during transition, item may have been hidden - if ( !this.isHidden ) { - this.emitEvent('reveal'); - } -}; - -/** - * get style property use for hide/reveal transition end - * @param {String} styleProperty - hiddenStyle/visibleStyle - * @returns {String} - */ -proto.getHideRevealTransitionEndProperty = function( styleProperty ) { - var optionStyle = this.layout.options[ styleProperty ]; - // use opacity - if ( optionStyle.opacity ) { - return 'opacity'; - } - // get first property - for ( var prop in optionStyle ) { - return prop; - } -}; - -proto.hide = function() { - // set flag - this.isHidden = true; - // remove display: none - this.css({ display: '' }); - - var options = this.layout.options; - - var onTransitionEnd = {}; - var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle'); - onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd; - - this.transition({ - from: options.visibleStyle, - to: options.hiddenStyle, - // keep hidden stuff hidden - isCleaning: true, - onTransitionEnd: onTransitionEnd - }); -}; - -proto.onHideTransitionEnd = function() { - // check if still hidden - // during transition, item may have been un-hidden - if ( this.isHidden ) { - this.css({ display: 'none' }); - this.emitEvent('hide'); - } -}; - -proto.destroy = function() { - this.css({ - position: '', - left: '', - right: '', - top: '', - bottom: '', - transition: '', - transform: '' - }); -}; - -return Item; - -})); - - -/***/ }), - -/***/ "./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js": -/*!*********************************************************************!*\ - !*** ./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js ***! - \*********************************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * EvEmitter v1.1.0 - * Lil' event emitter - * MIT License - */ - -/* jshint unused: true, undef: true, strict: true */ - -( function( global, factory ) { - // universal module definition - /* jshint strict: false */ /* globals define, module, window */ - if ( true ) { - // AMD - RequireJS - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( typeof window != 'undefined' ? window : this, function() { - -"use strict"; - -function EvEmitter() {} - -var proto = EvEmitter.prototype; - -proto.on = function( eventName, listener ) { - if ( !eventName || !listener ) { - return; - } - // set events hash - var events = this._events = this._events || {}; - // set listeners array - var listeners = events[ eventName ] = events[ eventName ] || []; - // only add once - if ( listeners.indexOf( listener ) == -1 ) { - listeners.push( listener ); - } - - return this; -}; - -proto.once = function( eventName, listener ) { - if ( !eventName || !listener ) { - return; - } - // add event - this.on( eventName, listener ); - // set once flag - // set onceEvents hash - var onceEvents = this._onceEvents = this._onceEvents || {}; - // set onceListeners object - var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {}; - // set flag - onceListeners[ listener ] = true; - - return this; -}; - -proto.off = function( eventName, listener ) { - var listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) { - return; - } - var index = listeners.indexOf( listener ); - if ( index != -1 ) { - listeners.splice( index, 1 ); - } - - return this; -}; - -proto.emitEvent = function( eventName, args ) { - var listeners = this._events && this._events[ eventName ]; - if ( !listeners || !listeners.length ) { - return; - } - // copy over to avoid interference if .off() in listener - listeners = listeners.slice(0); - args = args || []; - // once stuff - var onceListeners = this._onceEvents && this._onceEvents[ eventName ]; - - for ( var i=0; i < listeners.length; i++ ) { - var listener = listeners[i] - var isOnce = onceListeners && onceListeners[ listener ]; - if ( isOnce ) { - // remove listener - // remove before trigger to prevent recursion - this.off( eventName, listener ); - // unset once flag - delete onceListeners[ listener ]; - } - // trigger listener - listener.apply( this, args ); - } - - return this; -}; - -proto.allOff = function() { - delete this._events; - delete this._onceEvents; -}; - -return EvEmitter; - -})); - - -/***/ }), - -/***/ "./node_modules/outlayer/outlayer.js": -/*!*******************************************!*\ - !*** ./node_modules/outlayer/outlayer.js ***! - \*******************************************/ -/***/ ((module, exports, __webpack_require__) => { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - * Outlayer v2.1.1 - * the brains and guts of a layout library - * MIT license - */ - -( function( window, factory ) { - 'use strict'; - // universal module definition - /* jshint strict: false */ /* globals define, module, require */ - if ( true ) { - // AMD - RequireJS - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ - __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js"), - __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js"), - __webpack_require__(/*! fizzy-ui-utils/utils */ "./node_modules/fizzy-ui-utils/utils.js"), - __webpack_require__(/*! ./item */ "./node_modules/outlayer/item.js") - ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( EvEmitter, getSize, utils, Item ) { - return factory( window, EvEmitter, getSize, utils, Item); - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} - -}( window, function factory( window, EvEmitter, getSize, utils, Item ) { -'use strict'; - -// ----- vars ----- // - -var console = window.console; -var jQuery = window.jQuery; -var noop = function() {}; - -// -------------------------- Outlayer -------------------------- // - -// globally unique identifiers -var GUID = 0; -// internal store of all Outlayer intances -var instances = {}; - - -/** - * @param {Element, String} element - * @param {Object} options - * @constructor - */ -function Outlayer( element, options ) { - var queryElement = utils.getQueryElement( element ); - if ( !queryElement ) { - if ( console ) { - console.error( 'Bad element for ' + this.constructor.namespace + - ': ' + ( queryElement || element ) ); - } - return; - } - this.element = queryElement; - // add jQuery - if ( jQuery ) { - this.$element = jQuery( this.element ); - } - - // options - this.options = utils.extend( {}, this.constructor.defaults ); - this.option( options ); - - // add id for Outlayer.getFromElement - var id = ++GUID; - this.element.outlayerGUID = id; // expando - instances[ id ] = this; // associate via id - - // kick it off - this._create(); - - var isInitLayout = this._getOption('initLayout'); - if ( isInitLayout ) { - this.layout(); - } -} - -// settings are for internal use only -Outlayer.namespace = 'outlayer'; -Outlayer.Item = Item; - -// default options -Outlayer.defaults = { - containerStyle: { - position: 'relative' - }, - initLayout: true, - originLeft: true, - originTop: true, - resize: true, - resizeContainer: true, - // item options - transitionDuration: '0.4s', - hiddenStyle: { - opacity: 0, - transform: 'scale(0.001)' - }, - visibleStyle: { - opacity: 1, - transform: 'scale(1)' - } -}; - -var proto = Outlayer.prototype; -// inherit EvEmitter -utils.extend( proto, EvEmitter.prototype ); - -/** - * set options - * @param {Object} opts - */ -proto.option = function( opts ) { - utils.extend( this.options, opts ); -}; - -/** - * get backwards compatible option value, check old name - */ -proto._getOption = function( option ) { - var oldOption = this.constructor.compatOptions[ option ]; - return oldOption && this.options[ oldOption ] !== undefined ? - this.options[ oldOption ] : this.options[ option ]; -}; - -Outlayer.compatOptions = { - // currentName: oldName - initLayout: 'isInitLayout', - horizontal: 'isHorizontal', - layoutInstant: 'isLayoutInstant', - originLeft: 'isOriginLeft', - originTop: 'isOriginTop', - resize: 'isResizeBound', - resizeContainer: 'isResizingContainer' -}; - -proto._create = function() { - // get items from children - this.reloadItems(); - // elements that affect layout, but are not laid out - this.stamps = []; - this.stamp( this.options.stamp ); - // set container style - utils.extend( this.element.style, this.options.containerStyle ); - - // bind resize method - var canBindResize = this._getOption('resize'); - if ( canBindResize ) { - this.bindResize(); - } -}; - -// goes through all children again and gets bricks in proper order -proto.reloadItems = function() { - // collection of item elements - this.items = this._itemize( this.element.children ); -}; - - -/** - * turn elements into Outlayer.Items to be used in layout - * @param {Array or NodeList or HTMLElement} elems - * @returns {Array} items - collection of new Outlayer Items - */ -proto._itemize = function( elems ) { - - var itemElems = this._filterFindItemElements( elems ); - var Item = this.constructor.Item; - - // create new Outlayer Items for collection - var items = []; - for ( var i=0; i < itemElems.length; i++ ) { - var elem = itemElems[i]; - var item = new Item( elem, this ); - items.push( item ); - } - - return items; -}; - -/** - * get item elements to be used in layout - * @param {Array or NodeList or HTMLElement} elems - * @returns {Array} items - item elements - */ -proto._filterFindItemElements = function( elems ) { - return utils.filterFindElements( elems, this.options.itemSelector ); -}; - -/** - * getter method for getting item elements - * @returns {Array} elems - collection of item elements - */ -proto.getItemElements = function() { - return this.items.map( function( item ) { - return item.element; - }); -}; - -// ----- init & layout ----- // - -/** - * lays out all items - */ -proto.layout = function() { - this._resetLayout(); - this._manageStamps(); - - // don't animate first layout - var layoutInstant = this._getOption('layoutInstant'); - var isInstant = layoutInstant !== undefined ? - layoutInstant : !this._isLayoutInited; - this.layoutItems( this.items, isInstant ); - - // flag for initalized - this._isLayoutInited = true; -}; - -// _init is alias for layout -proto._init = proto.layout; - -/** - * logic before any new layout - */ -proto._resetLayout = function() { - this.getSize(); -}; - - -proto.getSize = function() { - this.size = getSize( this.element ); -}; - -/** - * get measurement from option, for columnWidth, rowHeight, gutter - * if option is String -> get element from selector string, & get size of element - * if option is Element -> get size of element - * else use option as a number - * - * @param {String} measurement - * @param {String} size - width or height - * @private - */ -proto._getMeasurement = function( measurement, size ) { - var option = this.options[ measurement ]; - var elem; - if ( !option ) { - // default to 0 - this[ measurement ] = 0; - } else { - // use option as an element - if ( typeof option == 'string' ) { - elem = this.element.querySelector( option ); - } else if ( option instanceof HTMLElement ) { - elem = option; - } - // use size of element, if element - this[ measurement ] = elem ? getSize( elem )[ size ] : option; - } -}; - -/** - * layout a collection of item elements - * @api public - */ -proto.layoutItems = function( items, isInstant ) { - items = this._getItemsForLayout( items ); - - this._layoutItems( items, isInstant ); - - this._postLayout(); -}; - -/** - * get the items to be laid out - * you may want to skip over some items - * @param {Array} items - * @returns {Array} items - */ -proto._getItemsForLayout = function( items ) { - return items.filter( function( item ) { - return !item.isIgnored; - }); -}; - -/** - * layout items - * @param {Array} items - * @param {Boolean} isInstant - */ -proto._layoutItems = function( items, isInstant ) { - this._emitCompleteOnItems( 'layout', items ); - - if ( !items || !items.length ) { - // no items, emit event with empty array - return; - } - - var queue = []; - - items.forEach( function( item ) { - // get x/y object from method - var position = this._getItemLayoutPosition( item ); - // enqueue - position.item = item; - position.isInstant = isInstant || item.isLayoutInstant; - queue.push( position ); - }, this ); - - this._processLayoutQueue( queue ); -}; - -/** - * get item layout position - * @param {Outlayer.Item} item - * @returns {Object} x and y position - */ -proto._getItemLayoutPosition = function( /* item */ ) { - return { - x: 0, - y: 0 - }; -}; - -/** - * iterate over array and position each item - * Reason being - separating this logic prevents 'layout invalidation' - * thx @paul_irish - * @param {Array} queue - */ -proto._processLayoutQueue = function( queue ) { - this.updateStagger(); - queue.forEach( function( obj, i ) { - this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i ); - }, this ); -}; - -// set stagger from option in milliseconds number -proto.updateStagger = function() { - var stagger = this.options.stagger; - if ( stagger === null || stagger === undefined ) { - this.stagger = 0; - return; - } - this.stagger = getMilliseconds( stagger ); - return this.stagger; -}; - -/** - * Sets position of item in DOM - * @param {Outlayer.Item} item - * @param {Number} x - horizontal position - * @param {Number} y - vertical position - * @param {Boolean} isInstant - disables transitions - */ -proto._positionItem = function( item, x, y, isInstant, i ) { - if ( isInstant ) { - // if not transition, just set CSS - item.goTo( x, y ); - } else { - item.stagger( i * this.stagger ); - item.moveTo( x, y ); - } -}; - -/** - * Any logic you want to do after each layout, - * i.e. size the container - */ -proto._postLayout = function() { - this.resizeContainer(); -}; - -proto.resizeContainer = function() { - var isResizingContainer = this._getOption('resizeContainer'); - if ( !isResizingContainer ) { - return; - } - var size = this._getContainerSize(); - if ( size ) { - this._setContainerMeasure( size.width, true ); - this._setContainerMeasure( size.height, false ); - } -}; - -/** - * Sets width or height of container if returned - * @returns {Object} size - * @param {Number} width - * @param {Number} height - */ -proto._getContainerSize = noop; - -/** - * @param {Number} measure - size of width or height - * @param {Boolean} isWidth - */ -proto._setContainerMeasure = function( measure, isWidth ) { - if ( measure === undefined ) { - return; - } - - var elemSize = this.size; - // add padding and border width if border box - if ( elemSize.isBorderBox ) { - measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight + - elemSize.borderLeftWidth + elemSize.borderRightWidth : - elemSize.paddingBottom + elemSize.paddingTop + - elemSize.borderTopWidth + elemSize.borderBottomWidth; - } - - measure = Math.max( measure, 0 ); - this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px'; -}; - -/** - * emit eventComplete on a collection of items events - * @param {String} eventName - * @param {Array} items - Outlayer.Items - */ -proto._emitCompleteOnItems = function( eventName, items ) { - var _this = this; - function onComplete() { - _this.dispatchEvent( eventName + 'Complete', null, [ items ] ); - } - - var count = items.length; - if ( !items || !count ) { - onComplete(); - return; - } - - var doneCount = 0; - function tick() { - doneCount++; - if ( doneCount == count ) { - onComplete(); - } - } - - // bind callback - items.forEach( function( item ) { - item.once( eventName, tick ); - }); -}; - -/** - * emits events via EvEmitter and jQuery events - * @param {String} type - name of event - * @param {Event} event - original event - * @param {Array} args - extra arguments - */ -proto.dispatchEvent = function( type, event, args ) { - // add original event to arguments - var emitArgs = event ? [ event ].concat( args ) : args; - this.emitEvent( type, emitArgs ); - - if ( jQuery ) { - // set this.$element - this.$element = this.$element || jQuery( this.element ); - if ( event ) { - // create jQuery event - var $event = jQuery.Event( event ); - $event.type = type; - this.$element.trigger( $event, args ); - } else { - // just trigger with type if no event available - this.$element.trigger( type, args ); - } - } -}; - -// -------------------------- ignore & stamps -------------------------- // - - -/** - * keep item in collection, but do not lay it out - * ignored items do not get skipped in layout - * @param {Element} elem - */ -proto.ignore = function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - item.isIgnored = true; - } -}; - -/** - * return item to layout collection - * @param {Element} elem - */ -proto.unignore = function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - delete item.isIgnored; - } -}; - -/** - * adds elements to stamps - * @param {NodeList, Array, Element, or String} elems - */ -proto.stamp = function( elems ) { - elems = this._find( elems ); - if ( !elems ) { - return; - } - - this.stamps = this.stamps.concat( elems ); - // ignore - elems.forEach( this.ignore, this ); -}; - -/** - * removes elements to stamps - * @param {NodeList, Array, or Element} elems - */ -proto.unstamp = function( elems ) { - elems = this._find( elems ); - if ( !elems ){ - return; - } - - elems.forEach( function( elem ) { - // filter out removed stamp elements - utils.removeFrom( this.stamps, elem ); - this.unignore( elem ); - }, this ); -}; - -/** - * finds child elements - * @param {NodeList, Array, Element, or String} elems - * @returns {Array} elems - */ -proto._find = function( elems ) { - if ( !elems ) { - return; - } - // if string, use argument as selector string - if ( typeof elems == 'string' ) { - elems = this.element.querySelectorAll( elems ); - } - elems = utils.makeArray( elems ); - return elems; -}; - -proto._manageStamps = function() { - if ( !this.stamps || !this.stamps.length ) { - return; - } - - this._getBoundingRect(); - - this.stamps.forEach( this._manageStamp, this ); -}; - -// update boundingLeft / Top -proto._getBoundingRect = function() { - // get bounding rect for container element - var boundingRect = this.element.getBoundingClientRect(); - var size = this.size; - this._boundingRect = { - left: boundingRect.left + size.paddingLeft + size.borderLeftWidth, - top: boundingRect.top + size.paddingTop + size.borderTopWidth, - right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ), - bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth ) - }; -}; - -/** - * @param {Element} stamp -**/ -proto._manageStamp = noop; - -/** - * get x/y position of element relative to container element - * @param {Element} elem - * @returns {Object} offset - has left, top, right, bottom - */ -proto._getElementOffset = function( elem ) { - var boundingRect = elem.getBoundingClientRect(); - var thisRect = this._boundingRect; - var size = getSize( elem ); - var offset = { - left: boundingRect.left - thisRect.left - size.marginLeft, - top: boundingRect.top - thisRect.top - size.marginTop, - right: thisRect.right - boundingRect.right - size.marginRight, - bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom - }; - return offset; -}; - -// -------------------------- resize -------------------------- // - -// enable event handlers for listeners -// i.e. resize -> onresize -proto.handleEvent = utils.handleEvent; - -/** - * Bind layout to window resizing - */ -proto.bindResize = function() { - window.addEventListener( 'resize', this ); - this.isResizeBound = true; -}; - -/** - * Unbind layout to window resizing - */ -proto.unbindResize = function() { - window.removeEventListener( 'resize', this ); - this.isResizeBound = false; -}; - -proto.onresize = function() { - this.resize(); -}; - -utils.debounceMethod( Outlayer, 'onresize', 100 ); - -proto.resize = function() { - // don't trigger if size did not change - // or if resize was unbound. See #9 - if ( !this.isResizeBound || !this.needsResizeLayout() ) { - return; - } - - this.layout(); -}; - -/** - * check if layout is needed post layout - * @returns Boolean - */ -proto.needsResizeLayout = function() { - var size = getSize( this.element ); - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var hasSizes = this.size && size; - return hasSizes && size.innerWidth !== this.size.innerWidth; -}; - -// -------------------------- methods -------------------------- // - -/** - * add items to Outlayer instance - * @param {Array or NodeList or Element} elems - * @returns {Array} items - Outlayer.Items -**/ -proto.addItems = function( elems ) { - var items = this._itemize( elems ); - // add items to collection - if ( items.length ) { - this.items = this.items.concat( items ); - } - return items; -}; - -/** - * Layout newly-appended item elements - * @param {Array or NodeList or Element} elems - */ -proto.appended = function( elems ) { - var items = this.addItems( elems ); - if ( !items.length ) { - return; - } - // layout and reveal just the new items - this.layoutItems( items, true ); - this.reveal( items ); -}; - -/** - * Layout prepended elements - * @param {Array or NodeList or Element} elems - */ -proto.prepended = function( elems ) { - var items = this._itemize( elems ); - if ( !items.length ) { - return; - } - // add items to beginning of collection - var previousItems = this.items.slice(0); - this.items = items.concat( previousItems ); - // start new layout - this._resetLayout(); - this._manageStamps(); - // layout new stuff without transition - this.layoutItems( items, true ); - this.reveal( items ); - // layout previous items - this.layoutItems( previousItems ); -}; - -/** - * reveal a collection of items - * @param {Array of Outlayer.Items} items - */ -proto.reveal = function( items ) { - this._emitCompleteOnItems( 'reveal', items ); - if ( !items || !items.length ) { - return; - } - var stagger = this.updateStagger(); - items.forEach( function( item, i ) { - item.stagger( i * stagger ); - item.reveal(); - }); -}; - -/** - * hide a collection of items - * @param {Array of Outlayer.Items} items - */ -proto.hide = function( items ) { - this._emitCompleteOnItems( 'hide', items ); - if ( !items || !items.length ) { - return; - } - var stagger = this.updateStagger(); - items.forEach( function( item, i ) { - item.stagger( i * stagger ); - item.hide(); - }); -}; - -/** - * reveal item elements - * @param {Array}, {Element}, {NodeList} items - */ -proto.revealItemElements = function( elems ) { - var items = this.getItems( elems ); - this.reveal( items ); -}; - -/** - * hide item elements - * @param {Array}, {Element}, {NodeList} items - */ -proto.hideItemElements = function( elems ) { - var items = this.getItems( elems ); - this.hide( items ); -}; - -/** - * get Outlayer.Item, given an Element - * @param {Element} elem - * @param {Function} callback - * @returns {Outlayer.Item} item - */ -proto.getItem = function( elem ) { - // loop through items to get the one that matches - for ( var i=0; i < this.items.length; i++ ) { - var item = this.items[i]; - if ( item.element == elem ) { - // return item - return item; - } - } -}; - -/** - * get collection of Outlayer.Items, given Elements - * @param {Array} elems - * @returns {Array} items - Outlayer.Items - */ -proto.getItems = function( elems ) { - elems = utils.makeArray( elems ); - var items = []; - elems.forEach( function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - items.push( item ); - } - }, this ); - - return items; -}; - -/** - * remove element(s) from instance and DOM - * @param {Array or NodeList or Element} elems - */ -proto.remove = function( elems ) { - var removeItems = this.getItems( elems ); - - this._emitCompleteOnItems( 'remove', removeItems ); - - // bail if no items to remove - if ( !removeItems || !removeItems.length ) { - return; - } - - removeItems.forEach( function( item ) { - item.remove(); - // remove item from collection - utils.removeFrom( this.items, item ); - }, this ); -}; - -// ----- destroy ----- // - -// remove and disable Outlayer instance -proto.destroy = function() { - // clean up dynamic styles - var style = this.element.style; - style.height = ''; - style.position = ''; - style.width = ''; - // destroy items - this.items.forEach( function( item ) { - item.destroy(); - }); - - this.unbindResize(); - - var id = this.element.outlayerGUID; - delete instances[ id ]; // remove reference to instance by id - delete this.element.outlayerGUID; - // remove data for jQuery - if ( jQuery ) { - jQuery.removeData( this.element, this.constructor.namespace ); - } - -}; - -// -------------------------- data -------------------------- // - -/** - * get Outlayer instance from element - * @param {Element} elem - * @returns {Outlayer} - */ -Outlayer.data = function( elem ) { - elem = utils.getQueryElement( elem ); - var id = elem && elem.outlayerGUID; - return id && instances[ id ]; -}; - - -// -------------------------- create Outlayer class -------------------------- // - -/** - * create a layout class - * @param {String} namespace - */ -Outlayer.create = function( namespace, options ) { - // sub-class Outlayer - var Layout = subclass( Outlayer ); - // apply new options and compatOptions - Layout.defaults = utils.extend( {}, Outlayer.defaults ); - utils.extend( Layout.defaults, options ); - Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions ); - - Layout.namespace = namespace; - - Layout.data = Outlayer.data; - - // sub-class Item - Layout.Item = subclass( Item ); - - // -------------------------- declarative -------------------------- // - - utils.htmlInit( Layout, namespace ); - - // -------------------------- jQuery bridge -------------------------- // - - // make into jQuery plugin - if ( jQuery && jQuery.bridget ) { - jQuery.bridget( namespace, Layout ); - } - - return Layout; -}; - -function subclass( Parent ) { - function SubClass() { - Parent.apply( this, arguments ); - } - - SubClass.prototype = Object.create( Parent.prototype ); - SubClass.prototype.constructor = SubClass; - - return SubClass; -} - -// ----- helpers ----- // - -// how many milliseconds are in each unit -var msUnits = { - ms: 1, - s: 1000 -}; - -// munge time-like parameter into millisecond number -// '0.4s' -> 40 -function getMilliseconds( time ) { - if ( typeof time == 'number' ) { - return time; - } - var matches = time.match( /(^\d*\.?\d*)(\w*)/ ); - var num = matches && matches[1]; - var unit = matches && matches[2]; - if ( !num.length ) { - return 0; - } - num = parseFloat( num ); - var mult = msUnits[ unit ] || 1; - return num * mult; -} - -// ----- fin ----- // - -// back in global -Outlayer.Item = Item; - -return Outlayer; - -})); - - -/***/ }), - -/***/ "./src/img/logos/giphy-powered.png": -/*!*****************************************!*\ - !*** ./src/img/logos/giphy-powered.png ***! - \*****************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -module.exports = __webpack_require__.p + "images/giphy-powered.9748c37d.png"; - -/***/ }), - -/***/ "react": -/*!************************!*\ - !*** external "React" ***! - \************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["React"]; - -/***/ }), - -/***/ "@wordpress/blocks": -/*!********************************!*\ - !*** external ["wp","blocks"] ***! - \********************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["blocks"]; - -/***/ }), - -/***/ "@wordpress/data": -/*!******************************!*\ - !*** external ["wp","data"] ***! - \******************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["data"]; - -/***/ }), - -/***/ "@wordpress/editor": -/*!********************************!*\ - !*** external ["wp","editor"] ***! - \********************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["editor"]; - -/***/ }), - -/***/ "@wordpress/element": -/*!*********************************!*\ - !*** external ["wp","element"] ***! - \*********************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["element"]; - -/***/ }), - -/***/ "@wordpress/i18n": -/*!******************************!*\ - !*** external ["wp","i18n"] ***! - \******************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["i18n"]; - -/***/ }), - -/***/ "@wordpress/plugins": -/*!*********************************!*\ - !*** external ["wp","plugins"] ***! - \*********************************/ -/***/ ((module) => { - -"use strict"; -module.exports = window["wp"]["plugins"]; - -/***/ }), - -/***/ "?9157": -/*!************************!*\ - !*** crypto (ignored) ***! - \************************/ -/***/ (() => { - -/* (ignored) */ - -/***/ }), - -/***/ "./node_modules/classnames/index.js": -/*!******************************************!*\ - !*** ./node_modules/classnames/index.js ***! - \******************************************/ -/***/ ((module, exports) => { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/* global define */ - -(function () { - 'use strict'; - - var hasOwn = {}.hasOwnProperty; - - function classNames () { - var classes = ''; - - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - if (arg) { - classes = appendClass(classes, parseValue(arg)); - } - } - - return classes; - } - - function parseValue (arg) { - if (typeof arg === 'string' || typeof arg === 'number') { - return arg; - } - - if (typeof arg !== 'object') { - return ''; - } - - if (Array.isArray(arg)) { - return classNames.apply(null, arg); - } - - if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { - return arg.toString(); - } - - var classes = ''; - - for (var key in arg) { - if (hasOwn.call(arg, key) && arg[key]) { - classes = appendClass(classes, key); - } - } - - return classes; - } - - function appendClass (value, newClass) { - if (!newClass) { - return value; - } - - if (value) { - return value + ' ' + newClass; - } - - return value + newClass; - } - - if ( true && module.exports) { - classNames.default = classNames; - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return classNames; - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}()); - - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/adapters.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/adapters/adapters.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _http_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./http.js */ "./node_modules/axios/lib/helpers/null.js"); -/* harmony import */ var _xhr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./xhr.js */ "./node_modules/axios/lib/adapters/xhr.js"); -/* harmony import */ var _fetch_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fetch.js */ "./node_modules/axios/lib/adapters/fetch.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - - - - - - -const knownAdapters = { - http: _http_js__WEBPACK_IMPORTED_MODULE_0__["default"], - xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_1__["default"], - fetch: _fetch_js__WEBPACK_IMPORTED_MODULE_2__["default"] -} - -_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(knownAdapters, (fn, value) => { - if (fn) { - try { - Object.defineProperty(fn, 'name', {value}); - } catch (e) { - // eslint-disable-next-line no-empty - } - Object.defineProperty(fn, 'adapterName', {value}); - } -}); - -const renderReason = (reason) => `- ${reason}`; - -const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(adapter) || adapter === null || adapter === false; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - getAdapter: (adapters) => { - adapters = _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isArray(adapters) ? adapters : [adapters]; - - const {length} = adapters; - let nameOrAdapter; - let adapter; - - const rejectedReasons = {}; - - for (let i = 0; i < length; i++) { - nameOrAdapter = adapters[i]; - let id; - - adapter = nameOrAdapter; - - if (!isResolvedHandle(nameOrAdapter)) { - adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; - - if (adapter === undefined) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"](`Unknown adapter '${id}'`); - } - } - - if (adapter) { - break; - } - - rejectedReasons[id || '#' + i] = adapter; - } - - if (!adapter) { - - const reasons = Object.entries(rejectedReasons) - .map(([id, state]) => `adapter ${id} ` + - (state === false ? 'is not supported by the environment' : 'is not available in the build') - ); - - let s = length ? - (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : - 'as no adapter specified'; - - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"]( - `There is no suitable adapter to dispatch the request ` + s, - 'ERR_NOT_SUPPORT' - ); - } - - return adapter; - }, - adapters: knownAdapters -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/fetch.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/adapters/fetch.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/composeSignals.js */ "./node_modules/axios/lib/helpers/composeSignals.js"); -/* harmony import */ var _helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/trackStream.js */ "./node_modules/axios/lib/helpers/trackStream.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../helpers/progressEventReducer.js */ "./node_modules/axios/lib/helpers/progressEventReducer.js"); -/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/resolveConfig.js */ "./node_modules/axios/lib/helpers/resolveConfig.js"); -/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/settle.js */ "./node_modules/axios/lib/core/settle.js"); - - - - - - - - - - -const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function'; -const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function'; - -// used only inside the fetch adapter -const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? - ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : - async (str) => new Uint8Array(await new Response(str).arrayBuffer()) -); - -const test = (fn, ...args) => { - try { - return !!fn(...args); - } catch (e) { - return false - } -} - -const supportsRequestStream = isReadableStreamSupported && test(() => { - let duplexAccessed = false; - - const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, { - body: new ReadableStream(), - method: 'POST', - get duplex() { - duplexAccessed = true; - return 'half'; - }, - }).headers.has('Content-Type'); - - return duplexAccessed && !hasContentType; -}); - -const DEFAULT_CHUNK_SIZE = 64 * 1024; - -const supportsResponseStream = isReadableStreamSupported && - test(() => _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReadableStream(new Response('').body)); - - -const resolvers = { - stream: supportsResponseStream && ((res) => res.body) -}; - -isFetchSupported && (((res) => { - ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => { - !resolvers[type] && (resolvers[type] = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(res[type]) ? (res) => res[type]() : - (_, config) => { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](`Response type '${type}' is not supported`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT, config); - }) - }); -})(new Response)); - -const getBodyLength = async (body) => { - if (body == null) { - return 0; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isBlob(body)) { - return body.size; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isSpecCompliantForm(body)) { - const _request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, { - method: 'POST', - body, - }); - return (await _request.arrayBuffer()).byteLength; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBufferView(body) || _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBuffer(body)) { - return body.byteLength; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isURLSearchParams(body)) { - body = body + ''; - } - - if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(body)) { - return (await encodeText(body)).byteLength; - } -} - -const resolveBodyLength = async (headers, body) => { - const length = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(headers.getContentLength()); - - return length == null ? getBodyLength(body) : length; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isFetchSupported && (async (config) => { - let { - url, - method, - data, - signal, - cancelToken, - timeout, - onDownloadProgress, - onUploadProgress, - responseType, - headers, - withCredentials = 'same-origin', - fetchOptions - } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(config); - - responseType = responseType ? (responseType + '').toLowerCase() : 'text'; - - let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__["default"])([signal, cancelToken && cancelToken.toAbortSignal()], timeout); - - let request; - - const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { - composedSignal.unsubscribe(); - }); - - let requestContentLength; - - try { - if ( - onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' && - (requestContentLength = await resolveBodyLength(headers, data)) !== 0 - ) { - let _request = new Request(url, { - method: 'POST', - body: data, - duplex: "half" - }); - - let contentTypeHeader; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { - headers.setContentType(contentTypeHeader) - } - - if (_request.body) { - const [onProgress, flush] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)( - requestContentLength, - (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onUploadProgress)) - ); - - data = (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); - } - } - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(withCredentials)) { - withCredentials = withCredentials ? 'include' : 'omit'; - } - - // Cloudflare Workers throws when credentials are defined - // see https://github.com/cloudflare/workerd/issues/902 - const isCredentialsSupported = "credentials" in Request.prototype; - request = new Request(url, { - ...fetchOptions, - signal: composedSignal, - method: method.toUpperCase(), - headers: headers.normalize().toJSON(), - body: data, - duplex: "half", - credentials: isCredentialsSupported ? withCredentials : undefined - }); - - let response = await fetch(request); - - const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); - - if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) { - const options = {}; - - ['status', 'statusText', 'headers'].forEach(prop => { - options[prop] = response[prop]; - }); - - const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length')); - - const [onProgress, flush] = onDownloadProgress && (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)( - responseContentLength, - (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onDownloadProgress), true) - ) || []; - - response = new Response( - (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { - flush && flush(); - unsubscribe && unsubscribe(); - }), - options - ); - } - - responseType = responseType || 'text'; - - let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].findKey(resolvers, responseType) || 'text'](response, config); - - !isStreamResponse && unsubscribe && unsubscribe(); - - return await new Promise((resolve, reject) => { - (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_7__["default"])(resolve, reject, { - data: responseData, - headers: _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].from(response.headers), - status: response.status, - statusText: response.statusText, - config, - request - }) - }) - } catch (err) { - unsubscribe && unsubscribe(); - - if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) { - throw Object.assign( - new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NETWORK, config, request), - { - cause: err.cause || err - } - ) - } - - throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(err, err && err.code, config, request); - } -})); - - - - -/***/ }), - -/***/ "./node_modules/axios/lib/adapters/xhr.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/adapters/xhr.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../core/settle.js */ "./node_modules/axios/lib/core/settle.js"); -/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaults/transitional.js */ "./node_modules/axios/lib/defaults/transitional.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../helpers/parseProtocol.js */ "./node_modules/axios/lib/helpers/parseProtocol.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/progressEventReducer.js */ "./node_modules/axios/lib/helpers/progressEventReducer.js"); -/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/resolveConfig.js */ "./node_modules/axios/lib/helpers/resolveConfig.js"); - - - - - - - - - - - -const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported && function (config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_0__["default"])(config); - let requestData = _config.data; - const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(_config.headers).normalize(); - let {responseType, onUploadProgress, onDownloadProgress} = _config; - let onCanceled; - let uploadThrottled, downloadThrottled; - let flushUpload, flushDownload; - - function done() { - flushUpload && flushUpload(); // flush events - flushDownload && flushDownload(); // flush events - - _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); - - _config.signal && _config.signal.removeEventListener('abort', onCanceled); - } - - let request = new XMLHttpRequest(); - - request.open(_config.method.toUpperCase(), _config.url, true); - - // Set the request timeout in MS - request.timeout = _config.timeout; - - function onloadend() { - if (!request) { - return; - } - // Prepare the response - const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from( - 'getAllResponseHeaders' in request && request.getAllResponseHeaders() - ); - const responseData = !responseType || responseType === 'text' || responseType === 'json' ? - request.responseText : request.response; - const response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config, - request - }; - - (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(function _resolve(value) { - resolve(value); - done(); - }, function _reject(err) { - reject(err); - done(); - }, response); - - // Clean up request - request = null; - } - - if ('onloadend' in request) { - // Use onloadend if available - request.onloadend = onloadend; - } else { - // Listen for ready state to emulate onloadend - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - // readystate handler is calling before onerror or ontimeout handlers, - // so we should call onloadend on the next 'tick' - setTimeout(onloadend); - }; - } - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, config, request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_NETWORK, config, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; - const transitional = _config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_4__["default"]; - if (_config.timeoutErrorMessage) { - timeoutErrorMessage = _config.timeoutErrorMessage; - } - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]( - timeoutErrorMessage, - transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, - config, - request)); - - // Clean up request - request = null; - }; - - // Remove Content-Type if data is undefined - requestData === undefined && requestHeaders.setContentType(null); - - // Add headers to the request - if ('setRequestHeader' in request) { - _utils_js__WEBPACK_IMPORTED_MODULE_5__["default"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { - request.setRequestHeader(key, val); - }); - } - - // Add withCredentials to request if needed - if (!_utils_js__WEBPACK_IMPORTED_MODULE_5__["default"].isUndefined(_config.withCredentials)) { - request.withCredentials = !!_config.withCredentials; - } - - // Add responseType to request if needed - if (responseType && responseType !== 'json') { - request.responseType = _config.responseType; - } - - // Handle progress if needed - if (onDownloadProgress) { - ([downloadThrottled, flushDownload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)(onDownloadProgress, true)); - request.addEventListener('progress', downloadThrottled); - } - - // Not all browsers support upload events - if (onUploadProgress && request.upload) { - ([uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)(onUploadProgress)); - - request.upload.addEventListener('progress', uploadThrottled); - - request.upload.addEventListener('loadend', flushUpload); - } - - if (_config.cancelToken || _config.signal) { - // Handle cancellation - // eslint-disable-next-line func-names - onCanceled = cancel => { - if (!request) { - return; - } - reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_7__["default"](null, config, request) : cancel); - request.abort(); - request = null; - }; - - _config.cancelToken && _config.cancelToken.subscribe(onCanceled); - if (_config.signal) { - _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); - } - } - - const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_config.url); - - if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_9__["default"].protocols.indexOf(protocol) === -1) { - reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Unsupported protocol ' + protocol + ':', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_BAD_REQUEST, config)); - return; - } - - - // Send the request - request.send(requestData || null); - }); -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/axios.js": -/*!*****************************************!*\ - !*** ./node_modules/axios/lib/axios.js ***! - \*****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js"); -/* harmony import */ var _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/Axios.js */ "./node_modules/axios/lib/core/Axios.js"); -/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); -/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); -/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js"); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cancel/CancelToken.js */ "./node_modules/axios/lib/cancel/CancelToken.js"); -/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js"); -/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./env/data.js */ "./node_modules/axios/lib/env/data.js"); -/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/spread.js */ "./node_modules/axios/lib/helpers/spread.js"); -/* harmony import */ var _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/isAxiosError.js */ "./node_modules/axios/lib/helpers/isAxiosError.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js"); -/* harmony import */ var _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers/HttpStatusCode.js */ "./node_modules/axios/lib/helpers/HttpStatusCode.js"); - - - - - - - - - - - - - - - - - - - - -/** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * - * @returns {Axios} A new instance of Axios - */ -function createInstance(defaultConfig) { - const context = new _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"](defaultConfig); - const instance = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.request, context); - - // Copy axios.prototype to instance - _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype, context, {allOwnKeys: true}); - - // Copy context to instance - _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, context, null, {allOwnKeys: true}); - - // Factory for creating new instances - instance.create = function create(instanceConfig) { - return createInstance((0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(defaultConfig, instanceConfig)); - }; - - return instance; -} - -// Create the default instance to be exported -const axios = createInstance(_defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"]); - -// Expose Axios class to allow class inheritance -axios.Axios = _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"]; - -// Expose Cancel & CancelToken -axios.CanceledError = _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__["default"]; -axios.CancelToken = _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__["default"]; -axios.isCancel = _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__["default"]; -axios.VERSION = _env_data_js__WEBPACK_IMPORTED_MODULE_8__.VERSION; -axios.toFormData = _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__["default"]; - -// Expose AxiosError class -axios.AxiosError = _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__["default"]; - -// alias for CanceledError for backward compatibility -axios.Cancel = axios.CanceledError; - -// Expose all/spread -axios.all = function all(promises) { - return Promise.all(promises); -}; - -axios.spread = _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__["default"]; - -// Expose isAxiosError -axios.isAxiosError = _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__["default"]; - -// Expose mergeConfig -axios.mergeConfig = _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"]; - -axios.AxiosHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__["default"]; - -axios.formToJSON = thing => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isHTMLForm(thing) ? new FormData(thing) : thing); - -axios.getAdapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__["default"].getAdapter; - -axios.HttpStatusCode = _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__["default"]; - -axios.default = axios; - -// this module should only have a default export -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (axios); - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/CancelToken.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/cancel/CancelToken.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); - - - - -/** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @param {Function} executor The executor function. - * - * @returns {CancelToken} - */ -class CancelToken { - constructor(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - let resolvePromise; - - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - const token = this; - - // eslint-disable-next-line func-names - this.promise.then(cancel => { - if (!token._listeners) return; - - let i = token._listeners.length; - - while (i-- > 0) { - token._listeners[i](cancel); - } - token._listeners = null; - }); - - // eslint-disable-next-line func-names - this.promise.then = onfulfilled => { - let _resolve; - // eslint-disable-next-line func-names - const promise = new Promise(resolve => { - token.subscribe(resolve); - _resolve = resolve; - }).then(onfulfilled); - - promise.cancel = function reject() { - token.unsubscribe(_resolve); - }; - - return promise; - }; - - executor(function cancel(message, config, request) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](message, config, request); - resolvePromise(token.reason); - }); - } - - /** - * Throws a `CanceledError` if cancellation has been requested. - */ - throwIfRequested() { - if (this.reason) { - throw this.reason; - } - } - - /** - * Subscribe to the cancel signal - */ - - subscribe(listener) { - if (this.reason) { - listener(this.reason); - return; - } - - if (this._listeners) { - this._listeners.push(listener); - } else { - this._listeners = [listener]; - } - } - - /** - * Unsubscribe from the cancel signal - */ - - unsubscribe(listener) { - if (!this._listeners) { - return; - } - const index = this._listeners.indexOf(listener); - if (index !== -1) { - this._listeners.splice(index, 1); - } - } - - toAbortSignal() { - const controller = new AbortController(); - - const abort = (err) => { - controller.abort(err); - }; - - this.subscribe(abort); - - controller.signal.unsubscribe = () => this.unsubscribe(abort); - - return controller.signal; - } - - /** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ - static source() { - let cancel; - const token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token, - cancel - }; - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CancelToken); - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/CanceledError.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/cancel/CanceledError.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - - -/** - * A `CanceledError` is an object that is thrown when an operation is canceled. - * - * @param {string=} message The message. - * @param {Object=} config The config. - * @param {Object=} request The request. - * - * @returns {CanceledError} The created error. - */ -function CanceledError(message, config, request) { - // eslint-disable-next-line no-eq-null,eqeqeq - _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, message == null ? 'canceled' : message, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_CANCELED, config, request); - this.name = 'CanceledError'; -} - -_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].inherits(CanceledError, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"], { - __CANCEL__: true -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CanceledError); - - -/***/ }), - -/***/ "./node_modules/axios/lib/cancel/isCancel.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/cancel/isCancel.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ isCancel) -/* harmony export */ }); - - -function isCancel(value) { - return !!(value && value.__CANCEL__); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/Axios.js": -/*!**********************************************!*\ - !*** ./node_modules/axios/lib/core/Axios.js ***! - \**********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js"); -/* harmony import */ var _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InterceptorManager.js */ "./node_modules/axios/lib/core/InterceptorManager.js"); -/* harmony import */ var _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dispatchRequest.js */ "./node_modules/axios/lib/core/dispatchRequest.js"); -/* harmony import */ var _mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); -/* harmony import */ var _buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js"); -/* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/validator.js */ "./node_modules/axios/lib/helpers/validator.js"); -/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - - - - - - - - - - - -const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].validators; - -/** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - * - * @return {Axios} A new instance of Axios - */ -class Axios { - constructor(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"](), - response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"]() - }; - } - - /** - * Dispatch a request - * - * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) - * @param {?Object} config - * - * @returns {Promise} The Promise to be fulfilled - */ - async request(configOrUrl, config) { - try { - return await this._request(configOrUrl, config); - } catch (err) { - if (err instanceof Error) { - let dummy; - - Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error()); - - // slice off the Error: ... line - const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; - try { - if (!err.stack) { - err.stack = stack; - // match without the 2 top stack lines - } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) { - err.stack += '\n' + stack - } - } catch (e) { - // ignore the case where "stack" is an un-writable property - } - } - - throw err; - } - } - - _request(configOrUrl, config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof configOrUrl === 'string') { - config = config || {}; - config.url = configOrUrl; - } else { - config = configOrUrl || {}; - } - - config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config); - - const {transitional, paramsSerializer, headers} = config; - - if (transitional !== undefined) { - _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(transitional, { - silentJSONParsing: validators.transitional(validators.boolean), - forcedJSONParsing: validators.transitional(validators.boolean), - clarifyTimeoutError: validators.transitional(validators.boolean) - }, false); - } - - if (paramsSerializer != null) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(paramsSerializer)) { - config.paramsSerializer = { - serialize: paramsSerializer - } - } else { - _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(paramsSerializer, { - encode: validators.function, - serialize: validators.function - }, true); - } - } - - // Set config.method - config.method = (config.method || this.defaults.method || 'get').toLowerCase(); - - // Flatten headers - let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].merge( - headers.common, - headers[config.method] - ); - - headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - (method) => { - delete headers[method]; - } - ); - - config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].concat(contextHeaders, headers); - - // filter out skipped interceptors - const requestInterceptorChain = []; - let synchronousRequestInterceptors = true; - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { - return; - } - - synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - const responseInterceptorChain = []; - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); - }); - - let promise; - let i = 0; - let len; - - if (!synchronousRequestInterceptors) { - const chain = [_dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].bind(this), undefined]; - chain.unshift.apply(chain, requestInterceptorChain); - chain.push.apply(chain, responseInterceptorChain); - len = chain.length; - - promise = Promise.resolve(config); - - while (i < len) { - promise = promise.then(chain[i++], chain[i++]); - } - - return promise; - } - - len = requestInterceptorChain.length; - - let newConfig = config; - - i = 0; - - while (i < len) { - const onFulfilled = requestInterceptorChain[i++]; - const onRejected = requestInterceptorChain[i++]; - try { - newConfig = onFulfilled(newConfig); - } catch (error) { - onRejected.call(this, error); - break; - } - } - - try { - promise = _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].call(this, newConfig); - } catch (error) { - return Promise.reject(error); - } - - i = 0; - len = responseInterceptorChain.length; - - while (i < len) { - promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); - } - - return promise; - } - - getUri(config) { - config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config); - const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__["default"])(config.baseURL, config.url); - return (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(fullPath, config.params, config.paramsSerializer); - } -} - -// Provide aliases for supported request methods -_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, { - method, - url, - data: (config || {}).data - })); - }; -}); - -_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - - function generateHTTPMethod(isForm) { - return function httpMethod(url, data, config) { - return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, { - method, - headers: isForm ? { - 'Content-Type': 'multipart/form-data' - } : {}, - url, - data - })); - }; - } - - Axios.prototype[method] = generateHTTPMethod(); - - Axios.prototype[method + 'Form'] = generateHTTPMethod(true); -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Axios); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/AxiosError.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/core/AxiosError.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [config] The config. - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * - * @returns {Error} The created error. - */ -function AxiosError(message, code, config, request, response) { - Error.call(this); - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = (new Error()).stack; - } - - this.message = message; - this.name = 'AxiosError'; - code && (this.code = code); - config && (this.config = config); - request && (this.request = request); - if (response) { - this.response = response; - this.status = response.status ? response.status : null; - } -} - -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].inherits(AxiosError, Error, { - toJSON: function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(this.config), - code: this.code, - status: this.status - }; - } -}); - -const prototype = AxiosError.prototype; -const descriptors = {}; - -[ - 'ERR_BAD_OPTION_VALUE', - 'ERR_BAD_OPTION', - 'ECONNABORTED', - 'ETIMEDOUT', - 'ERR_NETWORK', - 'ERR_FR_TOO_MANY_REDIRECTS', - 'ERR_DEPRECATED', - 'ERR_BAD_RESPONSE', - 'ERR_BAD_REQUEST', - 'ERR_CANCELED', - 'ERR_NOT_SUPPORT', - 'ERR_INVALID_URL' -// eslint-disable-next-line func-names -].forEach(code => { - descriptors[code] = {value: code}; -}); - -Object.defineProperties(AxiosError, descriptors); -Object.defineProperty(prototype, 'isAxiosError', {value: true}); - -// eslint-disable-next-line func-names -AxiosError.from = (error, code, config, request, response, customProps) => { - const axiosError = Object.create(prototype); - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(error, axiosError, function filter(obj) { - return obj !== Error.prototype; - }, prop => { - return prop !== 'isAxiosError'; - }); - - AxiosError.call(axiosError, error.message, code, config, request, response); - - axiosError.cause = error; - - axiosError.name = error.name; - - customProps && Object.assign(axiosError, customProps); - - return axiosError; -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/AxiosHeaders.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/core/AxiosHeaders.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/parseHeaders.js */ "./node_modules/axios/lib/helpers/parseHeaders.js"); - - - - - -const $internals = Symbol('internals'); - -function normalizeHeader(header) { - return header && String(header).trim().toLowerCase(); -} - -function normalizeValue(value) { - if (value === false || value == null) { - return value; - } - - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : String(value); -} - -function parseTokens(str) { - const tokens = Object.create(null); - const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; - let match; - - while ((match = tokensRE.exec(str))) { - tokens[match[1]] = match[2]; - } - - return tokens; -} - -const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); - -function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(filter)) { - return filter.call(this, value, header); - } - - if (isHeaderNameFilter) { - value = header; - } - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(value)) return; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(filter)) { - return value.indexOf(filter) !== -1; - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(filter)) { - return filter.test(value); - } -} - -function formatHeader(header) { - return header.trim() - .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { - return char.toUpperCase() + str; - }); -} - -function buildAccessors(obj, header) { - const accessorName = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toCamelCase(' ' + header); - - ['get', 'set', 'has'].forEach(methodName => { - Object.defineProperty(obj, methodName + accessorName, { - value: function(arg1, arg2, arg3) { - return this[methodName].call(this, header, arg1, arg2, arg3); - }, - configurable: true - }); - }); -} - -class AxiosHeaders { - constructor(headers) { - headers && this.set(headers); - } - - set(header, valueOrRewrite, rewrite) { - const self = this; - - function setHeader(_value, _header, _rewrite) { - const lHeader = normalizeHeader(_header); - - if (!lHeader) { - throw new Error('header name must be a non-empty string'); - } - - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, lHeader); - - if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { - self[key || _header] = normalizeValue(_value); - } - } - - const setHeaders = (headers, _rewrite) => - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(header) || header instanceof this.constructor) { - setHeaders(header, valueOrRewrite) - } else if(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { - setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"])(header), valueOrRewrite); - } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHeaders(header)) { - for (const [key, value] of header.entries()) { - setHeader(value, key, rewrite); - } - } else { - header != null && setHeader(valueOrRewrite, header, rewrite); - } - - return this; - } - - get(header, parser) { - header = normalizeHeader(header); - - if (header) { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header); - - if (key) { - const value = this[key]; - - if (!parser) { - return value; - } - - if (parser === true) { - return parseTokens(value); - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(parser)) { - return parser.call(this, value, key); - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(parser)) { - return parser.exec(value); - } - - throw new TypeError('parser must be boolean|regexp|function'); - } - } - } - - has(header, matcher) { - header = normalizeHeader(header); - - if (header) { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header); - - return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); - } - - return false; - } - - delete(header, matcher) { - const self = this; - let deleted = false; - - function deleteHeader(_header) { - _header = normalizeHeader(_header); - - if (_header) { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, _header); - - if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { - delete self[key]; - - deleted = true; - } - } - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header)) { - header.forEach(deleteHeader); - } else { - deleteHeader(header); - } - - return deleted; - } - - clear(matcher) { - const keys = Object.keys(this); - let i = keys.length; - let deleted = false; - - while (i--) { - const key = keys[i]; - if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { - delete this[key]; - deleted = true; - } - } - - return deleted; - } - - normalize(format) { - const self = this; - const headers = {}; - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => { - const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(headers, header); - - if (key) { - self[key] = normalizeValue(value); - delete self[header]; - return; - } - - const normalized = format ? formatHeader(header) : String(header).trim(); - - if (normalized !== header) { - delete self[header]; - } - - self[normalized] = normalizeValue(value); - - headers[normalized] = true; - }); - - return this; - } - - concat(...targets) { - return this.constructor.concat(this, ...targets); - } - - toJSON(asStrings) { - const obj = Object.create(null); - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => { - value != null && value !== false && (obj[header] = asStrings && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.join(', ') : value); - }); - - return obj; - } - - [Symbol.iterator]() { - return Object.entries(this.toJSON())[Symbol.iterator](); - } - - toString() { - return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); - } - - get [Symbol.toStringTag]() { - return 'AxiosHeaders'; - } - - static from(thing) { - return thing instanceof this ? thing : new this(thing); - } - - static concat(first, ...targets) { - const computed = new this(first); - - targets.forEach((target) => computed.set(target)); - - return computed; - } - - static accessor(header) { - const internals = this[$internals] = (this[$internals] = { - accessors: {} - }); - - const accessors = internals.accessors; - const prototype = this.prototype; - - function defineAccessor(_header) { - const lHeader = normalizeHeader(_header); - - if (!accessors[lHeader]) { - buildAccessors(prototype, _header); - accessors[lHeader] = true; - } - } - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); - - return this; - } -} - -AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); - -// reserved names hotfix -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => { - let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` - return { - get: () => value, - set(headerValue) { - this[mapped] = headerValue; - } - } -}); - -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosHeaders); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/InterceptorManager.js": -/*!***********************************************************!*\ - !*** ./node_modules/axios/lib/core/InterceptorManager.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -class InterceptorManager { - constructor() { - this.handlers = []; - } - - /** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ - use(fulfilled, rejected, options) { - this.handlers.push({ - fulfilled, - rejected, - synchronous: options ? options.synchronous : false, - runWhen: options ? options.runWhen : null - }); - return this.handlers.length - 1; - } - - /** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - * - * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise - */ - eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } - } - - /** - * Clear all interceptors from the stack - * - * @returns {void} - */ - clear() { - if (this.handlers) { - this.handlers = []; - } - } - - /** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - * - * @returns {void} - */ - forEach(fn) { - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InterceptorManager); - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/buildFullPath.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/core/buildFullPath.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ buildFullPath) -/* harmony export */ }); -/* harmony import */ var _helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/isAbsoluteURL.js */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js"); -/* harmony import */ var _helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/combineURLs.js */ "./node_modules/axios/lib/helpers/combineURLs.js"); - - - - - -/** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * - * @returns {string} The combined full path - */ -function buildFullPath(baseURL, requestedURL) { - if (baseURL && !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL)) { - return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL); - } - return requestedURL; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/dispatchRequest.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/core/dispatchRequest.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ dispatchRequest) -/* harmony export */ }); -/* harmony import */ var _transformData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transformData.js */ "./node_modules/axios/lib/core/transformData.js"); -/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js"); -/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js"); - - - - - - - - - -/** - * Throws a `CanceledError` if cancellation has been requested. - * - * @param {Object} config The config that is to be used for the request - * - * @returns {void} - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } - - if (config.signal && config.signal.aborted) { - throw new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](null, config); - } -} - -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * - * @returns {Promise} The Promise to be fulfilled - */ -function dispatchRequest(config) { - throwIfCancellationRequested(config); - - config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(config.headers); - - // Transform request data - config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( - config, - config.transformRequest - ); - - if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { - config.headers.setContentType('application/x-www-form-urlencoded', false); - } - - const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].adapter); - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( - config, - config.transformResponse, - response - ); - - response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(response.headers); - - return response; - }, function onAdapterRejection(reason) { - if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__["default"])(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( - config, - config.transformResponse, - reason.response - ); - reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(reason.response.headers); - } - } - - return Promise.reject(reason); - }); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/mergeConfig.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/core/mergeConfig.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ mergeConfig) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - - - - - -const headersToObject = (thing) => thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? { ...thing } : thing; - -/** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * - * @returns {Object} New object resulting from merging config2 to config1 - */ -function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - const config = {}; - - function getMergedValue(target, source, caseless) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) { - return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call({caseless}, target, source); - } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) { - return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge({}, source); - } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArray(source)) { - return source.slice(); - } - return source; - } - - // eslint-disable-next-line consistent-return - function mergeDeepProperties(a, b, caseless) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { - return getMergedValue(a, b, caseless); - } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) { - return getMergedValue(undefined, a, caseless); - } - } - - // eslint-disable-next-line consistent-return - function valueFromConfig2(a, b) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { - return getMergedValue(undefined, b); - } - } - - // eslint-disable-next-line consistent-return - function defaultToConfig2(a, b) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { - return getMergedValue(undefined, b); - } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) { - return getMergedValue(undefined, a); - } - } - - // eslint-disable-next-line consistent-return - function mergeDirectKeys(a, b, prop) { - if (prop in config2) { - return getMergedValue(a, b); - } else if (prop in config1) { - return getMergedValue(undefined, a); - } - } - - const mergeMap = { - url: valueFromConfig2, - method: valueFromConfig2, - data: valueFromConfig2, - baseURL: defaultToConfig2, - transformRequest: defaultToConfig2, - transformResponse: defaultToConfig2, - paramsSerializer: defaultToConfig2, - timeout: defaultToConfig2, - timeoutMessage: defaultToConfig2, - withCredentials: defaultToConfig2, - withXSRFToken: defaultToConfig2, - adapter: defaultToConfig2, - responseType: defaultToConfig2, - xsrfCookieName: defaultToConfig2, - xsrfHeaderName: defaultToConfig2, - onUploadProgress: defaultToConfig2, - onDownloadProgress: defaultToConfig2, - decompress: defaultToConfig2, - maxContentLength: defaultToConfig2, - maxBodyLength: defaultToConfig2, - beforeRedirect: defaultToConfig2, - transport: defaultToConfig2, - httpAgent: defaultToConfig2, - httpsAgent: defaultToConfig2, - cancelToken: defaultToConfig2, - socketPath: defaultToConfig2, - responseEncoding: defaultToConfig2, - validateStatus: mergeDirectKeys, - headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true) - }; - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { - const merge = mergeMap[prop] || mergeDeepProperties; - const configValue = merge(config1[prop], config2[prop], prop); - (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); - }); - - return config; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/settle.js": -/*!***********************************************!*\ - !*** ./node_modules/axios/lib/core/settle.js ***! - \***********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ settle) -/* harmony export */ }); -/* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - - - - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - * - * @returns {object} The response. - */ -function settle(resolve, reject, response) { - const validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"]( - 'Request failed with status code ' + response.status, - [_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST, _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], - response.config, - response.request, - response - )); - } -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/core/transformData.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/core/transformData.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ transformData) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - - - - - - -/** - * Transform the data for a request or a response - * - * @param {Array|Function} fns A single function or Array of functions - * @param {?Object} response The response object - * - * @returns {*} The resulting transformed data - */ -function transformData(fns, response) { - const config = this || _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__["default"]; - const context = response || config; - const headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(context.headers); - let data = context.data; - - _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(fns, function transform(fn) { - data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); - }); - - headers.normalize(); - - return data; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/defaults/index.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/defaults/index.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _transitional_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transitional.js */ "./node_modules/axios/lib/defaults/transitional.js"); -/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -/* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/toURLEncodedForm.js */ "./node_modules/axios/lib/helpers/toURLEncodedForm.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js"); - - - - - - - - - - -/** - * It takes a string, tries to parse it, and if it fails, it returns the stringified version - * of the input - * - * @param {any} rawValue - The value to be stringified. - * @param {Function} parser - A function that parses a string into a JavaScript object. - * @param {Function} encoder - A function that takes a value and returns a string. - * - * @returns {string} A stringified version of the rawValue. - */ -function stringifySafely(rawValue, parser, encoder) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(rawValue)) { - try { - (parser || JSON.parse)(rawValue); - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].trim(rawValue); - } catch (e) { - if (e.name !== 'SyntaxError') { - throw e; - } - } - } - - return (encoder || JSON.stringify)(rawValue); -} - -const defaults = { - - transitional: _transitional_js__WEBPACK_IMPORTED_MODULE_1__["default"], - - adapter: ['xhr', 'http', 'fetch'], - - transformRequest: [function transformRequest(data, headers) { - const contentType = headers.getContentType() || ''; - const hasJSONContentType = contentType.indexOf('application/json') > -1; - const isObjectPayload = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(data); - - if (isObjectPayload && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(data)) { - data = new FormData(data); - } - - const isFormData = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(data); - - if (isFormData) { - return hasJSONContentType ? JSON.stringify((0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__["default"])(data)) : data; - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStream(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFile(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(data) || - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data) - ) { - return data; - } - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBufferView(data)) { - return data.buffer; - } - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(data)) { - headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); - return data.toString(); - } - - let isFileList; - - if (isObjectPayload) { - if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { - return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__["default"])(data, this.formSerializer).toString(); - } - - if ((isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { - const _FormData = this.env && this.env.FormData; - - return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__["default"])( - isFileList ? {'files[]': data} : data, - _FormData && new _FormData(), - this.formSerializer - ); - } - } - - if (isObjectPayload || hasJSONContentType ) { - headers.setContentType('application/json', false); - return stringifySafely(data); - } - - return data; - }], - - transformResponse: [function transformResponse(data) { - const transitional = this.transitional || defaults.transitional; - const forcedJSONParsing = transitional && transitional.forcedJSONParsing; - const JSONRequested = this.responseType === 'json'; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isResponse(data) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)) { - return data; - } - - if (data && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { - const silentJSONParsing = transitional && transitional.silentJSONParsing; - const strictJSONParsing = !silentJSONParsing && JSONRequested; - - try { - return JSON.parse(data); - } catch (e) { - if (strictJSONParsing) { - if (e.name === 'SyntaxError') { - throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].ERR_BAD_RESPONSE, this, null, this.response); - } - throw e; - } - } - } - - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - maxBodyLength: -1, - - env: { - FormData: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.FormData, - Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.Blob - }, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - }, - - headers: { - common: { - 'Accept': 'application/json, text/plain, */*', - 'Content-Type': undefined - } - } -}; - -_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { - defaults.headers[method] = {}; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); - - -/***/ }), - -/***/ "./node_modules/axios/lib/defaults/transitional.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/defaults/transitional.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - silentJSONParsing: true, - forcedJSONParsing: true, - clarifyTimeoutError: false -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/env/data.js": -/*!********************************************!*\ - !*** ./node_modules/axios/lib/env/data.js ***! - \********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ VERSION: () => (/* binding */ VERSION) -/* harmony export */ }); -const VERSION = "1.7.7"; - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js": -/*!****************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/AxiosURLSearchParams.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); - - - - -/** - * It encodes a string by replacing all characters that are not in the unreserved set with - * their percent-encoded equivalents - * - * @param {string} str - The string to encode. - * - * @returns {string} The encoded string. - */ -function encode(str) { - const charMap = { - '!': '%21', - "'": '%27', - '(': '%28', - ')': '%29', - '~': '%7E', - '%20': '+', - '%00': '\x00' - }; - return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { - return charMap[match]; - }); -} - -/** - * It takes a params object and converts it to a FormData object - * - * @param {Object} params - The parameters to be converted to a FormData object. - * @param {Object} options - The options object passed to the Axios constructor. - * - * @returns {void} - */ -function AxiosURLSearchParams(params, options) { - this._pairs = []; - - params && (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, this, options); -} - -const prototype = AxiosURLSearchParams.prototype; - -prototype.append = function append(name, value) { - this._pairs.push([name, value]); -}; - -prototype.toString = function toString(encoder) { - const _encode = encoder ? function(value) { - return encoder.call(this, value, encode); - } : encode; - - return this._pairs.map(function each(pair) { - return _encode(pair[0]) + '=' + _encode(pair[1]); - }, '').join('&'); -}; - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosURLSearchParams); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/HttpStatusCode.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/HttpStatusCode.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -const HttpStatusCode = { - Continue: 100, - SwitchingProtocols: 101, - Processing: 102, - EarlyHints: 103, - Ok: 200, - Created: 201, - Accepted: 202, - NonAuthoritativeInformation: 203, - NoContent: 204, - ResetContent: 205, - PartialContent: 206, - MultiStatus: 207, - AlreadyReported: 208, - ImUsed: 226, - MultipleChoices: 300, - MovedPermanently: 301, - Found: 302, - SeeOther: 303, - NotModified: 304, - UseProxy: 305, - Unused: 306, - TemporaryRedirect: 307, - PermanentRedirect: 308, - BadRequest: 400, - Unauthorized: 401, - PaymentRequired: 402, - Forbidden: 403, - NotFound: 404, - MethodNotAllowed: 405, - NotAcceptable: 406, - ProxyAuthenticationRequired: 407, - RequestTimeout: 408, - Conflict: 409, - Gone: 410, - LengthRequired: 411, - PreconditionFailed: 412, - PayloadTooLarge: 413, - UriTooLong: 414, - UnsupportedMediaType: 415, - RangeNotSatisfiable: 416, - ExpectationFailed: 417, - ImATeapot: 418, - MisdirectedRequest: 421, - UnprocessableEntity: 422, - Locked: 423, - FailedDependency: 424, - TooEarly: 425, - UpgradeRequired: 426, - PreconditionRequired: 428, - TooManyRequests: 429, - RequestHeaderFieldsTooLarge: 431, - UnavailableForLegalReasons: 451, - InternalServerError: 500, - NotImplemented: 501, - BadGateway: 502, - ServiceUnavailable: 503, - GatewayTimeout: 504, - HttpVersionNotSupported: 505, - VariantAlsoNegotiates: 506, - InsufficientStorage: 507, - LoopDetected: 508, - NotExtended: 510, - NetworkAuthenticationRequired: 511, -}; - -Object.entries(HttpStatusCode).forEach(([key, value]) => { - HttpStatusCode[value] = key; -}); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HttpStatusCode); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/bind.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/helpers/bind.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ bind) -/* harmony export */ }); - - -function bind(fn, thisArg) { - return function wrap() { - return fn.apply(thisArg, arguments); - }; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/buildURL.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/buildURL.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ buildURL) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js"); - - - - - -/** - * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their - * URI encoded counterparts - * - * @param {string} val The value to be encoded. - * - * @returns {string} The encoded value. - */ -function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @param {?object} options - * - * @returns {string} The formatted url - */ -function buildURL(url, params, options) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - const _encode = options && options.encode || encode; - - const serializeFn = options && options.serialize; - - let serializedParams; - - if (serializeFn) { - serializedParams = serializeFn(params, options); - } else { - serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(params) ? - params.toString() : - new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"](params, options).toString(_encode); - } - - if (serializedParams) { - const hashmarkIndex = url.indexOf("#"); - - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/combineURLs.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/combineURLs.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ combineURLs) -/* harmony export */ }); - - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * - * @returns {string} The combined URL - */ -function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/composeSignals.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/composeSignals.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -const composeSignals = (signals, timeout) => { - const {length} = (signals = signals ? signals.filter(Boolean) : []); - - if (timeout || length) { - let controller = new AbortController(); - - let aborted; - - const onabort = function (reason) { - if (!aborted) { - aborted = true; - unsubscribe(); - const err = reason instanceof Error ? reason : this.reason; - controller.abort(err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? err : new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_1__["default"](err instanceof Error ? err.message : err)); - } - } - - let timer = timeout && setTimeout(() => { - timer = null; - onabort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](`timeout ${timeout} of ms exceeded`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ETIMEDOUT)) - }, timeout) - - const unsubscribe = () => { - if (signals) { - timer && clearTimeout(timer); - timer = null; - signals.forEach(signal => { - signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort); - }); - signals = null; - } - } - - signals.forEach((signal) => signal.addEventListener('abort', onabort)); - - const {signal} = controller; - - signal.unsubscribe = () => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(unsubscribe); - - return signal; - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (composeSignals); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/cookies.js": -/*!***************************************************!*\ - !*** ./node_modules/axios/lib/helpers/cookies.js ***! - \***************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ? - - // Standard browser envs support document.cookie - { - write(name, value, expires, path, domain, secure) { - const cookie = [name + '=' + encodeURIComponent(value)]; - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(path) && cookie.push('path=' + path); - - _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(domain) && cookie.push('domain=' + domain); - - secure === true && cookie.push('secure'); - - document.cookie = cookie.join('; '); - }, - - read(name) { - const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove(name) { - this.write(name, '', Date.now() - 86400000); - } - } - - : - - // Non-standard browser env (web workers, react-native) lack needed support. - { - write() {}, - read() { - return null; - }, - remove() {} - }); - - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/formDataToJSON.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/formDataToJSON.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -/** - * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] - * - * @param {string} name - The name of the property to get. - * - * @returns An array of strings. - */ -function parsePropPath(name) { - // foo[x][y][z] - // foo.x.y.z - // foo-x-y-z - // foo x y z - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map(match => { - return match[0] === '[]' ? '' : match[1] || match[0]; - }); -} - -/** - * Convert an array to an object. - * - * @param {Array} arr - The array to convert to an object. - * - * @returns An object with the same keys and values as the array. - */ -function arrayToObject(arr) { - const obj = {}; - const keys = Object.keys(arr); - let i; - const len = keys.length; - let key; - for (i = 0; i < len; i++) { - key = keys[i]; - obj[key] = arr[key]; - } - return obj; -} - -/** - * It takes a FormData object and returns a JavaScript object - * - * @param {string} formData The FormData object to convert to JSON. - * - * @returns {Object | null} The converted object. - */ -function formDataToJSON(formData) { - function buildPath(path, value, target, index) { - let name = path[index++]; - - if (name === '__proto__') return true; - - const isNumericKey = Number.isFinite(+name); - const isLast = index >= path.length; - name = !name && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target) ? target.length : name; - - if (isLast) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name)) { - target[name] = [target[name], value]; - } else { - target[name] = value; - } - - return !isNumericKey; - } - - if (!target[name] || !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(target[name])) { - target[name] = []; - } - - const result = buildPath(path, value, target[name], index); - - if (result && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target[name])) { - target[name] = arrayToObject(target[name]); - } - - return !isNumericKey; - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(formData) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(formData.entries)) { - const obj = {}; - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEachEntry(formData, (name, value) => { - buildPath(parsePropPath(name), value, obj, 0); - }); - - return obj; - } - - return null; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (formDataToJSON); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ isAbsoluteURL) -/* harmony export */ }); - - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isAxiosError.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isAxiosError.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ isAxiosError) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -/** - * Determines whether the payload is an error thrown by Axios - * - * @param {*} payload The value to test - * - * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false - */ -function isAxiosError(payload) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(payload) && (payload.isAxiosError === true); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js": -/*!***********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); - - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ? - -// Standard browser envs have full support of the APIs needed to test -// whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - const msie = _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent); - const urlParsingNode = document.createElement('a'); - let originURL; - - /** - * Parse a URL to discover its components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - let href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - const parsed = (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })()); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/null.js": -/*!************************************************!*\ - !*** ./node_modules/axios/lib/helpers/null.js ***! - \************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -// eslint-disable-next-line strict -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (null); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/parseHeaders.js": -/*!********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -// RawAxiosHeaders whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toObjectSet([ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]); - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} rawHeaders Headers needing to be parsed - * - * @returns {Object} Headers parsed into an object - */ -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rawHeaders => { - const parsed = {}; - let key; - let val; - let i; - - rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { - i = line.indexOf(':'); - key = line.substring(0, i).trim().toLowerCase(); - val = line.substring(i + 1).trim(); - - if (!key || (parsed[key] && ignoreDuplicateOf[key])) { - return; - } - - if (key === 'set-cookie') { - if (parsed[key]) { - parsed[key].push(val); - } else { - parsed[key] = [val]; - } - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - }); - - return parsed; -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/parseProtocol.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/parseProtocol.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ parseProtocol) -/* harmony export */ }); - - -function parseProtocol(url) { - const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); - return match && match[1] || ''; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/progressEventReducer.js": -/*!****************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/progressEventReducer.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ asyncDecorator: () => (/* binding */ asyncDecorator), -/* harmony export */ progressEventDecorator: () => (/* binding */ progressEventDecorator), -/* harmony export */ progressEventReducer: () => (/* binding */ progressEventReducer) -/* harmony export */ }); -/* harmony import */ var _speedometer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./speedometer.js */ "./node_modules/axios/lib/helpers/speedometer.js"); -/* harmony import */ var _throttle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./throttle.js */ "./node_modules/axios/lib/helpers/throttle.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - - - - -const progressEventReducer = (listener, isDownloadStream, freq = 3) => { - let bytesNotified = 0; - const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250); - - return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e => { - const loaded = e.loaded; - const total = e.lengthComputable ? e.total : undefined; - const progressBytes = loaded - bytesNotified; - const rate = _speedometer(progressBytes); - const inRange = loaded <= total; - - bytesNotified = loaded; - - const data = { - loaded, - total, - progress: total ? (loaded / total) : undefined, - bytes: progressBytes, - rate: rate ? rate : undefined, - estimated: rate && total && inRange ? (total - loaded) / rate : undefined, - event: e, - lengthComputable: total != null, - [isDownloadStream ? 'download' : 'upload']: true - }; - - listener(data); - }, freq); -} - -const progressEventDecorator = (total, throttled) => { - const lengthComputable = total != null; - - return [(loaded) => throttled[0]({ - lengthComputable, - total, - loaded - }), throttled[1]]; -} - -const asyncDecorator = (fn) => (...args) => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(() => fn(...args)); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/resolveConfig.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/helpers/resolveConfig.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./isURLSameOrigin.js */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js"); -/* harmony import */ var _cookies_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cookies.js */ "./node_modules/axios/lib/helpers/cookies.js"); -/* harmony import */ var _core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js"); -/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); -/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); -/* harmony import */ var _buildURL_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js"); - - - - - - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((config) => { - const newConfig = (0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, config); - - let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig; - - newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(headers); - - newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__["default"])(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer); - - // HTTP basic authentication - if (auth) { - headers.set('Authorization', 'Basic ' + - btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')) - ); - } - - let contentType; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_4__["default"].isFormData(data)) { - if (_platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserWebWorkerEnv) { - headers.setContentType(undefined); // Let the browser set it - } else if ((contentType = headers.getContentType()) !== false) { - // fix semicolon duplication issue for ReactNative FormData implementation - const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; - headers.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); - } - } - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - - if (_platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserEnv) { - withXSRFToken && _utils_js__WEBPACK_IMPORTED_MODULE_4__["default"].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); - - if (withXSRFToken || (withXSRFToken !== false && (0,_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_6__["default"])(newConfig.url))) { - // Add xsrf header - const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__WEBPACK_IMPORTED_MODULE_7__["default"].read(xsrfCookieName); - - if (xsrfValue) { - headers.set(xsrfHeaderName, xsrfValue); - } - } - } - - return newConfig; -}); - - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/speedometer.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/speedometer.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/** - * Calculate data maxRate - * @param {Number} [samplesCount= 10] - * @param {Number} [min= 1000] - * @returns {Function} - */ -function speedometer(samplesCount, min) { - samplesCount = samplesCount || 10; - const bytes = new Array(samplesCount); - const timestamps = new Array(samplesCount); - let head = 0; - let tail = 0; - let firstSampleTS; - - min = min !== undefined ? min : 1000; - - return function push(chunkLength) { - const now = Date.now(); - - const startedAt = timestamps[tail]; - - if (!firstSampleTS) { - firstSampleTS = now; - } - - bytes[head] = chunkLength; - timestamps[head] = now; - - let i = tail; - let bytesCount = 0; - - while (i !== head) { - bytesCount += bytes[i++]; - i = i % samplesCount; - } - - head = (head + 1) % samplesCount; - - if (head === tail) { - tail = (tail + 1) % samplesCount; - } - - if (now - firstSampleTS < min) { - return; - } - - const passed = startedAt && now - startedAt; - - return passed ? Math.round(bytesCount * 1000 / passed) : undefined; - }; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (speedometer); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/spread.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/helpers/spread.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ spread) -/* harmony export */ }); - - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * - * @returns {Function} - */ -function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/throttle.js": -/*!****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/throttle.js ***! - \****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/** - * Throttle decorator - * @param {Function} fn - * @param {Number} freq - * @return {Function} - */ -function throttle(fn, freq) { - let timestamp = 0; - let threshold = 1000 / freq; - let lastArgs; - let timer; - - const invoke = (args, now = Date.now()) => { - timestamp = now; - lastArgs = null; - if (timer) { - clearTimeout(timer); - timer = null; - } - fn.apply(null, args); - } - - const throttled = (...args) => { - const now = Date.now(); - const passed = now - timestamp; - if ( passed >= threshold) { - invoke(args, now); - } else { - lastArgs = args; - if (!timer) { - timer = setTimeout(() => { - timer = null; - invoke(lastArgs) - }, threshold - passed); - } - } - } - - const flush = () => lastArgs && invoke(lastArgs); - - return [throttled, flush]; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (throttle); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/toFormData.js": -/*!******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/toFormData.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -/* harmony import */ var _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/node/classes/FormData.js */ "./node_modules/axios/lib/helpers/null.js"); - - - - -// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored - - -/** - * Determines if the given thing is a array or js object. - * - * @param {string} thing - The object or array to be visited. - * - * @returns {boolean} - */ -function isVisitable(thing) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(thing) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(thing); -} - -/** - * It removes the brackets from the end of a string - * - * @param {string} key - The key of the parameter. - * - * @returns {string} the key without the brackets. - */ -function removeBrackets(key) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]') ? key.slice(0, -2) : key; -} - -/** - * It takes a path, a key, and a boolean, and returns a string - * - * @param {string} path - The path to the current key. - * @param {string} key - The key of the current object being iterated over. - * @param {string} dots - If true, the key will be rendered with dots instead of brackets. - * - * @returns {string} The path to the current key. - */ -function renderKey(path, key, dots) { - if (!path) return key; - return path.concat(key).map(function each(token, i) { - // eslint-disable-next-line no-param-reassign - token = removeBrackets(token); - return !dots && i ? '[' + token + ']' : token; - }).join(dots ? '.' : ''); -} - -/** - * If the array is an array and none of its elements are visitable, then it's a flat array. - * - * @param {Array} arr - The array to check - * - * @returns {boolean} - */ -function isFlatArray(arr) { - return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(arr) && !arr.some(isVisitable); -} - -const predicates = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"], {}, null, function filter(prop) { - return /^is[A-Z]/.test(prop); -}); - -/** - * Convert a data object to FormData - * - * @param {Object} obj - * @param {?Object} [formData] - * @param {?Object} [options] - * @param {Function} [options.visitor] - * @param {Boolean} [options.metaTokens = true] - * @param {Boolean} [options.dots = false] - * @param {?Boolean} [options.indexes = false] - * - * @returns {Object} - **/ - -/** - * It converts an object into a FormData object - * - * @param {Object} obj - The object to convert to form data. - * @param {string} formData - The FormData object to append to. - * @param {Object} options - * - * @returns - */ -function toFormData(obj, formData, options) { - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) { - throw new TypeError('target must be an object'); - } - - // eslint-disable-next-line no-param-reassign - formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"] || FormData)(); - - // eslint-disable-next-line no-param-reassign - options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(options, { - metaTokens: true, - dots: false, - indexes: false - }, false, function defined(option, source) { - // eslint-disable-next-line no-eq-null,eqeqeq - return !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(source[option]); - }); - - const metaTokens = options.metaTokens; - // eslint-disable-next-line no-use-before-define - const visitor = options.visitor || defaultVisitor; - const dots = options.dots; - const indexes = options.indexes; - const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; - const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData); - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) { - throw new TypeError('visitor must be a function'); - } - - function convertValue(value) { - if (value === null) return ''; - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isDate(value)) { - return value.toISOString(); - } - - if (!useBlob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(value)) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Blob is not supported. Use a Buffer instead.'); - } - - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isTypedArray(value)) { - return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); - } - - return value; - } - - /** - * Default visitor. - * - * @param {*} value - * @param {String|Number} key - * @param {Array} path - * @this {FormData} - * - * @returns {boolean} return true to visit the each prop of the value recursively - */ - function defaultVisitor(value, key, path) { - let arr = value; - - if (value && !path && typeof value === 'object') { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '{}')) { - // eslint-disable-next-line no-param-reassign - key = metaTokens ? key : key.slice(0, -2); - // eslint-disable-next-line no-param-reassign - value = JSON.stringify(value); - } else if ( - (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) && isFlatArray(value)) || - ((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value)) - )) { - // eslint-disable-next-line no-param-reassign - key = removeBrackets(key); - - arr.forEach(function each(el, index) { - !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && formData.append( - // eslint-disable-next-line no-nested-ternary - indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), - convertValue(el) - ); - }); - return false; - } - } - - if (isVisitable(value)) { - return true; - } - - formData.append(renderKey(path, key, dots), convertValue(value)); - - return false; - } - - const stack = []; - - const exposedHelpers = Object.assign(predicates, { - defaultVisitor, - convertValue, - isVisitable - }); - - function build(value, path) { - if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value)) return; - - if (stack.indexOf(value) !== -1) { - throw Error('Circular reference detected in ' + path.join('.')); - } - - stack.push(value); - - _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(value, function each(el, key) { - const result = !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && visitor.call( - formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(key) ? key.trim() : key, path, exposedHelpers - ); - - if (result === true) { - build(el, path ? path.concat(key) : [key]); - } - }); - - stack.pop(); - } - - if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) { - throw new TypeError('data must be an object'); - } - - build(obj); - - return formData; -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toFormData); - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/toURLEncodedForm.js": -/*!************************************************************!*\ - !*** ./node_modules/axios/lib/helpers/toURLEncodedForm.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ toURLEncodedForm) -/* harmony export */ }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); -/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js"); - - - - - - -function toURLEncodedForm(data, options) { - return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].classes.URLSearchParams(), Object.assign({ - visitor: function(value, key, path, helpers) { - if (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isBuffer(value)) { - this.append(key, value.toString('base64')); - return false; - } - - return helpers.defaultVisitor.apply(this, arguments); - } - }, options)); -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/trackStream.js": -/*!*******************************************************!*\ - !*** ./node_modules/axios/lib/helpers/trackStream.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ readBytes: () => (/* binding */ readBytes), -/* harmony export */ streamChunk: () => (/* binding */ streamChunk), -/* harmony export */ trackStream: () => (/* binding */ trackStream) -/* harmony export */ }); - -const streamChunk = function* (chunk, chunkSize) { - let len = chunk.byteLength; - - if (!chunkSize || len < chunkSize) { - yield chunk; - return; - } - - let pos = 0; - let end; - - while (pos < len) { - end = pos + chunkSize; - yield chunk.slice(pos, end); - pos = end; - } -} - -const readBytes = async function* (iterable, chunkSize) { - for await (const chunk of readStream(iterable)) { - yield* streamChunk(chunk, chunkSize); - } -} - -const readStream = async function* (stream) { - if (stream[Symbol.asyncIterator]) { - yield* stream; - return; - } - - const reader = stream.getReader(); - try { - for (;;) { - const {done, value} = await reader.read(); - if (done) { - break; - } - yield value; - } - } finally { - await reader.cancel(); - } -} - -const trackStream = (stream, chunkSize, onProgress, onFinish) => { - const iterator = readBytes(stream, chunkSize); - - let bytes = 0; - let done; - let _onFinish = (e) => { - if (!done) { - done = true; - onFinish && onFinish(e); - } - } - - return new ReadableStream({ - async pull(controller) { - try { - const {done, value} = await iterator.next(); - - if (done) { - _onFinish(); - controller.close(); - return; - } - - let len = value.byteLength; - if (onProgress) { - let loadedBytes = bytes += len; - onProgress(loadedBytes); - } - controller.enqueue(new Uint8Array(value)); - } catch (err) { - _onFinish(err); - throw err; - } - }, - cancel(reason) { - _onFinish(reason); - return iterator.return(); - } - }, { - highWaterMark: 2 - }) -} - - -/***/ }), - -/***/ "./node_modules/axios/lib/helpers/validator.js": -/*!*****************************************************!*\ - !*** ./node_modules/axios/lib/helpers/validator.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../env/data.js */ "./node_modules/axios/lib/env/data.js"); -/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - - - - - -const validators = {}; - -// eslint-disable-next-line func-names -['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { - validators[type] = function validator(thing) { - return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; - }; -}); - -const deprecatedWarnings = {}; - -/** - * Transitional option validator - * - * @param {function|boolean?} validator - set to false if the transitional option has been removed - * @param {string?} version - deprecated version / removed since version - * @param {string?} message - some message with additional info - * - * @returns {function} - */ -validators.transitional = function transitional(validator, version, message) { - function formatMessage(opt, desc) { - return '[Axios v' + _env_data_js__WEBPACK_IMPORTED_MODULE_0__.VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); - } - - // eslint-disable-next-line func-names - return (value, opt, opts) => { - if (validator === false) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]( - formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), - _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_DEPRECATED - ); - } - - if (version && !deprecatedWarnings[opt]) { - deprecatedWarnings[opt] = true; - // eslint-disable-next-line no-console - console.warn( - formatMessage( - opt, - ' has been deprecated since v' + version + ' and will be removed in the near future' - ) - ); - } - - return validator ? validator(value, opt, opts) : true; - }; -}; - -/** - * Assert object's properties type - * - * @param {object} options - * @param {object} schema - * @param {boolean?} allowUnknown - * - * @returns {object} - */ - -function assertOptions(options, schema, allowUnknown) { - if (typeof options !== 'object') { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('options must be an object', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE); - } - const keys = Object.keys(options); - let i = keys.length; - while (i-- > 0) { - const opt = keys[i]; - const validator = schema[opt]; - if (validator) { - const value = options[opt]; - const result = value === undefined || validator(value, opt, options); - if (result !== true) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('option ' + opt + ' must be ' + result, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE); - } - continue; - } - if (allowUnknown !== true) { - throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('Unknown option ' + opt, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION); - } - } -} - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - assertOptions, - validators -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/classes/Blob.js": -/*!*****************************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/classes/Blob.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof Blob !== 'undefined' ? Blob : null); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/classes/FormData.js": -/*!*********************************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/classes/FormData.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof FormData !== 'undefined' ? FormData : null); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js": -/*!****************************************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js ***! - \****************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/browser/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/axios/lib/platform/browser/index.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"); -/* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/FormData.js */ "./node_modules/axios/lib/platform/browser/classes/FormData.js"); -/* harmony import */ var _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./classes/Blob.js */ "./node_modules/axios/lib/platform/browser/classes/Blob.js"); - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - isBrowser: true, - classes: { - URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"], - FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"], - Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"] - }, - protocols: ['http', 'https', 'file', 'blob', 'url', 'data'] -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/common/utils.js": -/*!*********************************************************!*\ - !*** ./node_modules/axios/lib/platform/common/utils.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ hasBrowserEnv: () => (/* binding */ hasBrowserEnv), -/* harmony export */ hasStandardBrowserEnv: () => (/* binding */ hasStandardBrowserEnv), -/* harmony export */ hasStandardBrowserWebWorkerEnv: () => (/* binding */ hasStandardBrowserWebWorkerEnv), -/* harmony export */ navigator: () => (/* binding */ _navigator), -/* harmony export */ origin: () => (/* binding */ origin) -/* harmony export */ }); -const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; - -const _navigator = typeof navigator === 'object' && navigator || undefined; - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - * - * @returns {boolean} - */ -const hasStandardBrowserEnv = hasBrowserEnv && - (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); - -/** - * Determine if we're running in a standard browser webWorker environment - * - * Although the `isStandardBrowserEnv` method indicates that - * `allows axios to run in a web worker`, the WebWorker will still be - * filtered out due to its judgment standard - * `typeof window !== 'undefined' && typeof document !== 'undefined'`. - * This leads to a problem when axios post `FormData` in webWorker - */ -const hasStandardBrowserWebWorkerEnv = (() => { - return ( - typeof WorkerGlobalScope !== 'undefined' && - // eslint-disable-next-line no-undef - self instanceof WorkerGlobalScope && - typeof self.importScripts === 'function' - ); -})(); - -const origin = hasBrowserEnv && window.location.href || 'http://localhost'; - - - - -/***/ }), - -/***/ "./node_modules/axios/lib/platform/index.js": -/*!**************************************************!*\ - !*** ./node_modules/axios/lib/platform/index.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _node_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node/index.js */ "./node_modules/axios/lib/platform/browser/index.js"); -/* harmony import */ var _common_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/utils.js */ "./node_modules/axios/lib/platform/common/utils.js"); - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - ..._common_utils_js__WEBPACK_IMPORTED_MODULE_0__, - ..._node_index_js__WEBPACK_IMPORTED_MODULE_1__["default"] -}); - - -/***/ }), - -/***/ "./node_modules/axios/lib/utils.js": -/*!*****************************************!*\ - !*** ./node_modules/axios/lib/utils.js ***! - \*****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js"); - - - - -// utils is a library of generic helper functions non-specific to axios - -const {toString} = Object.prototype; -const {getPrototypeOf} = Object; - -const kindOf = (cache => thing => { - const str = toString.call(thing); - return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); -})(Object.create(null)); - -const kindOfTest = (type) => { - type = type.toLowerCase(); - return (thing) => kindOf(thing) === type -} - -const typeOfTest = type => thing => typeof thing === type; - -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * - * @returns {boolean} True if value is an Array, otherwise false - */ -const {isArray} = Array; - -/** - * Determine if a value is undefined - * - * @param {*} val The value to test - * - * @returns {boolean} True if the value is undefined, otherwise false - */ -const isUndefined = typeOfTest('undefined'); - -/** - * Determine if a value is a Buffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Buffer, otherwise false - */ -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); -} - -/** - * Determine if a value is an ArrayBuffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -const isArrayBuffer = kindOfTest('ArrayBuffer'); - - -/** - * Determine if a value is a view on an ArrayBuffer - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - let result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); - } - return result; -} - -/** - * Determine if a value is a String - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a String, otherwise false - */ -const isString = typeOfTest('string'); - -/** - * Determine if a value is a Function - * - * @param {*} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -const isFunction = typeOfTest('function'); - -/** - * Determine if a value is a Number - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Number, otherwise false - */ -const isNumber = typeOfTest('number'); - -/** - * Determine if a value is an Object - * - * @param {*} thing The value to test - * - * @returns {boolean} True if value is an Object, otherwise false - */ -const isObject = (thing) => thing !== null && typeof thing === 'object'; - -/** - * Determine if a value is a Boolean - * - * @param {*} thing The value to test - * @returns {boolean} True if value is a Boolean, otherwise false - */ -const isBoolean = thing => thing === true || thing === false; - -/** - * Determine if a value is a plain Object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a plain Object, otherwise false - */ -const isPlainObject = (val) => { - if (kindOf(val) !== 'object') { - return false; - } - - const prototype = getPrototypeOf(val); - return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); -} - -/** - * Determine if a value is a Date - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Date, otherwise false - */ -const isDate = kindOfTest('Date'); - -/** - * Determine if a value is a File - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a File, otherwise false - */ -const isFile = kindOfTest('File'); - -/** - * Determine if a value is a Blob - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Blob, otherwise false - */ -const isBlob = kindOfTest('Blob'); - -/** - * Determine if a value is a FileList - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a File, otherwise false - */ -const isFileList = kindOfTest('FileList'); - -/** - * Determine if a value is a Stream - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a Stream, otherwise false - */ -const isStream = (val) => isObject(val) && isFunction(val.pipe); - -/** - * Determine if a value is a FormData - * - * @param {*} thing The value to test - * - * @returns {boolean} True if value is an FormData, otherwise false - */ -const isFormData = (thing) => { - let kind; - return thing && ( - (typeof FormData === 'function' && thing instanceof FormData) || ( - isFunction(thing.append) && ( - (kind = kindOf(thing)) === 'formdata' || - // detect form-data instance - (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') - ) - ) - ) -} - -/** - * Determine if a value is a URLSearchParams object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -const isURLSearchParams = kindOfTest('URLSearchParams'); - -const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest); - -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * - * @returns {String} The String freed of excess whitespace - */ -const trim = (str) => str.trim ? - str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - * - * @param {Boolean} [allOwnKeys = false] - * @returns {any} - */ -function forEach(obj, fn, {allOwnKeys = false} = {}) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - let i; - let l; - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); - const len = keys.length; - let key; - - for (i = 0; i < len; i++) { - key = keys[i]; - fn.call(null, obj[key], key, obj); - } - } -} - -function findKey(obj, key) { - key = key.toLowerCase(); - const keys = Object.keys(obj); - let i = keys.length; - let _key; - while (i-- > 0) { - _key = keys[i]; - if (key === _key.toLowerCase()) { - return _key; - } - } - return null; -} - -const _global = (() => { - /*eslint no-undef:0*/ - if (typeof globalThis !== "undefined") return globalThis; - return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global) -})(); - -const isContextDefined = (context) => !isUndefined(context) && context !== _global; - -/** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - const {caseless} = isContextDefined(this) && this || {}; - const result = {}; - const assignValue = (val, key) => { - const targetKey = caseless && findKey(result, key) || key; - if (isPlainObject(result[targetKey]) && isPlainObject(val)) { - result[targetKey] = merge(result[targetKey], val); - } else if (isPlainObject(val)) { - result[targetKey] = merge({}, val); - } else if (isArray(val)) { - result[targetKey] = val.slice(); - } else { - result[targetKey] = val; - } - } - - for (let i = 0, l = arguments.length; i < l; i++) { - arguments[i] && forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * - * @param {Boolean} [allOwnKeys] - * @returns {Object} The resulting value of object a - */ -const extend = (a, b, thisArg, {allOwnKeys}= {}) => { - forEach(b, (val, key) => { - if (thisArg && isFunction(val)) { - a[key] = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__["default"])(val, thisArg); - } else { - a[key] = val; - } - }, {allOwnKeys}); - return a; -} - -/** - * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - * - * @param {string} content with BOM - * - * @returns {string} content value without BOM - */ -const stripBOM = (content) => { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -} - -/** - * Inherit the prototype methods from one constructor into another - * @param {function} constructor - * @param {function} superConstructor - * @param {object} [props] - * @param {object} [descriptors] - * - * @returns {void} - */ -const inherits = (constructor, superConstructor, props, descriptors) => { - constructor.prototype = Object.create(superConstructor.prototype, descriptors); - constructor.prototype.constructor = constructor; - Object.defineProperty(constructor, 'super', { - value: superConstructor.prototype - }); - props && Object.assign(constructor.prototype, props); -} - -/** - * Resolve object with deep prototype chain to a flat object - * @param {Object} sourceObj source object - * @param {Object} [destObj] - * @param {Function|Boolean} [filter] - * @param {Function} [propFilter] - * - * @returns {Object} - */ -const toFlatObject = (sourceObj, destObj, filter, propFilter) => { - let props; - let i; - let prop; - const merged = {}; - - destObj = destObj || {}; - // eslint-disable-next-line no-eq-null,eqeqeq - if (sourceObj == null) return destObj; - - do { - props = Object.getOwnPropertyNames(sourceObj); - i = props.length; - while (i-- > 0) { - prop = props[i]; - if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { - destObj[prop] = sourceObj[prop]; - merged[prop] = true; - } - } - sourceObj = filter !== false && getPrototypeOf(sourceObj); - } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); - - return destObj; -} - -/** - * Determines whether a string ends with the characters of a specified string - * - * @param {String} str - * @param {String} searchString - * @param {Number} [position= 0] - * - * @returns {boolean} - */ -const endsWith = (str, searchString, position) => { - str = String(str); - if (position === undefined || position > str.length) { - position = str.length; - } - position -= searchString.length; - const lastIndex = str.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; -} - - -/** - * Returns new array from array like object or null if failed - * - * @param {*} [thing] - * - * @returns {?Array} - */ -const toArray = (thing) => { - if (!thing) return null; - if (isArray(thing)) return thing; - let i = thing.length; - if (!isNumber(i)) return null; - const arr = new Array(i); - while (i-- > 0) { - arr[i] = thing[i]; - } - return arr; -} - -/** - * Checking if the Uint8Array exists and if it does, it returns a function that checks if the - * thing passed in is an instance of Uint8Array - * - * @param {TypedArray} - * - * @returns {Array} - */ -// eslint-disable-next-line func-names -const isTypedArray = (TypedArray => { - // eslint-disable-next-line func-names - return thing => { - return TypedArray && thing instanceof TypedArray; - }; -})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); - -/** - * For each entry in the object, call the function with the key and value. - * - * @param {Object} obj - The object to iterate over. - * @param {Function} fn - The function to call for each entry. - * - * @returns {void} - */ -const forEachEntry = (obj, fn) => { - const generator = obj && obj[Symbol.iterator]; - - const iterator = generator.call(obj); - - let result; - - while ((result = iterator.next()) && !result.done) { - const pair = result.value; - fn.call(obj, pair[0], pair[1]); - } -} - -/** - * It takes a regular expression and a string, and returns an array of all the matches - * - * @param {string} regExp - The regular expression to match against. - * @param {string} str - The string to search. - * - * @returns {Array} - */ -const matchAll = (regExp, str) => { - let matches; - const arr = []; - - while ((matches = regExp.exec(str)) !== null) { - arr.push(matches); - } - - return arr; -} - -/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ -const isHTMLForm = kindOfTest('HTMLFormElement'); - -const toCamelCase = str => { - return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, - function replacer(m, p1, p2) { - return p1.toUpperCase() + p2; - } - ); -}; - -/* Creating a function that will check if an object has a property. */ -const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); - -/** - * Determine if a value is a RegExp object - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is a RegExp object, otherwise false - */ -const isRegExp = kindOfTest('RegExp'); - -const reduceDescriptors = (obj, reducer) => { - const descriptors = Object.getOwnPropertyDescriptors(obj); - const reducedDescriptors = {}; - - forEach(descriptors, (descriptor, name) => { - let ret; - if ((ret = reducer(descriptor, name, obj)) !== false) { - reducedDescriptors[name] = ret || descriptor; - } - }); - - Object.defineProperties(obj, reducedDescriptors); -} - -/** - * Makes all methods read-only - * @param {Object} obj - */ - -const freezeMethods = (obj) => { - reduceDescriptors(obj, (descriptor, name) => { - // skip restricted props in strict mode - if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { - return false; - } - - const value = obj[name]; - - if (!isFunction(value)) return; - - descriptor.enumerable = false; - - if ('writable' in descriptor) { - descriptor.writable = false; - return; - } - - if (!descriptor.set) { - descriptor.set = () => { - throw Error('Can not rewrite read-only method \'' + name + '\''); - }; - } - }); -} - -const toObjectSet = (arrayOrString, delimiter) => { - const obj = {}; - - const define = (arr) => { - arr.forEach(value => { - obj[value] = true; - }); - } - - isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); - - return obj; -} - -const noop = () => {} - -const toFiniteNumber = (value, defaultValue) => { - return value != null && Number.isFinite(value = +value) ? value : defaultValue; -} - -const ALPHA = 'abcdefghijklmnopqrstuvwxyz' - -const DIGIT = '0123456789'; - -const ALPHABET = { - DIGIT, - ALPHA, - ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT -} - -const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str = ''; - const {length} = alphabet; - while (size--) { - str += alphabet[Math.random() * length|0] - } - - return str; -} - -/** - * If the thing is a FormData object, return true, otherwise return false. - * - * @param {unknown} thing - The thing to check. - * - * @returns {boolean} - */ -function isSpecCompliantForm(thing) { - return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]); -} - -const toJSONObject = (obj) => { - const stack = new Array(10); - - const visit = (source, i) => { - - if (isObject(source)) { - if (stack.indexOf(source) >= 0) { - return; - } - - if(!('toJSON' in source)) { - stack[i] = source; - const target = isArray(source) ? [] : {}; - - forEach(source, (value, key) => { - const reducedValue = visit(value, i + 1); - !isUndefined(reducedValue) && (target[key] = reducedValue); - }); - - stack[i] = undefined; - - return target; - } - } - - return source; - } - - return visit(obj, 0); -} - -const isAsyncFn = kindOfTest('AsyncFunction'); - -const isThenable = (thing) => - thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); - -// original code -// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 - -const _setImmediate = ((setImmediateSupported, postMessageSupported) => { - if (setImmediateSupported) { - return setImmediate; - } - - return postMessageSupported ? ((token, callbacks) => { - _global.addEventListener("message", ({source, data}) => { - if (source === _global && data === token) { - callbacks.length && callbacks.shift()(); - } - }, false); - - return (cb) => { - callbacks.push(cb); - _global.postMessage(token, "*"); - } - })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); -})( - typeof setImmediate === 'function', - isFunction(_global.postMessage) -); - -const asap = typeof queueMicrotask !== 'undefined' ? - queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate); - -// ********************* - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - isArray, - isArrayBuffer, - isBuffer, - isFormData, - isArrayBufferView, - isString, - isNumber, - isBoolean, - isObject, - isPlainObject, - isReadableStream, - isRequest, - isResponse, - isHeaders, - isUndefined, - isDate, - isFile, - isBlob, - isRegExp, - isFunction, - isStream, - isURLSearchParams, - isTypedArray, - isFileList, - forEach, - merge, - extend, - trim, - stripBOM, - inherits, - toFlatObject, - kindOf, - kindOfTest, - endsWith, - toArray, - forEachEntry, - matchAll, - isHTMLForm, - hasOwnProperty, - hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection - reduceDescriptors, - freezeMethods, - toObjectSet, - toCamelCase, - noop, - toFiniteNumber, - findKey, - global: _global, - isContextDefined, - ALPHABET, - generateString, - isSpecCompliantForm, - toJSONObject, - isAsyncFn, - isThenable, - setImmediate: _setImmediate, - asap -}); - - -/***/ }), - -/***/ "./node_modules/react-intersection-observer/dist/index.mjs": -/*!*****************************************************************!*\ - !*** ./node_modules/react-intersection-observer/dist/index.mjs ***! - \*****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ InView: () => (/* binding */ InView), -/* harmony export */ defaultFallbackInView: () => (/* binding */ defaultFallbackInView), -/* harmony export */ observe: () => (/* binding */ observe), -/* harmony export */ useInView: () => (/* binding */ useInView) -/* harmony export */ }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); -"use client"; -var __defProp = Object.defineProperty; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); - -// src/InView.tsx - - -// src/observe.ts -var observerMap = /* @__PURE__ */ new Map(); -var RootIds = /* @__PURE__ */ new WeakMap(); -var rootId = 0; -var unsupportedValue = void 0; -function defaultFallbackInView(inView) { - unsupportedValue = inView; -} -function getRootId(root) { - if (!root) return "0"; - if (RootIds.has(root)) return RootIds.get(root); - rootId += 1; - RootIds.set(root, rootId.toString()); - return RootIds.get(root); -} -function optionsToId(options) { - return Object.keys(options).sort().filter( - (key) => options[key] !== void 0 - ).map((key) => { - return `${key}_${key === "root" ? getRootId(options.root) : options[key]}`; - }).toString(); -} -function createObserver(options) { - const id = optionsToId(options); - let instance = observerMap.get(id); - if (!instance) { - const elements = /* @__PURE__ */ new Map(); - let thresholds; - const observer = new IntersectionObserver((entries) => { - entries.forEach((entry) => { - var _a; - const inView = entry.isIntersecting && thresholds.some((threshold) => entry.intersectionRatio >= threshold); - if (options.trackVisibility && typeof entry.isVisible === "undefined") { - entry.isVisible = inView; - } - (_a = elements.get(entry.target)) == null ? void 0 : _a.forEach((callback) => { - callback(inView, entry); - }); - }); - }, options); - thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]); - instance = { - id, - observer, - elements - }; - observerMap.set(id, instance); - } - return instance; -} -function observe(element, callback, options = {}, fallbackInView = unsupportedValue) { - if (typeof window.IntersectionObserver === "undefined" && fallbackInView !== void 0) { - const bounds = element.getBoundingClientRect(); - callback(fallbackInView, { - isIntersecting: fallbackInView, - target: element, - intersectionRatio: typeof options.threshold === "number" ? options.threshold : 0, - time: 0, - boundingClientRect: bounds, - intersectionRect: bounds, - rootBounds: bounds - }); - return () => { - }; - } - const { id, observer, elements } = createObserver(options); - const callbacks = elements.get(element) || []; - if (!elements.has(element)) { - elements.set(element, callbacks); - } - callbacks.push(callback); - observer.observe(element); - return function unobserve() { - callbacks.splice(callbacks.indexOf(callback), 1); - if (callbacks.length === 0) { - elements.delete(element); - observer.unobserve(element); - } - if (elements.size === 0) { - observer.disconnect(); - observerMap.delete(id); - } - }; -} - -// src/InView.tsx -function isPlainChildren(props) { - return typeof props.children !== "function"; -} -var InView = class extends react__WEBPACK_IMPORTED_MODULE_0__.Component { - constructor(props) { - super(props); - __publicField(this, "node", null); - __publicField(this, "_unobserveCb", null); - __publicField(this, "handleNode", (node) => { - if (this.node) { - this.unobserve(); - if (!node && !this.props.triggerOnce && !this.props.skip) { - this.setState({ inView: !!this.props.initialInView, entry: void 0 }); - } - } - this.node = node ? node : null; - this.observeNode(); - }); - __publicField(this, "handleChange", (inView, entry) => { - if (inView && this.props.triggerOnce) { - this.unobserve(); - } - if (!isPlainChildren(this.props)) { - this.setState({ inView, entry }); - } - if (this.props.onChange) { - this.props.onChange(inView, entry); - } - }); - this.state = { - inView: !!props.initialInView, - entry: void 0 - }; - } - componentDidMount() { - this.unobserve(); - this.observeNode(); - } - componentDidUpdate(prevProps) { - if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) { - this.unobserve(); - this.observeNode(); - } - } - componentWillUnmount() { - this.unobserve(); - } - observeNode() { - if (!this.node || this.props.skip) return; - const { - threshold, - root, - rootMargin, - trackVisibility, - delay, - fallbackInView - } = this.props; - this._unobserveCb = observe( - this.node, - this.handleChange, - { - threshold, - root, - rootMargin, - // @ts-ignore - trackVisibility, - // @ts-ignore - delay - }, - fallbackInView - ); - } - unobserve() { - if (this._unobserveCb) { - this._unobserveCb(); - this._unobserveCb = null; - } - } - render() { - const { children } = this.props; - if (typeof children === "function") { - const { inView, entry } = this.state; - return children({ inView, entry, ref: this.handleNode }); - } - const { - as, - triggerOnce, - threshold, - root, - rootMargin, - onChange, - skip, - trackVisibility, - delay, - initialInView, - fallbackInView, - ...props - } = this.props; - return react__WEBPACK_IMPORTED_MODULE_0__.createElement( - as || "div", - { ref: this.handleNode, ...props }, - children - ); - } -}; - -// src/useInView.tsx - -function useInView({ - threshold, - delay, - trackVisibility, - rootMargin, - root, - triggerOnce, - skip, - initialInView, - fallbackInView, - onChange -} = {}) { - var _a; - const [ref, setRef] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null); - const callback = react__WEBPACK_IMPORTED_MODULE_0__.useRef(); - const [state, setState] = react__WEBPACK_IMPORTED_MODULE_0__.useState({ - inView: !!initialInView, - entry: void 0 - }); - callback.current = onChange; - react__WEBPACK_IMPORTED_MODULE_0__.useEffect( - () => { - if (skip || !ref) return; - let unobserve; - unobserve = observe( - ref, - (inView, entry) => { - setState({ - inView, - entry - }); - if (callback.current) callback.current(inView, entry); - if (entry.isIntersecting && triggerOnce && unobserve) { - unobserve(); - unobserve = void 0; - } - }, - { - root, - rootMargin, - threshold, - // @ts-ignore - trackVisibility, - // @ts-ignore - delay - }, - fallbackInView - ); - return () => { - if (unobserve) { - unobserve(); - } - }; - }, - // We break the rule here, because we aren't including the actual `threshold` variable - // eslint-disable-next-line react-hooks/exhaustive-deps - [ - // If the threshold is an array, convert it to a string, so it won't change between renders. - Array.isArray(threshold) ? threshold.toString() : threshold, - ref, - root, - rootMargin, - triggerOnce, - skip, - trackVisibility, - fallbackInView, - delay - ] - ); - const entryTarget = (_a = state.entry) == null ? void 0 : _a.target; - const previousEntryTarget = react__WEBPACK_IMPORTED_MODULE_0__.useRef(); - if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) { - previousEntryTarget.current = entryTarget; - setState({ - inView: !!initialInView, - entry: void 0 - }); - } - const result = [setRef, state.inView, state.entry]; - result.ref = result[0]; - result.inView = result[1]; - result.entry = result[2]; - return result; -} - -//# sourceMappingURL=index.mjs.map - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/compat get default export */ -/******/ (() => { -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = (module) => { -/******/ var getter = module && module.__esModule ? -/******/ () => (module['default']) : -/******/ () => (module); -/******/ __webpack_require__.d(getter, { a: getter }); -/******/ return getter; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/global */ -/******/ (() => { -/******/ __webpack_require__.g = (function() { -/******/ if (typeof globalThis === 'object') return globalThis; -/******/ try { -/******/ return this || new Function('return this')(); -/******/ } catch (e) { -/******/ if (typeof window === 'object') return window; -/******/ } -/******/ })(); -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/publicPath */ -/******/ (() => { -/******/ var scriptUrl; -/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; -/******/ var document = __webpack_require__.g.document; -/******/ if (!scriptUrl && document) { -/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') -/******/ scriptUrl = document.currentScript.src; -/******/ if (!scriptUrl) { -/******/ var scripts = document.getElementsByTagName("script"); -/******/ if(scripts.length) { -/******/ var i = scripts.length - 1; -/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; -/******/ } -/******/ } -/******/ } -/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration -/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. -/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); -/******/ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); -/******/ __webpack_require__.p = scriptUrl + "../"; -/******/ })(); -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. -(() => { -"use strict"; -/*!**********************************!*\ - !*** ./src/js/plugin-sidebar.js ***! - \**********************************/ -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins"); -/* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _editor_plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor/plugin */ "./src/js/editor/plugin/index.js"); -/* harmony import */ var _editor_plugin_components_Menu__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor/plugin/components/Menu */ "./src/js/editor/plugin/components/Menu.js"); - - - - - -/** - * Instant Images as a Gutenberg Plugin Sidebar. - * - * @return {JSX.Element} The InstantImagesPlugin component. - */ -var InstantImagesPlugin = function InstantImagesPlugin() { - return /*#__PURE__*/React.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/React.createElement(_editor_plugin_components_Menu__WEBPACK_IMPORTED_MODULE_3__["default"], null), /*#__PURE__*/React.createElement(_editor_plugin__WEBPACK_IMPORTED_MODULE_2__["default"], null)); -}; - -// Register the sidebar plugin. -(0,_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__.registerPlugin)('instant-images', { - render: InstantImagesPlugin -}); -})(); - -/******/ })() -; -//# sourceMappingURL=index.js.map \ No newline at end of file +(()=>{var e={955:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],a=[],o=[],s=[],l=[],c=[],u=[],f=[],h=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,a[p]=n;var m=e[n],v=e[m],g=e[v],y=257*e[p]^16843008*p;o[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,l[n]=y<<8|y>>>24,c[n]=y,y=16843009*g^65537*v^257*m^16843008*n,u[p]=y<<24|y>>>8,f[p]=y<<16|y>>>16,h[p]=y<<8|y>>>24,d[p]=y,n?(n=m^e[e[e[g^m]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),a=this._keySchedule=[],o=0;o6&&o%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[o/n|0]<<24),a[o]=a[o-n]^c);for(var s=this._invKeySchedule=[],l=0;l>>24]]^f[i[c>>>16&255]]^h[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,l,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,f,h,d,a),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,a,o,s){for(var l=this._nRounds,c=e[t]^n[0],u=e[t+1]^n[1],f=e[t+2]^n[2],h=e[t+3]^n[3],d=4,p=1;p>>24]^i[u>>>16&255]^a[f>>>8&255]^o[255&h]^n[d++],v=r[u>>>24]^i[f>>>16&255]^a[h>>>8&255]^o[255&c]^n[d++],g=r[f>>>24]^i[h>>>16&255]^a[c>>>8&255]^o[255&u]^n[d++],y=r[h>>>24]^i[c>>>16&255]^a[u>>>8&255]^o[255&f]^n[d++];c=m,u=v,f=g,h=y}m=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^n[d++],v=(s[u>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^n[d++],g=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^n[d++],y=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&f])^n[d++],e[t]=m,e[t+1]=v,e[t+2]=g,e[t+3]=y},keySize:8});e.AES=t._createHelper(m)}(),r.AES)},3128:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.BlockCipher,n=e.algo;const i=16,a=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],o=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function l(e,t){let n=t>>24&255,r=t>>16&255,i=t>>8&255,a=255&t,o=e.sbox[0][n]+e.sbox[1][r];return o^=e.sbox[2][i],o+=e.sbox[3][a],o}function c(e,t,n){let r,a=t,o=n;for(let t=0;t=n&&(r=0);let i=0,s=0,l=0;for(let t=0;t<18;t+=2)l=c(e,i,s),i=l.left,s=l.right,e.pbox[t]=i,e.pbox[t+1]=s;for(let t=0;t<4;t++)for(let n=0;n<256;n+=2)l=c(e,i,s),i=l.left,s=l.right,e.sbox[t][n]=i,e.sbox[t][n+1]=s}(s,t,n)}},encryptBlock:function(e,t){var n=c(s,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},decryptBlock:function(e,t){var n=function(e,t,n){let r,i=t,a=n;for(let t=17;t>1;--t)i^=e.pbox[t],a=l(e,i)^a,r=i,i=a,a=r;return r=i,i=a,a=r,a^=e.pbox[1],i^=e.pbox[0],{left:i,right:a}}(s,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=t._createHelper(u)}(),r.Blowfish)},7165:function(e,t,n){var r,i,a,o,s,l,c,u,f,h,d,p,m,v,g,y,b,_,w;e.exports=(r=n(9021),n(9506),void(r.lib.Cipher||(i=r,a=i.lib,o=a.Base,s=a.WordArray,l=a.BufferedBlockAlgorithm,c=i.enc,c.Utf8,u=c.Base64,f=i.algo.EvpKDF,h=a.Cipher=l.extend({cfg:o.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){l.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?w:b}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),a.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),d=i.mode={},p=a.BlockCipherMode=o.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),m=d.CBC=function(){var e=p.extend();function t(e,t,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var a=0;a>>2];e.sigBytes-=t}},a.BlockCipher=h.extend({cfg:h.cfg.extend({mode:m,padding:v}),reset:function(){var e;h.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),g=a.CipherParams=o.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),y=(i.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?s.create([1398893684,1701076831]).concat(n).concat(t):t).toString(u)},parse:function(e){var t,n=u.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=s.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:t})}},b=a.SerializableCipher=o.extend({cfg:o.extend({format:y}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),a=i.finalize(t),o=i.cfg;return g.create({ciphertext:a,key:n,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=(i.kdf={}).OpenSSL={execute:function(e,t,n,r,i){if(r||(r=s.random(8)),i)a=f.create({keySize:t+n,hasher:i}).compute(e,r);else var a=f.create({keySize:t+n}).compute(e,r);var o=s.create(a.words.slice(t),4*n);return a.sigBytes=4*t,g.create({key:a,iv:o,salt:r})}},w=a.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:_}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=i.iv;var a=b.encrypt.call(this,e,t,i.key,r);return a.mixIn(i),a},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=i.iv,b.decrypt.call(this,e,t,i.key,r)}}))))},9021:function(e,t,n){var r;e.exports=(r=r||function(e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),"undefined"!=typeof self&&self.crypto&&(t=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(t=globalThis.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&void 0!==n.g&&n.g.crypto&&(t=n.g.crypto),!t)try{t=n(477)}catch(e){}var r=function(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),a={},o=a.lib={},s=o.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=o.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var a=0;a>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(var s=0;s>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((15&a).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},f=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new l.init(n,t)}},h=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},d=o.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,a=r.sigBytes,o=this.blockSize,s=a/(4*o),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,u=e.min(4*c,a);if(c){for(var f=0;f>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s>>6*(3-s)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i>>6-o%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return a.create(r,i)}(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},r.enc.Base64)},4725:function(e,t,n){var r,i,a;e.exports=(r=n(9021),a=(i=r).lib.WordArray,i.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var n=e.words,r=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var a=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(n[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|n[o+2>>>2]>>>24-(o+2)%4*8&255,l=0;l<4&&o+.75*l>>6*(3-l)&63));var c=i.charAt(64);if(c)for(;a.length%4;)a.push(c);return a.join("")},parse:function(e,t){void 0===t&&(t=!0);var n=e.length,r=t?this._safe_map:this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o>>6-o%4*2;r[i>>>2]|=s<<24-i%4*8,i++}return a.create(r,i)}(e,n,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},r.enc.Base64url)},5503:function(e,t,n){var r;e.exports=(r=n(9021),function(){var e=r,t=e.lib.WordArray,n=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var n=e.length,r=[],i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(r,2*n)}},n.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],a=0;a>>2]>>>16-a%4*8&65535);r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var n=e.length,r=[],a=0;a>>1]|=i(e.charCodeAt(a)<<16-a%2*16);return t.create(r,2*n)}}}(),r.enc.Utf16)},9506:function(e,t,n){var r,i,a,o,s,l,c,u;e.exports=(u=n(9021),n(5471),n(1025),a=(i=(r=u).lib).Base,o=i.WordArray,l=(s=r.algo).MD5,c=s.EvpKDF=a.extend({cfg:a.extend({keySize:4,hasher:l,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,i=r.hasher.create(),a=o.create(),s=a.words,l=r.keySize,c=r.iterations;s.lengthr&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),s=i.words,l=o.words,c=0;c>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)};n.prototype=e}}(),r.lib.WordArray)},4636:function(e,t,n){var r;e.exports=(r=n(9021),function(e){var t=r,n=t.lib,i=n.WordArray,a=n.Hasher,o=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=e[t+0],l=e[t+1],d=e[t+2],p=e[t+3],m=e[t+4],v=e[t+5],g=e[t+6],y=e[t+7],b=e[t+8],_=e[t+9],w=e[t+10],E=e[t+11],R=e[t+12],S=e[t+13],x=e[t+14],k=e[t+15],O=a[0],A=a[1],C=a[2],B=a[3];O=c(O,A,C,B,o,7,s[0]),B=c(B,O,A,C,l,12,s[1]),C=c(C,B,O,A,d,17,s[2]),A=c(A,C,B,O,p,22,s[3]),O=c(O,A,C,B,m,7,s[4]),B=c(B,O,A,C,v,12,s[5]),C=c(C,B,O,A,g,17,s[6]),A=c(A,C,B,O,y,22,s[7]),O=c(O,A,C,B,b,7,s[8]),B=c(B,O,A,C,_,12,s[9]),C=c(C,B,O,A,w,17,s[10]),A=c(A,C,B,O,E,22,s[11]),O=c(O,A,C,B,R,7,s[12]),B=c(B,O,A,C,S,12,s[13]),C=c(C,B,O,A,x,17,s[14]),O=u(O,A=c(A,C,B,O,k,22,s[15]),C,B,l,5,s[16]),B=u(B,O,A,C,g,9,s[17]),C=u(C,B,O,A,E,14,s[18]),A=u(A,C,B,O,o,20,s[19]),O=u(O,A,C,B,v,5,s[20]),B=u(B,O,A,C,w,9,s[21]),C=u(C,B,O,A,k,14,s[22]),A=u(A,C,B,O,m,20,s[23]),O=u(O,A,C,B,_,5,s[24]),B=u(B,O,A,C,x,9,s[25]),C=u(C,B,O,A,p,14,s[26]),A=u(A,C,B,O,b,20,s[27]),O=u(O,A,C,B,S,5,s[28]),B=u(B,O,A,C,d,9,s[29]),C=u(C,B,O,A,y,14,s[30]),O=f(O,A=u(A,C,B,O,R,20,s[31]),C,B,v,4,s[32]),B=f(B,O,A,C,b,11,s[33]),C=f(C,B,O,A,E,16,s[34]),A=f(A,C,B,O,x,23,s[35]),O=f(O,A,C,B,l,4,s[36]),B=f(B,O,A,C,m,11,s[37]),C=f(C,B,O,A,y,16,s[38]),A=f(A,C,B,O,w,23,s[39]),O=f(O,A,C,B,S,4,s[40]),B=f(B,O,A,C,o,11,s[41]),C=f(C,B,O,A,p,16,s[42]),A=f(A,C,B,O,g,23,s[43]),O=f(O,A,C,B,_,4,s[44]),B=f(B,O,A,C,R,11,s[45]),C=f(C,B,O,A,k,16,s[46]),O=h(O,A=f(A,C,B,O,d,23,s[47]),C,B,o,6,s[48]),B=h(B,O,A,C,y,10,s[49]),C=h(C,B,O,A,x,15,s[50]),A=h(A,C,B,O,v,21,s[51]),O=h(O,A,C,B,R,6,s[52]),B=h(B,O,A,C,p,10,s[53]),C=h(C,B,O,A,w,15,s[54]),A=h(A,C,B,O,l,21,s[55]),O=h(O,A,C,B,b,6,s[56]),B=h(B,O,A,C,k,10,s[57]),C=h(C,B,O,A,g,15,s[58]),A=h(A,C,B,O,S,21,s[59]),O=h(O,A,C,B,m,6,s[60]),B=h(B,O,A,C,E,10,s[61]),C=h(C,B,O,A,d,15,s[62]),A=h(A,C,B,O,_,21,s[63]),a[0]=a[0]+O|0,a[1]=a[1]+A|0,a[2]=a[2]+C|0,a[3]=a[3]+B|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var a=e.floor(r/4294967296),o=r;n[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),n[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+i+o;return(s<>>32-a)+t}function u(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+i+o;return(s<>>32-a)+t}function f(e,t,n,r,i,a,o){var s=e+(t^n^r)+i+o;return(s<>>32-a)+t}function h(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+i+o;return(s<>>32-a)+t}t.MD5=a._createHelper(l),t.HmacMD5=a._createHmacHelper(l)}(Math),r.MD5)},2169:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();function t(e,t,n,r){var i,a=this._iv;a?(i=a.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var o=0;o>24))e+=1<<24;else{var t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}return e}var n=e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(o);var s=o.slice(0);r.encryptBlock(s,0);for(var l=0;l>>2]|=i<<24-a%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Ansix923)},4905:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)},482:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)},8124:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},2155:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},r.pad.ZeroPadding)},19:function(e,t,n){var r,i,a,o,s,l,c,u,f;e.exports=(f=n(9021),n(3009),n(1025),a=(i=(r=f).lib).Base,o=i.WordArray,l=(s=r.algo).SHA256,c=s.HMAC,u=s.PBKDF2=a.extend({cfg:a.extend({keySize:4,hasher:l,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=c.create(n.hasher,e),i=o.create(),a=o.create([1]),s=i.words,l=a.words,u=n.keySize,f=n.iterations;s.length>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var a=t.words,o=a[0],s=a[1],c=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&u,h=u<<16|65535&c;for(r[0]^=c,r[1]^=f,r[2]^=u,r[3]^=h,r[4]^=c,r[5]^=f,r[6]^=u,r[7]^=h,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);o[n]=l^c}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)},6298:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],a=[],o=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var a=t.words,o=a[0],s=a[1],c=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&u,h=u<<16|65535&c;for(i[0]^=c,i[1]^=f,i[2]^=u,i[3]^=h,i[4]^=c,i[5]^=f,i[6]^=u,i[7]^=h,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);o[n]=l^c}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)},7193:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var a=0;i<256;i++){var o=i%n,s=t[o>>>2]>>>24-o%4*8&255;a=(a+r[i]+s)%256;var l=r[i];r[i]=r[a],r[a]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:8,ivSize:0});function a(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var a=e[t];e[t]=e[n],e[n]=a,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}e.RC4=t._createHelper(i);var o=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)a.call(this)}});e.RC4Drop=t._createHelper(o)}(),r.RC4)},8056:function(e,t,n){var r;e.exports=(r=n(9021),function(){var e=r,t=e.lib,n=t.WordArray,i=t.Hasher,a=e.algo,o=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),f=n.create([1352829926,1548603684,1836072691,2053994217,0]),h=a.RIPEMD160=i.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a,h,b,_,w,E,R,S,x,k,O,A=this._hash.words,C=u.words,B=f.words,L=o.words,N=s.words,T=l.words,j=c.words;for(E=a=A[0],R=h=A[1],S=b=A[2],x=_=A[3],k=w=A[4],n=0;n<80;n+=1)O=a+e[t+L[n]]|0,O+=n<16?d(h,b,_)+C[0]:n<32?p(h,b,_)+C[1]:n<48?m(h,b,_)+C[2]:n<64?v(h,b,_)+C[3]:g(h,b,_)+C[4],O=(O=y(O|=0,T[n]))+w|0,a=w,w=_,_=y(b,10),b=h,h=O,O=E+e[t+N[n]]|0,O+=n<16?g(R,S,x)+B[0]:n<32?v(R,S,x)+B[1]:n<48?m(R,S,x)+B[2]:n<64?p(R,S,x)+B[3]:d(R,S,x)+B[4],O=(O=y(O|=0,j[n]))+k|0,E=k,k=x,x=y(S,10),S=R,R=O;O=A[1]+b+x|0,A[1]=A[2]+_+k|0,A[2]=A[3]+w+E|0,A[3]=A[4]+a+R|0,A[4]=A[0]+h+S|0,A[0]=O},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,a=i.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,n){return e^t^n}function p(e,t,n){return e&t|~e&n}function m(e,t,n){return(e|~t)^n}function v(e,t,n){return e&n|t&~n}function g(e,t,n){return e^(t|~n)}function y(e,t){return e<>>32-t}e.RIPEMD160=i._createHelper(h),e.HmacRIPEMD160=i._createHmacHelper(h)}(Math),r.RIPEMD160)},5471:function(e,t,n){var r,i,a,o,s,l,c,u;e.exports=(i=(r=u=n(9021)).lib,a=i.WordArray,o=i.Hasher,s=r.algo,l=[],c=s.SHA1=o.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=0;c<80;c++){if(c<16)l[c]=0|e[t+c];else{var u=l[c-3]^l[c-8]^l[c-14]^l[c-16];l[c]=u<<1|u>>>31}var f=(r<<5|r>>>27)+s+l[c];f+=c<20?1518500249+(i&a|~i&o):c<40?1859775393+(i^a^o):c<60?(i&a|i&o|a&o)-1894007588:(i^a^o)-899497514,s=o,o=a,a=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=o._createHelper(c),r.HmacSHA1=o._createHmacHelper(c),u.SHA1)},6308:function(e,t,n){var r,i,a,o,s,l;e.exports=(l=n(9021),n(3009),i=(r=l).lib.WordArray,a=r.algo,o=a.SHA256,s=a.SHA224=o.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=o._doFinalize.call(this);return e.sigBytes-=4,e}}),r.SHA224=o._createHelper(s),r.HmacSHA224=o._createHmacHelper(s),l.SHA224)},3009:function(e,t,n){var r;e.exports=(r=n(9021),function(e){var t=r,n=t.lib,i=n.WordArray,a=n.Hasher,o=t.algo,s=[],l=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=n(e.pow(r,.5))),l[i]=n(e.pow(r,1/3)),i++),r++}();var c=[],u=o.SHA256=a.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=0;d<64;d++){if(d<16)c[d]=0|e[t+d];else{var p=c[d-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=c[d-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;c[d]=m+c[d-7]+g+c[d-16]}var y=r&i^r&a^i&a,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),_=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&f)+l[d]+c[d];h=f,f=u,u=s,s=o+_|0,o=a,a=i,i=r,r=_+(b+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+f|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(u),t.HmacSHA256=a._createHmacHelper(u)}(Math),r.SHA256)},5953:function(e,t,n){var r;e.exports=(r=n(9021),n(3240),function(e){var t=r,n=t.lib,i=n.WordArray,a=n.Hasher,o=t.x64.Word,s=t.algo,l=[],c=[],u=[];!function(){for(var e=1,t=0,n=0;n<24;n++){l[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,a=0;a<24;a++){for(var s=0,f=0,h=0;h<7;h++){if(1&i){var d=(1<>>24)|4278255360&(a<<24|a>>>8),o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),(A=n[i]).high^=o,A.low^=a}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var d=0,p=0,m=0;m<5;m++)d^=(A=n[h+5*m]).high,p^=A.low;var v=f[h];v.high=d,v.low=p}for(h=0;h<5;h++){var g=f[(h+4)%5],y=f[(h+1)%5],b=y.high,_=y.low;for(d=g.high^(b<<1|_>>>31),p=g.low^(_<<1|b>>>31),m=0;m<5;m++)(A=n[h+5*m]).high^=d,A.low^=p}for(var w=1;w<25;w++){var E=(A=n[w]).high,R=A.low,S=l[w];S<32?(d=E<>>32-S,p=R<>>32-S):(d=R<>>64-S,p=E<>>64-S);var x=f[c[w]];x.high=d,x.low=p}var k=f[0],O=n[0];for(k.high=O.high,k.low=O.low,h=0;h<5;h++)for(m=0;m<5;m++){var A=n[w=h+5*m],C=f[w],B=f[(h+1)%5+5*m],L=f[(h+2)%5+5*m];A.high=C.high^~B.high&L.high,A.low=C.low^~B.low&L.low}A=n[0];var N=u[s];A.high^=N.high,A.low^=N.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(this._nDataBytes,8*t.sigBytes),a=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/a)*a>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var o=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u>>24)|4278255360&(h<<24|h>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),c.push(d),c.push(h)}return new i.init(c,s)},clone:function(){for(var e=a.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=a._createHelper(h),t.HmacSHA3=a._createHmacHelper(h)}(Math),r.SHA3)},9557:function(e,t,n){var r,i,a,o,s,l,c,u;e.exports=(u=n(9021),n(3240),n(1380),i=(r=u).x64,a=i.Word,o=i.WordArray,s=r.algo,l=s.SHA512,c=s.SHA384=l.extend({_doReset:function(){this._hash=new o.init([new a.init(3418070365,3238371032),new a.init(1654270250,914150663),new a.init(2438529370,812702999),new a.init(355462360,4144912697),new a.init(1731405415,4290775857),new a.init(2394180231,1750603025),new a.init(3675008525,1694076839),new a.init(1203062813,3204075428)])},_doFinalize:function(){var e=l._doFinalize.call(this);return e.sigBytes-=16,e}}),r.SHA384=l._createHelper(c),r.HmacSHA384=l._createHmacHelper(c),u.SHA384)},1380:function(e,t,n){var r;e.exports=(r=n(9021),n(3240),function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,a=n.WordArray,o=e.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var u=o.SHA512=t.extend({_doReset:function(){this._hash=new a.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=n[5],f=n[6],h=n[7],d=r.high,p=r.low,m=i.high,v=i.low,g=a.high,y=a.low,b=o.high,_=o.low,w=s.high,E=s.low,R=u.high,S=u.low,x=f.high,k=f.low,O=h.high,A=h.low,C=d,B=p,L=m,N=v,T=g,j=y,z=b,P=_,I=w,M=E,D=R,F=S,H=x,W=k,U=O,q=A,V=0;V<80;V++){var G,J,K=c[V];if(V<16)J=K.high=0|e[t+2*V],G=K.low=0|e[t+2*V+1];else{var Y=c[V-15],$=Y.high,X=Y.low,Z=($>>>1|X<<31)^($>>>8|X<<24)^$>>>7,Q=(X>>>1|$<<31)^(X>>>8|$<<24)^(X>>>7|$<<25),ee=c[V-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),ae=c[V-7],oe=ae.high,se=ae.low,le=c[V-16],ce=le.high,ue=le.low;J=(J=(J=Z+oe+((G=Q+se)>>>0>>0?1:0))+re+((G+=ie)>>>0>>0?1:0))+ce+((G+=ue)>>>0>>0?1:0),K.high=J,K.low=G}var fe,he=I&D^~I&H,de=M&F^~M&W,pe=C&L^C&T^L&T,me=B&N^B&j^N&j,ve=(C>>>28|B<<4)^(C<<30|B>>>2)^(C<<25|B>>>7),ge=(B>>>28|C<<4)^(B<<30|C>>>2)^(B<<25|C>>>7),ye=(I>>>14|M<<18)^(I>>>18|M<<14)^(I<<23|M>>>9),be=(M>>>14|I<<18)^(M>>>18|I<<14)^(M<<23|I>>>9),_e=l[V],we=_e.high,Ee=_e.low,Re=U+ye+((fe=q+be)>>>0>>0?1:0),Se=ge+me;U=H,q=W,H=D,W=F,D=I,F=M,I=z+(Re=(Re=(Re=Re+he+((fe+=de)>>>0>>0?1:0))+we+((fe+=Ee)>>>0>>0?1:0))+J+((fe+=G)>>>0>>0?1:0))+((M=P+fe|0)>>>0

>>0?1:0)|0,z=T,P=j,T=L,j=N,L=C,N=B,C=Re+(ve+pe+(Se>>>0>>0?1:0))+((B=fe+Se|0)>>>0>>0?1:0)|0}p=r.low=p+B,r.high=d+C+(p>>>0>>0?1:0),v=i.low=v+N,i.high=m+L+(v>>>0>>0?1:0),y=a.low=y+j,a.high=g+T+(y>>>0>>0?1:0),_=o.low=_+P,o.high=b+z+(_>>>0

>>0?1:0),E=s.low=E+M,s.high=w+I+(E>>>0>>0?1:0),S=u.low=S+F,u.high=R+D+(S>>>0>>0?1:0),k=f.low=k+W,f.high=x+H+(k>>>0>>0?1:0),A=h.low=A+q,h.high=O+U+(A>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(u),e.HmacSHA512=t._createHmacHelper(u)}(),r.SHA512)},7628:function(e,t,n){var r;e.exports=(r=n(9021),n(754),n(4636),n(9506),n(7165),function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,a=e.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=a.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=o[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],a=0;a<16;a++){var c=i[a]=[],u=l[a];for(n=0;n<24;n++)c[n/6|0]|=t[(s[n]-1+u)%28]<<31-n%6,c[4+(n/6|0)]|=t[28+(s[n+24]-1+u)%28]<<31-n%6;for(c[0]=c[0]<<1|c[0]>>>31,n=1;n<7;n++)c[n]=c[n]>>>4*(n-1)+3;c[7]=c[7]<<5|c[7]>>>27}var f=this._invSubKeys=[];for(n=0;n<16;n++)f[n]=i[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],a=this._lBlock,o=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((o^i[l])&u[l])>>>0];this._lBlock=o,this._rBlock=a^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,h.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=f.createEncryptor(n.create(t)),this._des2=f.createEncryptor(n.create(r)),this._des3=f.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),r.TripleDES)},3240:function(e,t,n){var r,i,a,o,s,l;e.exports=(r=n(9021),a=(i=r).lib,o=a.Base,s=a.WordArray,(l=i.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),l.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r{var r,i;!function(a,o){"use strict";void 0===(i="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i)}(window,(function(){"use strict";var e=function(){var e=window.Element.prototype;if(e.matches)return"matches";if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],n=0;n{var r,i;!function(a){r=[n(9786)],i=function(e){return function(e,t){"use strict";var n={extend:function(e,t){for(var n in t)e[n]=t[n];return e},modulo:function(e,t){return(e%t+t)%t}},r=Array.prototype.slice;n.makeArray=function(e){return Array.isArray(e)?e:null==e?[]:"object"==typeof e&&"number"==typeof e.length?r.call(e):[e]},n.removeFrom=function(e,t){var n=e.indexOf(t);-1!=n&&e.splice(n,1)},n.getParent=function(e,n){for(;e.parentNode&&e!=document.body;)if(e=e.parentNode,t(e,n))return e},n.getQueryElement=function(e){return"string"==typeof e?document.querySelector(e):e},n.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},n.filterFindElements=function(e,r){e=n.makeArray(e);var i=[];return e.forEach((function(e){if(e instanceof HTMLElement)if(r){t(e,r)&&i.push(e);for(var n=e.querySelectorAll(r),a=0;a{var r,i;window,void 0===(i="function"==typeof(r=function(){"use strict";function e(e){var t=parseFloat(e);return-1==e.indexOf("%")&&!isNaN(t)&&t}var t="undefined"==typeof console?function(){}:function(e){console.error(e)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],r=n.length;function i(e){var n=getComputedStyle(e);return n||t("Style returned "+n+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),n}var a,o=!1;function s(t){if(function(){if(!o){o=!0;var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(t);var r=i(t);a=200==Math.round(e(r.width)),s.isBoxSizeOuter=a,n.removeChild(t)}}(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var l=i(t);if("none"==l.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t{setTimeout((()=>{this.progress(e,t,n)}))};this.images.forEach((function(t){t.once("progress",e),t.check()}))},i.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&r&&r.log(`progress: ${n}`,e,t)},i.prototype.complete=function(){let e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){let e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},s.prototype=Object.create(t.prototype),s.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},s.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},s.prototype.confirm=function(e,t){this.isLoaded=e;let{parentNode:n}=this.img,r="PICTURE"===n.nodeName?n:this.img;this.emitEvent("progress",[this,r,t])},s.prototype.handleEvent=function(e){let t="on"+e.type;this[t]&&this[t](e)},s.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},s.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},s.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},l.prototype=Object.create(s.prototype),l.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},l.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},l.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},i.makeJQueryPlugin=function(t){(t=t||e.jQuery)&&(n=t,n.fn.imagesLoaded=function(e,t){return new i(this,e,t).jqDeferred.promise(n(this))})},i.makeJQueryPlugin(),i}))},6994:(e,t,n)=>{var r,i,a;window,i=[n(2831),n(1485)],void 0===(a="function"==typeof(r=function(e,t){"use strict";var n=e.create("masonry");n.compatOptions.fitWidth="isFitWidth";var r=n.prototype;return r._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var e=0;e1&&n+e>this.cols?0:n;var r=t.size.outerWidth&&t.size.outerHeight;return this.horizontalColIndex=r?n+e:this.horizontalColIndex,{col:n,y:this._getColGroupY(n,e)}},r._manageStamp=function(e){var n=t(e),r=this._getElementOffset(e),i=this._getOption("originLeft")?r.left:r.right,a=i+n.outerWidth,o=Math.floor(i/this.columnWidth);o=Math.max(0,o);var s=Math.floor(a/this.columnWidth);s-=a%this.columnWidth?0:1,s=Math.min(this.cols-1,s);for(var l=(this._getOption("originTop")?r.top:r.bottom)+n.outerHeight,c=o;c<=s;c++)this.colYs[c]=Math.max(l,this.colYs[c])},r._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var e={height:this.maxY};return this._getOption("fitWidth")&&(e.width=this._getContainerFitWidth()),e},r._getContainerFitWidth=function(){for(var e=0,t=this.cols;--t&&0===this.colYs[t];)e++;return(this.cols-e)*this.columnWidth-this.gutter},r.needsResizeLayout=function(){var e=this.containerWidth;return this.getContainerWidth(),e!=this.containerWidth},n})?r.apply(t,i):r)||(e.exports=a)},3169:(e,t,n)=>{var r,i,a;window,i=[n(7738),n(1485)],void 0===(a="function"==typeof(r=function(e,t){"use strict";var n=document.documentElement.style,r="string"==typeof n.transition?"transition":"WebkitTransition",i="string"==typeof n.transform?"transform":"WebkitTransform",a={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],o={transform:i,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"};function s(e,t){e&&(this.element=e,this.layout=t,this.position={x:0,y:0},this._create())}var l=s.prototype=Object.create(e.prototype);l.constructor=s,l._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},l.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},l.getSize=function(){this.size=t(this.element)},l.css=function(e){var t=this.element.style;for(var n in e)t[o[n]||n]=e[n]},l.getPosition=function(){var e=getComputedStyle(this.element),t=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),r=e[t?"left":"right"],i=e[n?"top":"bottom"],a=parseFloat(r),o=parseFloat(i),s=this.layout.size;-1!=r.indexOf("%")&&(a=a/100*s.width),-1!=i.indexOf("%")&&(o=o/100*s.height),a=isNaN(a)?0:a,o=isNaN(o)?0:o,a-=t?s.paddingLeft:s.paddingRight,o-=n?s.paddingTop:s.paddingBottom,this.position.x=a,this.position.y=o},l.layoutPosition=function(){var e=this.layout.size,t={},n=this.layout._getOption("originLeft"),r=this.layout._getOption("originTop"),i=n?"paddingLeft":"paddingRight",a=n?"left":"right",o=n?"right":"left",s=this.position.x+e[i];t[a]=this.getXValue(s),t[o]="";var l=r?"paddingTop":"paddingBottom",c=r?"top":"bottom",u=r?"bottom":"top",f=this.position.y+e[l];t[c]=this.getYValue(f),t[u]="",this.css(t),this.emitEvent("layout",[this])},l.getXValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!t?e/this.layout.size.width*100+"%":e+"px"},l.getYValue=function(e){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&t?e/this.layout.size.height*100+"%":e+"px"},l._transitionTo=function(e,t){this.getPosition();var n=this.position.x,r=this.position.y,i=e==this.position.x&&t==this.position.y;if(this.setPosition(e,t),!i||this.isTransitioning){var a=e-n,o=t-r,s={};s.transform=this.getTranslate(a,o),this.transition({to:s,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},l.getTranslate=function(e,t){return"translate3d("+(e=this.layout._getOption("originLeft")?e:-e)+"px, "+(t=this.layout._getOption("originTop")?t:-t)+"px, 0)"},l.goTo=function(e,t){this.setPosition(e,t),this.layoutPosition()},l.moveTo=l._transitionTo,l.setPosition=function(e,t){this.position.x=parseFloat(e),this.position.y=parseFloat(t)},l._nonTransition=function(e){for(var t in this.css(e.to),e.isCleaning&&this._removeStyles(e.to),e.onTransitionEnd)e.onTransitionEnd[t].call(this)},l.transition=function(e){if(parseFloat(this.layout.options.transitionDuration)){var t=this._transn;for(var n in e.onTransitionEnd)t.onEnd[n]=e.onTransitionEnd[n];for(n in e.to)t.ingProperties[n]=!0,e.isCleaning&&(t.clean[n]=!0);e.from&&(this.css(e.from),this.element.offsetHeight),this.enableTransition(e.to),this.css(e.to),this.isTransitioning=!0}else this._nonTransition(e)};var c="opacity,"+i.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}));l.enableTransition=function(){if(!this.isTransitioning){var e=this.layout.options.transitionDuration;e="number"==typeof e?e+"ms":e,this.css({transitionProperty:c,transitionDuration:e,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(a,this,!1)}},l.onwebkitTransitionEnd=function(e){this.ontransitionend(e)},l.onotransitionend=function(e){this.ontransitionend(e)};var u={"-webkit-transform":"transform"};l.ontransitionend=function(e){if(e.target===this.element){var t=this._transn,n=u[e.propertyName]||e.propertyName;delete t.ingProperties[n],function(e){for(var t in e)return!1;return!0}(t.ingProperties)&&this.disableTransition(),n in t.clean&&(this.element.style[e.propertyName]="",delete t.clean[n]),n in t.onEnd&&(t.onEnd[n].call(this),delete t.onEnd[n]),this.emitEvent("transitionEnd",[this])}},l.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(a,this,!1),this.isTransitioning=!1},l._removeStyles=function(e){var t={};for(var n in e)t[n]="";this.css(t)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return l.removeTransitionStyles=function(){this.css(f)},l.stagger=function(e){e=isNaN(e)?0:e,this.staggerDelay=e+"ms"},l.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},l.remove=function(){r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",(function(){this.removeElem()})),this.hide()):this.removeElem()},l.reveal=function(){delete this.isHidden,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:e.hiddenStyle,to:e.visibleStyle,isCleaning:!0,onTransitionEnd:t})},l.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},l.getHideRevealTransitionEndProperty=function(e){var t=this.layout.options[e];if(t.opacity)return"opacity";for(var n in t)return n},l.hide=function(){this.isHidden=!0,this.css({display:""});var e=this.layout.options,t={};t[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:e.visibleStyle,to:e.hiddenStyle,isCleaning:!0,onTransitionEnd:t})},l.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},l.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},s})?r.apply(t,i):r)||(e.exports=a)},7738:function(e,t,n){var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},r=n[e]=n[e]||[];return-1==r.indexOf(t)&&r.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var r=n.indexOf(t);return-1!=r&&n.splice(r,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var r=this._onceEvents&&this._onceEvents[e],i=0;i{var r,i;!function(a){"use strict";r=[n(7738),n(1485),n(977),n(3169)],i=function(e,t,n,r){return function(e,t,n,r,i){var a=e.console,o=e.jQuery,s=function(){},l=0,c={};function u(e,t){var n=r.getQueryElement(e);if(n){this.element=n,o&&(this.$element=o(this.element)),this.options=r.extend({},this.constructor.defaults),this.option(t);var i=++l;this.element.outlayerGUID=i,c[i]=this,this._create(),this._getOption("initLayout")&&this.layout()}else a&&a.error("Bad element for "+this.constructor.namespace+": "+(n||e))}u.namespace="outlayer",u.Item=i,u.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=u.prototype;function h(e){function t(){e.apply(this,arguments)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t}r.extend(f,t.prototype),f.option=function(e){r.extend(this.options,e)},f._getOption=function(e){var t=this.constructor.compatOptions[e];return t&&void 0!==this.options[t]?this.options[t]:this.options[e]},u.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),r.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(e){for(var t=this._filterFindItemElements(e),n=this.constructor.Item,r=[],i=0;i{},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=r[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e+"../"})(),(()=>{"use strict";var e={};n.r(e),n.d(e,{hasBrowserEnv:()=>ge,hasStandardBrowserEnv:()=>be,hasStandardBrowserWebWorkerEnv:()=>_e,navigator:()=>ye,origin:()=>we});const t=window.wp.element,r=window.wp.plugins,i=window.wp.editor;function a(){return React.createElement("span",{className:"instant-images-sidebar-icon"},React.createElement(o,null))}function o(){return React.createElement("svg",{viewBox:"0 0 31 58",width:"13px",height:"24px"},React.createElement("polygon",{points:"20 0 20 23 31 23 11 58 11 34 0 34 20 0",fill:"#4a7bc5"}))}function s(){return React.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("title",null,"Instant Images Icon"),React.createElement("path",{d:"M0 8C0 3.58172 3.58172 0 8 0H72C76.4183 0 80 3.58172 80 8V72C80 76.4183 76.4183 80 72 80H8C3.58172 80 0 76.4183 0 72V8Z",fill:"#647FE8"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z",fill:"white"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5816H44.4385V16.1215L27 44.0693H36.5V65Z",fill:"white"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z",fill:"#C7D2FF"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.5 65L52.5 36.5817H44.4385L36.5 44.0693V65Z",fill:"#C7D2FF"}))}function l(e,t){return function(){return e.apply(t,arguments)}}const{toString:c}=Object.prototype,{getPrototypeOf:u}=Object,f=(h=Object.create(null),e=>{const t=c.call(e);return h[t]||(h[t]=t.slice(8,-1).toLowerCase())});var h;const d=e=>(e=e.toLowerCase(),t=>f(t)===e),p=e=>t=>typeof t===e,{isArray:m}=Array,v=p("undefined"),g=d("ArrayBuffer"),y=p("string"),b=p("function"),_=p("number"),w=e=>null!==e&&"object"==typeof e,E=e=>{if("object"!==f(e))return!1;const t=u(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},R=d("Date"),S=d("File"),x=d("Blob"),k=d("FileList"),O=d("URLSearchParams"),[A,C,B,L]=["ReadableStream","Request","Response","Headers"].map(d);function N(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),m(e))for(r=0,i=e.length;r0;)if(r=n[i],t===r.toLowerCase())return r;return null}const j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,z=e=>!v(e)&&e!==j,P=(I="undefined"!=typeof Uint8Array&&u(Uint8Array),e=>I&&e instanceof I);var I;const M=d("HTMLFormElement"),D=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),F=d("RegExp"),H=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};N(n,((n,i)=>{let a;!1!==(a=t(n,i,e))&&(r[i]=a||n)})),Object.defineProperties(e,r)},W="abcdefghijklmnopqrstuvwxyz",U="0123456789",q={DIGIT:U,ALPHA:W,ALPHA_DIGIT:W+W.toUpperCase()+U},V=d("AsyncFunction"),G=(J="function"==typeof setImmediate,K=b(j.postMessage),J?setImmediate:K?(Y=`axios@${Math.random()}`,$=[],j.addEventListener("message",(({source:e,data:t})=>{e===j&&t===Y&&$.length&&$.shift()()}),!1),e=>{$.push(e),j.postMessage(Y,"*")}):e=>setTimeout(e));var J,K,Y,$;const X="undefined"!=typeof queueMicrotask?queueMicrotask.bind(j):"undefined"!=typeof process&&process.nextTick||G,Z={isArray:m,isArrayBuffer:g,isBuffer:function(e){return null!==e&&!v(e)&&null!==e.constructor&&!v(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=f(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&g(e.buffer),t},isString:y,isNumber:_,isBoolean:e=>!0===e||!1===e,isObject:w,isPlainObject:E,isReadableStream:A,isRequest:C,isResponse:B,isHeaders:L,isUndefined:v,isDate:R,isFile:S,isBlob:x,isRegExp:F,isFunction:b,isStream:e=>w(e)&&b(e.pipe),isURLSearchParams:O,isTypedArray:P,isFileList:k,forEach:N,merge:function e(){const{caseless:t}=z(this)&&this||{},n={},r=(r,i)=>{const a=t&&T(n,i)||i;E(n[a])&&E(r)?n[a]=e(n[a],r):E(r)?n[a]=e({},r):m(r)?n[a]=r.slice():n[a]=r};for(let e=0,t=arguments.length;e(N(t,((t,r)=>{n&&b(t)?e[r]=l(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],r&&!r(o,e,t)||s[o]||(t[o]=e[o],s[o]=!0);e=!1!==n&&u(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:f,kindOfTest:d,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!_(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:M,hasOwnProperty:D,hasOwnProp:D,reduceDescriptors:H,freezeMethods:e=>{H(e,((t,n)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];b(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return m(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:T,global:j,isContextDefined:z,ALPHABET:q,generateString:(e=16,t=q.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(w(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=m(e)?[]:{};return N(e,((e,t)=>{const a=n(e,r+1);!v(a)&&(i[t]=a)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:V,isThenable:e=>e&&(w(e)||b(e))&&b(e.then)&&b(e.catch),setImmediate:G,asap:X};function Q(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}Z.inherits(Q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Z.toJSONObject(this.config),code:this.code,status:this.status}}});const ee=Q.prototype,te={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{te[e]={value:e}})),Object.defineProperties(Q,te),Object.defineProperty(ee,"isAxiosError",{value:!0}),Q.from=(e,t,n,r,i,a)=>{const o=Object.create(ee);return Z.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Q.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const ne=Q;function re(e){return Z.isPlainObject(e)||Z.isArray(e)}function ie(e){return Z.endsWith(e,"[]")?e.slice(0,-2):e}function ae(e,t,n){return e?e.concat(t).map((function(e,t){return e=ie(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const oe=Z.toFlatObject(Z,{},null,(function(e){return/^is[A-Z]/.test(e)})),se=function(e,t,n){if(!Z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Z.isUndefined(t[e])}))).metaTokens,i=n.visitor||c,a=n.dots,o=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Z.isSpecCompliantForm(t);if(!Z.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Z.isDate(e))return e.toISOString();if(!s&&Z.isBlob(e))throw new ne("Blob is not supported. Use a Buffer instead.");return Z.isArrayBuffer(e)||Z.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,i){let s=e;if(e&&!i&&"object"==typeof e)if(Z.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Z.isArray(e)&&function(e){return Z.isArray(e)&&!e.some(re)}(e)||(Z.isFileList(e)||Z.endsWith(n,"[]"))&&(s=Z.toArray(e)))return n=ie(n),s.forEach((function(e,r){!Z.isUndefined(e)&&null!==e&&t.append(!0===o?ae([n],r,a):null===o?n:n+"[]",l(e))})),!1;return!!re(e)||(t.append(ae(i,n,a),l(e)),!1)}const u=[],f=Object.assign(oe,{defaultVisitor:c,convertValue:l,isVisitable:re});if(!Z.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Z.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Z.forEach(n,(function(n,a){!0===(!(Z.isUndefined(n)||null===n)&&i.call(t,n,Z.isString(a)?a.trim():a,r,f))&&e(n,r?r.concat(a):[a])})),u.pop()}}(e),t};function le(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ce(e,t){this._pairs=[],e&&se(e,this,t)}const ue=ce.prototype;ue.append=function(e,t){this._pairs.push([e,t])},ue.toString=function(e){const t=e?function(t){return e.call(this,t,le)}:le;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const fe=ce;function he(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function de(e,t,n){if(!t)return e;const r=n&&n.encode||he,i=n&&n.serialize;let a;if(a=i?i(t,n):Z.isURLSearchParams(t)?t.toString():new fe(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}const pe=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Z.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},me={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ve={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:fe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ge="undefined"!=typeof window&&"undefined"!=typeof document,ye="object"==typeof navigator&&navigator||void 0,be=ge&&(!ye||["ReactNative","NativeScript","NS"].indexOf(ye.product)<0),_e="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,we=ge&&window.location.href||"http://localhost",Ee={...e,...ve},Re=function(e){function t(e,n,r,i){let a=e[i++];if("__proto__"===a)return!0;const o=Number.isFinite(+a),s=i>=e.length;return a=!a&&Z.isArray(r)?r.length:a,s?(Z.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o):(r[a]&&Z.isObject(r[a])||(r[a]=[]),t(e,n,r[a],i)&&Z.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r{t(function(e){return Z.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},Se={transitional:me,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=Z.isObject(e);if(i&&Z.isHTMLForm(e)&&(e=new FormData(e)),Z.isFormData(e))return r?JSON.stringify(Re(e)):e;if(Z.isArrayBuffer(e)||Z.isBuffer(e)||Z.isStream(e)||Z.isFile(e)||Z.isBlob(e)||Z.isReadableStream(e))return e;if(Z.isArrayBufferView(e))return e.buffer;if(Z.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return se(e,new Ee.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Ee.isNode&&Z.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=Z.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return se(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e){if(Z.isString(e))try{return(0,JSON.parse)(e),Z.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Se.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Z.isResponse(e)||Z.isReadableStream(e))return e;if(e&&Z.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw ne.from(e,ne.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ee.classes.FormData,Blob:Ee.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch"],(e=>{Se.headers[e]={}}));const xe=Se,ke=Z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Oe=Symbol("internals");function Ae(e){return e&&String(e).trim().toLowerCase()}function Ce(e){return!1===e||null==e?e:Z.isArray(e)?e.map(Ce):String(e)}function Be(e,t,n,r,i){return Z.isFunction(r)?r.call(this,t,n):(i&&(t=n),Z.isString(t)?Z.isString(r)?-1!==t.indexOf(r):Z.isRegExp(r)?r.test(t):void 0:void 0)}class Le{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Ae(t);if(!i)throw new Error("header name must be a non-empty string");const a=Z.findKey(r,i);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=Ce(e))}const a=(e,t)=>Z.forEach(e,((e,n)=>i(e,n,t)));if(Z.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(Z.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&ke[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(Z.isHeaders(e))for(const[t,r]of e.entries())i(r,t,n);else null!=e&&i(t,e,n);return this}get(e,t){if(e=Ae(e)){const n=Z.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Z.isFunction(t))return t.call(this,e,n);if(Z.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ae(e)){const n=Z.findKey(this,e);return!(!n||void 0===this[n]||t&&!Be(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Ae(e)){const i=Z.findKey(n,e);!i||t&&!Be(0,n[i],i,t)||(delete n[i],r=!0)}}return Z.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!Be(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return Z.forEach(this,((r,i)=>{const a=Z.findKey(n,i);if(a)return t[a]=Ce(r),void delete t[i];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();o!==i&&delete t[i],t[o]=Ce(r),n[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Z.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Z.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Oe]=this[Oe]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Ae(e);t[r]||(function(e,t){const n=Z.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return Z.isArray(e)?e.forEach(r):r(e),this}}Le.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Z.reduceDescriptors(Le.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Z.freezeMethods(Le);const Ne=Le;function Te(e,t){const n=this||xe,r=t||n,i=Ne.from(r.headers);let a=r.data;return Z.forEach(e,(function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)})),i.normalize(),a}function je(e){return!(!e||!e.__CANCEL__)}function ze(e,t,n){ne.call(this,null==e?"canceled":e,ne.ERR_CANCELED,t,n),this.name="CanceledError"}Z.inherits(ze,ne,{__CANCEL__:!0});const Pe=ze;function Ie(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new ne("Request failed with status code "+n.status,[ne.ERR_BAD_REQUEST,ne.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Me=(e,t,n=3)=>{let r=0;const i=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,a=0,o=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[o];i||(i=l),n[a]=s,r[a]=l;let u=o,f=0;for(;u!==a;)f+=n[u++],u%=e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),l-i{i=a,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-i;s>=a?o(e,t):(n=e,r||(r=setTimeout((()=>{r=null,o(n)}),a-s)))},()=>n&&o(n)]}((n=>{const a=n.loaded,o=n.lengthComputable?n.total:void 0,s=a-r,l=i(s);r=a,e({loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&a<=o?(o-a)/l:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),n)},De=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Fe=e=>(...t)=>Z.asap((()=>e(...t))),He=Ee.hasStandardBrowserEnv?function(){const e=Ee.navigator&&/(msie|trident)/i.test(Ee.navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=Z.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},We=Ee.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const o=[e+"="+encodeURIComponent(t)];Z.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Z.isString(r)&&o.push("path="+r),Z.isString(i)&&o.push("domain="+i),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ue(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const qe=e=>e instanceof Ne?{...e}:e;function Ve(e,t){t=t||{};const n={};function r(e,t,n){return Z.isPlainObject(e)&&Z.isPlainObject(t)?Z.merge.call({caseless:n},e,t):Z.isPlainObject(t)?Z.merge({},t):Z.isArray(t)?t.slice():t}function i(e,t,n){return Z.isUndefined(t)?Z.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function a(e,t){if(!Z.isUndefined(t))return r(void 0,t)}function o(e,t){return Z.isUndefined(t)?Z.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,a){return a in t?r(n,i):a in e?r(void 0,n):void 0}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t)=>i(qe(e),qe(t),!0)};return Z.forEach(Object.keys(Object.assign({},e,t)),(function(r){const a=l[r]||i,o=a(e[r],t[r],r);Z.isUndefined(o)&&a!==s||(n[r]=o)})),n}const Ge=e=>{const t=Ve({},e);let n,{data:r,withXSRFToken:i,xsrfHeaderName:a,xsrfCookieName:o,headers:s,auth:l}=t;if(t.headers=s=Ne.from(s),t.url=de(Ue(t.baseURL,t.url),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),Z.isFormData(r))if(Ee.hasStandardBrowserEnv||Ee.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(Ee.hasStandardBrowserEnv&&(i&&Z.isFunction(i)&&(i=i(t)),i||!1!==i&&He(t.url))){const e=a&&o&&We.read(o);e&&s.set(a,e)}return t},Je="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Ge(e);let i=r.data;const a=Ne.from(r.headers).normalize();let o,s,l,c,u,{responseType:f,onUploadProgress:h,onDownloadProgress:d}=r;function p(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let m=new XMLHttpRequest;function v(){if(!m)return;const r=Ne.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Ie((function(e){t(e),p()}),(function(e){n(e),p()}),{data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=v:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(v)},m.onabort=function(){m&&(n(new ne("Request aborted",ne.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new ne("Network Error",ne.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||me;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new ne(t,i.clarifyTimeoutError?ne.ETIMEDOUT:ne.ECONNABORTED,e,m)),m=null},void 0===i&&a.setContentType(null),"setRequestHeader"in m&&Z.forEach(a.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),Z.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),f&&"json"!==f&&(m.responseType=r.responseType),d&&([l,u]=Me(d,!0),m.addEventListener("progress",l)),h&&m.upload&&([s,c]=Me(h),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(o=t=>{m&&(n(!t||t.type?new Pe(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);g&&-1===Ee.protocols.indexOf(g)?n(new ne("Unsupported protocol "+g+":",ne.ERR_BAD_REQUEST,e)):m.send(i||null)}))},Ke=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof ne?t:new Pe(t instanceof Error?t.message:t))}};let a=t&&setTimeout((()=>{a=null,i(new ne(`timeout ${t} of ms exceeded`,ne.ETIMEDOUT))}),t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)})),e=null)};e.forEach((e=>e.addEventListener("abort",i)));const{signal:s}=r;return s.unsubscribe=()=>Z.asap(o),s}},Ye=function*(e,t){let n=e.byteLength;if(!t||n{const i=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*Ye(n,t)}(e,t);let a,o=0,s=e=>{a||(a=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return s(),void e.close();let a=r.byteLength;if(n){let e=o+=a;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),i.return())},{highWaterMark:2})},Xe="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ze=Xe&&"function"==typeof ReadableStream,Qe=Xe&&("function"==typeof TextEncoder?(et=new TextEncoder,e=>et.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var et;const tt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},nt=Ze&&tt((()=>{let e=!1;const t=new Request(Ee.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),rt=Ze&&tt((()=>Z.isReadableStream(new Response("").body))),it={stream:rt&&(e=>e.body)};var at;Xe&&(at=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!it[e]&&(it[e]=Z.isFunction(at[e])?t=>t[e]():(t,n)=>{throw new ne(`Response type '${e}' is not supported`,ne.ERR_NOT_SUPPORT,n)})})));const ot={http:null,xhr:Je,fetch:Xe&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:a,timeout:o,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:h}=Ge(e);c=c?(c+"").toLowerCase():"text";let d,p=Ke([i,a&&a.toAbortSignal()],o);const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let v;try{if(l&&nt&&"get"!==n&&"head"!==n&&0!==(v=await(async(e,t)=>{const n=Z.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Z.isBlob(e))return e.size;if(Z.isSpecCompliantForm(e)){const t=new Request(Ee.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Z.isArrayBufferView(e)||Z.isArrayBuffer(e)?e.byteLength:(Z.isURLSearchParams(e)&&(e+=""),Z.isString(e)?(await Qe(e)).byteLength:void 0)})(t):n})(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Z.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=De(v,Me(Fe(l)));r=$e(n.body,65536,e,t)}}Z.isString(f)||(f=f?"include":"omit");const i="credentials"in Request.prototype;d=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:i?f:void 0});let a=await fetch(d);const o=rt&&("stream"===c||"response"===c);if(rt&&(s||o&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=a[t]}));const t=Z.toFiniteNumber(a.headers.get("content-length")),[n,r]=s&&De(t,Me(Fe(s),!0))||[];a=new Response($e(a.body,65536,n,(()=>{r&&r(),m&&m()})),e)}c=c||"text";let g=await it[Z.findKey(it,c)||"text"](a,e);return!o&&m&&m(),await new Promise(((t,n)=>{Ie(t,n,{data:g,headers:Ne.from(a.headers),status:a.status,statusText:a.statusText,config:e,request:d})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new ne("Network Error",ne.ERR_NETWORK,e,d),{cause:t.cause||t});throw ne.from(t,t&&t.code,e,d)}})};Z.forEach(ot,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const st=e=>`- ${e}`,lt=e=>Z.isFunction(e)||null===e||!1===e,ct=e=>{e=Z.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let a=0;a`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(st).join("\n"):" "+st(e[0]):"as no adapter specified";throw new ne("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function ut(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pe(null,e)}function ft(e){return ut(e),e.headers=Ne.from(e.headers),e.data=Te.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ct(e.adapter||xe.adapter)(e).then((function(t){return ut(e),t.data=Te.call(e,e.transformResponse,t),t.headers=Ne.from(t.headers),t}),(function(t){return je(t)||(ut(e),t&&t.response&&(t.response.data=Te.call(e,e.transformResponse,t.response),t.response.headers=Ne.from(t.response.headers))),Promise.reject(t)}))}const ht={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{ht[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const dt={};ht.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,a)=>{if(!1===e)throw new ne(r(i," has been removed"+(t?" in "+t:"")),ne.ERR_DEPRECATED);return t&&!dt[i]&&(dt[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,a)}};const pt={assertOptions:function(e,t,n){if("object"!=typeof e)throw new ne("options must be an object",ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const t=e[a],n=void 0===t||o(t,a,e);if(!0!==n)throw new ne("option "+a+" must be "+n,ne.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ne("Unknown option "+a,ne.ERR_BAD_OPTION)}},validators:ht},mt=pt.validators;class vt{constructor(e){this.defaults=e,this.interceptors={request:new pe,response:new pe}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ve(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&pt.assertOptions(n,{silentJSONParsing:mt.transitional(mt.boolean),forcedJSONParsing:mt.transitional(mt.boolean),clarifyTimeoutError:mt.transitional(mt.boolean)},!1),null!=r&&(Z.isFunction(r)?t.paramsSerializer={serialize:r}:pt.assertOptions(r,{encode:mt.function,serialize:mt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&Z.merge(i.common,i[t.method]);i&&Z.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=Ne.concat(a,i);const o=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,f=0;if(!s){const e=[ft.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);f{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new Pe(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new yt((function(t){e=t})),cancel:e}}}const bt=yt,_t={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(_t).forEach((([e,t])=>{_t[t]=e}));const wt=_t,Et=function e(t){const n=new gt(t),r=l(gt.prototype.request,n);return Z.extend(r,gt.prototype,n,{allOwnKeys:!0}),Z.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ve(t,n))},r}(xe);Et.Axios=gt,Et.CanceledError=Pe,Et.CancelToken=bt,Et.isCancel=je,Et.VERSION="1.7.7",Et.toFormData=se,Et.AxiosError=ne,Et.Cancel=Et.CanceledError,Et.all=function(e){return Promise.all(e)},Et.spread=function(e){return function(t){return e.apply(null,t)}},Et.isAxiosError=function(e){return Z.isObject(e)&&!0===e.isAxiosError},Et.mergeConfig=Ve,Et.AxiosHeaders=Ne,Et.formToJSON=e=>Re(Z.isHTMLForm(e)?new FormData(e):e),Et.getAdapter=ct,Et.HttpStatusCode=wt,Et.default=Et;const Rt=Et;var St=n(6942),xt=n.n(St),kt=n(6994),Ot=n.n(kt);const At=window.React;Object.defineProperty;var Ct=new Map,Bt=new WeakMap,Lt=0;function Nt(e,t,n={},r=undefined){if(void 0===window.IntersectionObserver&&void 0!==r){const i=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}const{id:i,observer:a,elements:o}=function(e){const t=function(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(n=e.root,n?(Bt.has(n)||(Lt+=1,Bt.set(n,Lt.toString())),Bt.get(n)):"0"):e[t]}`;var n})).toString()}(e);let n=Ct.get(t);if(!n){const r=new Map;let i;const a=new IntersectionObserver((t=>{t.forEach((t=>{var n;const a=t.isIntersecting&&i.some((e=>t.intersectionRatio>=e));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=a),null==(n=r.get(t.target))||n.forEach((e=>{e(a,t)}))}))}),e);i=a.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:a,elements:r},Ct.set(t,n)}return n}(n),s=o.get(e)||[];return o.has(e)||o.set(e,s),s.push(t),a.observe(e),function(){s.splice(s.indexOf(t),1),0===s.length&&(o.delete(e),a.unobserve(e)),0===o.size&&(a.disconnect(),Ct.delete(i))}}function Tt({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:i,triggerOnce:a,skip:o,initialInView:s,fallbackInView:l,onChange:c}={}){var u;const[f,h]=At.useState(null),d=At.useRef(),[p,m]=At.useState({inView:!!s,entry:void 0});d.current=c,At.useEffect((()=>{if(o||!f)return;let s;return s=Nt(f,((e,t)=>{m({inView:e,entry:t}),d.current&&d.current(e,t),t.isIntersecting&&a&&s&&(s(),s=void 0)}),{root:i,rootMargin:r,threshold:e,trackVisibility:n,delay:t},l),()=>{s&&s()}}),[Array.isArray(e)?e.toString():e,f,i,r,a,o,n,l,t]);const v=null==(u=p.entry)?void 0:u.target,g=At.useRef();f||!v||a||o||g.current===v||(g.current=v,m({inView:!!s,entry:void 0}));const y=[h,p.inView,p.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}At.Component;var jt=(0,t.createContext)();function zt(e){var t=e.value,n=e.children;return React.createElement(jt.Provider,{value:t},n)}function Pt(){return(0,t.useContext)(jt)}function It(e){return e&&Mt[e.toLowerCase()].icon?Mt[e.toLowerCase()].icon():null}var Mt={proxy:"https://proxy.getinstantimages.com/api/",testmode:!1,defaults:{provider:"unsplash",order:"latest",arr_key:"results"},providers:["Unsplash","Openverse","Pixabay","Pexels","Giphy"],unsplash:{name:"Unsplash",requires_key:!0,new:!1,api_var:"client_id",collections_api:"https://api.unsplash.com/collections/",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M10 9V0H22V9H10ZM22 14H32V32H0V14H10V23H22V14Z",fill:"black"}))}},pixabay:{name:"Pixabay",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("g",{clipPath:"url(#clip0_307_143)"},React.createElement("path",{d:"M0 0V32H32V0H0Z",fill:"#48A947"}),React.createElement("path",{d:"M6.83734 22.3147V28C5.93067 28.0427 5.02401 28.032 4.11734 27.9787C4.09601 27.7014 4.06401 27.4667 4.06401 27.2427C4.06401 23.2427 4.05334 19.2534 4.06401 15.2534C4.07467 12.032 5.97334 9.32269 8.85334 8.37335C13.1307 6.95469 17.4507 10.048 17.8453 14.3894C18.144 17.6534 16.4267 20.5547 13.568 21.7814C12.6507 22.176 11.6907 22.304 10.7093 22.304C9.45067 22.3147 8.21334 22.3147 6.83734 22.3147ZM6.84801 19.4454C8.24534 19.4454 9.54667 19.424 10.848 19.4454C13.1627 19.488 14.816 17.76 15.104 15.712C15.424 13.3654 13.7813 11.2107 11.4453 10.88H11.4347C9.25867 10.592 7.06134 12.2774 6.88001 14.528C6.74134 16.128 6.84801 17.728 6.84801 19.4454Z",fill:"#F9FBF9"}),React.createElement("path",{d:"M25.4827 14.9334L30.656 22.2081H27.3067L23.4667 16.9494C22.0694 18.6881 20.9067 20.4907 19.584 22.2081H16.2454L21.408 14.9334L16.8107 8.04272H20.16L23.4454 12.9494L26.7307 8.04272H30.0694L25.4827 14.9334Z",fill:"#FAFCFA"}),React.createElement("path",{d:"M6.848 19.4453C6.848 17.7279 6.74134 16.1173 6.86934 14.5386C7.05067 12.2879 9.248 10.6026 11.424 10.8906C13.7707 11.2106 15.4133 13.3653 15.0933 15.7119C14.816 17.7599 13.152 19.4879 10.8373 19.4453C9.54667 19.4239 8.24534 19.4453 6.848 19.4453Z",fill:"#4AA949"})),React.createElement("defs",null,React.createElement("clipPath",{id:"clip0_307_143"},React.createElement("rect",{width:"32",height:"32",fill:"white"}))))}},pexels:{name:"Pexels",requires_key:!0,new:!1,api_var:"key",icon:function(){return React.createElement("svg",{width:"32px",height:"32px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M2 0h28a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2z",fill:"#05A081"}),React.createElement("path",{d:"M13 21h3.863v-3.752h1.167a3.124 3.124 0 1 0 0-6.248H13v10zm5.863 2H11V9h7.03a5.124 5.124 0 0 1 .833 10.18V23z",fill:"#fff"}))}},openverse:{name:"Openverse",requires_key:!1,new:!1,api_var:"key",key:"",icon:function(){return React.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M25.8578 14.32C29.6708 14.32 32.7618 11.1144 32.7618 7.16C32.7618 3.20564 29.6708 0 25.8578 0C22.0448 0 18.9539 3.20564 18.9539 7.16C18.9539 11.1144 22.0448 14.32 25.8578 14.32Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 7.16C0.761841 11.1 3.84742 14.32 7.66584 14.32V0C3.84742 0 0.761841 3.2 0.761841 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 7.16C9.85791 11.1 12.9435 14.32 16.7619 14.32V0C12.9628 0 9.85791 3.2 9.85791 7.16Z",fill:"#000000"}),React.createElement("path",{d:"M25.8578 31.9399C29.6708 31.9399 32.7618 28.7343 32.7618 24.78C32.7618 20.8256 29.6708 17.62 25.8578 17.62C22.0448 17.62 18.9539 20.8256 18.9539 24.78C18.9539 28.7343 22.0448 31.9399 25.8578 31.9399Z",fill:"#000000"}),React.createElement("path",{d:"M9.85791 24.7801C9.85791 28.72 12.9435 31.9401 16.7619 31.9401V17.64C12.9628 17.64 9.85791 20.84 9.85791 24.7801Z",fill:"#000000"}),React.createElement("path",{d:"M0.761841 24.84C0.761841 28.8 3.84742 32 7.66584 32V17.7C3.84742 17.7 0.761841 20.9 0.761841 24.84Z",fill:"#000000"}))}},giphy:{name:"Giphy",requires_key:!0,new:!0,api_var:"key",icon:function(){return React.createElement("svg",{height:"35",width:"32",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 35"},React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("path",{d:"M4 4h20v27H4z",fill:"#000"}),React.createElement("g",null,React.createElement("path",{d:"M0 3h4v29H0z",fill:"#04ff8e"}),React.createElement("path",{d:"M24 11h4v21h-4z",fill:"#8e2eff"}),React.createElement("path",{d:"M0 31h28v4H0z",fill:"#00c5ff"}),React.createElement("path",{d:"M0 0h16v4H0z",fill:"#fff152"}),React.createElement("path",{d:"M24 8V4h-4V0h-4v12h12V8",fill:"#ff5b5b"}),React.createElement("path",{d:"M24 16v-4h4",fill:"#551c99"})),React.createElement("path",{d:"M16 0v4h-4",fill:"#999131"})))}}};const Dt=window.wp.i18n;var Ft=[{label:(0,Dt.__)("WordPress","instant-images"),value:"wordpress"},{label:(0,Dt.__)("Flickr","instant-images"),value:"flickr"},{label:(0,Dt.__)("Nasa","instant-images"),value:"nasa"},{label:(0,Dt.__)("SpaceX","instant-images"),value:"spacex"},{label:(0,Dt.__)("Wikimedia","instant-images"),value:"wikimedia"}],Ht=[{label:(0,Dt.__)("Square","instant-images"),value:"square"},{label:(0,Dt.__)("Tall","instant-images"),value:"tall"},{label:(0,Dt.__)("Wide","instant-images"),value:"wide"}],Wt=[{label:(0,Dt.__)("Red","instant-images"),value:"red"},{label:(0,Dt.__)("Orange","instant-images"),value:"orange"},{label:(0,Dt.__)("Yellow","instant-images"),value:"yellow"},{label:(0,Dt.__)("Green","instant-images"),value:"green"},{label:(0,Dt.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,Dt.__)("Blue","instant-images"),value:"blue"},{label:(0,Dt.__)("Violet","instant-images"),value:"violet"},{label:(0,Dt.__)("Pink","instant-images"),value:"pink"},{label:(0,Dt.__)("Brown","instant-images"),value:"brown"},{label:(0,Dt.__)("Black","instant-images"),value:"black"},{label:(0,Dt.__)("Gray","instant-images"),value:"gray"},{label:(0,Dt.__)("White","instant-images"),value:"white"}],Ut=[{label:(0,Dt.__)("Landscape","instant-images"),value:"landscape"},{label:(0,Dt.__)("Portrait","instant-images"),value:"portrait"},{label:(0,Dt.__)("Square","instant-images"),value:"squarish"}],qt=[{label:(0,Dt.__)("Grayscale","instant-images"),value:"grayscale"},{label:(0,Dt.__)("Red","instant-images"),value:"red"},{label:(0,Dt.__)("Orange","instant-images"),value:"orange"},{label:(0,Dt.__)("Yellow","instant-images"),value:"yellow"},{label:(0,Dt.__)("Green","instant-images"),value:"green"},{label:(0,Dt.__)("Turquoise","instant-images"),value:"turquoise"},{label:(0,Dt.__)("Blue","instant-images"),value:"blue"},{label:(0,Dt.__)("Lilac","instant-images"),value:"lilac"},{label:(0,Dt.__)("Pink","instant-images"),value:"pink"},{label:(0,Dt.__)("White","instant-images"),value:"white"},{label:(0,Dt.__)("Gray","instant-images"),value:"gray"},{label:(0,Dt.__)("Black","instant-images"),value:"black"},{label:(0,Dt.__)("Brown","instant-images"),value:"brown"},{label:(0,Dt.__)("Transparent","instant-images"),value:"transparent"}],Vt=[{label:(0,Dt.__)("Backgrounds","instant-images"),value:"backgrounds"},{label:(0,Dt.__)("Fashion","instant-images"),value:"fashion"},{label:(0,Dt.__)("Nature","instant-images"),value:"nature"},{label:(0,Dt.__)("Science","instant-images"),value:"science"},{label:(0,Dt.__)("Education","instant-images"),value:"education"},{label:(0,Dt.__)("Feelings","instant-images"),value:"feelings"},{label:(0,Dt.__)("Health","instant-images"),value:"health"},{label:(0,Dt.__)("People","instant-images"),value:"people"},{label:(0,Dt.__)("Religion","instant-images"),value:"religion"},{label:(0,Dt.__)("Places","instant-images"),value:"places"},{label:(0,Dt.__)("Animals","instant-images"),value:"animals"},{label:(0,Dt.__)("Industry","instant-images"),value:"industry"},{label:(0,Dt.__)("Computer","instant-images"),value:"computer"},{label:(0,Dt.__)("Food","instant-images"),value:"food"},{label:(0,Dt.__)("Sports","instant-images"),value:"sports"},{label:(0,Dt.__)("Food","instant-images"),value:"food"},{label:(0,Dt.__)("Transportation","instant-images"),value:"transportation"},{label:(0,Dt.__)("Travel","instant-images"),value:"travel"},{label:(0,Dt.__)("Buildings","instant-images"),value:"buildings"},{label:(0,Dt.__)("Business","instant-images"),value:"business"},{label:(0,Dt.__)("Music","instant-images"),value:"music"}],Gt=[{label:(0,Dt.__)("Horizontal","instant-images"),value:"horizontal"},{label:(0,Dt.__)("Vertical","instant-images"),value:"vertical"}],Jt=[{label:(0,Dt.__)("Photo","instant-images"),value:"photo"},{label:(0,Dt.__)("Illustration","instant-images"),value:"illustration"},{label:(0,Dt.__)("Vector","instant-images"),value:"vector"}],Kt=[{label:(0,Dt.__)("Black & White","instant-images"),value:"black_and_white"},{label:(0,Dt.__)("Black","instant-images"),value:"black"},{label:(0,Dt.__)("White","instant-images"),value:"white"},{label:(0,Dt.__)("Yellow","instant-images"),value:"yellow"},{label:(0,Dt.__)("Green","instant-images"),value:"green"},{label:(0,Dt.__)("Orange","instant-images"),value:"orange"},{label:(0,Dt.__)("Red","instant-images"),value:"red"},{label:(0,Dt.__)("Purple","instant-images"),value:"purple"},{label:(0,Dt.__)("Magenta","instant-images"),value:"magenta"},{label:(0,Dt.__)("Teal","instant-images"),value:"teal"},{label:(0,Dt.__)("Blue","instant-images"),value:"blue"}],Yt=[{label:(0,Dt.__)("Landscape","instant-images"),value:"landscape"},{label:(0,Dt.__)("Portrait","instant-images"),value:"portrait"},{label:(0,Dt.__)("Square","instant-images"),value:"squarish"}];function $t(e){return function(e){if(Array.isArray(e))return Xt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Xt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n-1&&parseInt(n)<2&&alert(instant_img_localize.api_ratelimit_msg)}}function bn(e){return e.charAt(0).toUpperCase()+e.slice(1)}var wn="";function En(e){var t=e.currentTarget,n=t.getBoundingClientRect(),r=Math.round(n.left),i=Math.round(n.top),a=t.closest("#photo-listing").querySelector("#tooltip");a.classList.remove("over"),t.classList.contains("tooltip--above")?a.classList.add("above"):a.classList.remove("above"),wn=setInterval((function(){clearInterval(wn),a.innerHTML=t.dataset.title,r=r-a.offsetWidth+t.offsetWidth+5,a.style.left="".concat(r,"px"),a.style.top="".concat(i,"px"),setTimeout((function(){a.classList.add("over")}),25)}),750)}function Rn(e){clearInterval(wn),e.currentTarget.closest("#photo-listing").querySelector("#tooltip").classList.remove("over")}function Sn(e){e&&window&&window.open(e,"_blank")}function xn(){var e=instant_img_localize;switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:200){case 400:case 401:return e.api_invalid_msg;case 403:return e.api_invalid_403_msg;case 404:return e.api_invalid_404_msg;case 429:return e.api_ratelimit_msg;case 500:case 503:return e.api_invalid_500_msg;case 501:return e.api_invalid_501_msg}}function kn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=instant_img_localize,r=xn(t);switch(t){case 400:case 401:case 500:case 429:console.warn("[".concat(n.instant_images," - ").concat(t," Error] ").concat(bn(e),": ").concat(r))}}function On(e){return e&&e[Mt.defaults.arr_key]||[]}function An(e){return void 0===e.total||null===e.total?0:e.total}function Cn(e){if(!e||Mt.testmode)return!1;var t=sessionStorage.getItem(gn(e));if(!t)return!1;var n=JSON.parse(t),r=n.expires,i=void 0===r?0:r,a=n.error;if(void 0!==a&&a)return!1;var o=Date.now()>i;return o&&Ln(e),!(!n||o)&&n}function Bn(e,t){if(!e||!t||null!=t&&t.error)return!1;t.expires=Date.now()+72e5,sessionStorage.setItem(gn(e),JSON.stringify(t))}function Ln(e){if(!e)return!1;sessionStorage.removeItem(gn(e))}function Nn(e){return Nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nn(e)}function Tn(){Tn=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof g?t:g,o=Object.create(a.prototype),s=new B(r||[]);return i(o,"_invoke",{value:k(e,n,s)}),o}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",d="suspendedYield",p="executing",m="completed",v={};function g(){}function y(){}function b(){}var _={};c(_,o,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(L([])));E&&E!==n&&r.call(E,o)&&(_=E);var R=b.prototype=g.prototype=Object.create(_);function S(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(i,a,o,s){var l=f(e[i],e,a);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==Nn(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,s)}),(function(e){n("throw",e,o,s)})):t.resolve(u).then((function(e){c.value=e,o(c)}),(function(e){return n("throw",e,o,s)}))}s(l.arg)}var a;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return a=a?a.then(i,i):i()}})}function k(t,n,r){var i=h;return function(a,o){if(i===p)throw Error("Generator is already running");if(i===m){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?m:d,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function jn(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function zn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Pn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=1?null:React.createElement("div",{className:"instant-images-no-results"},React.createElement("div",null,React.createElement("h3",null,instant_img_localize.no_results," "),React.createElement("p",null,instant_img_localize.no_results_desc," ")))}const Gn=n.p+"images/giphy-powered.9748c37d.png";var Jn=Mt.providers;function Kn(e){var n=e.switchProvider,r=Pt().provider;return React.createElement(t.Fragment,null,!(null==Jn||!Jn.length)&&React.createElement("nav",{className:"provider-nav"},Jn.map((function(e,t){return React.createElement("div",{key:"provider-".concat(t)},React.createElement("button",{onClick:function(){return n(e.toLowerCase())},className:r===e.toLowerCase()?"provider-nav--btn active":"provider-nav--btn"},It(e),React.createElement("span",null,e),Mt[e.toLowerCase()].new&&React.createElement("span",{className:"provider-nav--new"},instant_img_localize.new)))})),"giphy"===r?React.createElement("div",{className:"giphy-powered"},React.createElement("a",{href:"https://giphy.com",target:"_blank",rel:"noreferrer"},React.createElement("img",{src:Gn,alt:"Powered by Giphy"}))):null))}function Yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=200&&t.status<400&&JSON.parse(t.response).success||a(!1)},t.onerror=function(e){console.warn(e),a(!1)}}),[]),React.createElement(t.Fragment,null,i?null:React.createElement("div",{className:"error-messaging"},React.createElement("strong",null,instant_img_localize.error_restapi),instant_img_localize.error_restapi_desc))}const Xn=window.wp.blocks,Zn=window.wp.data;function Qn(e,t){var n=e.id,r=void 0===n?null:n,i=e.url,a=void 0===i?null:i,o=e.caption,s=void 0===o?"":o,l=e.alt,c=void 0===l?"":l;if(a&&r){var u=(0,Xn.createBlock)("core/image",{id:r,url:a,caption:s,alt:c});t?(0,Zn.dispatch)("core/block-editor").replaceBlock(t,u):(0,Zn.dispatch)("core/block-editor").insertBlocks(u)}}function er(e){return er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},er(e)}function tr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nr(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&React.createElement("img",{className:"user-wrap--photo",src:B,alt:""}),C)),React.createElement("div",{className:"photo-options"},f&&!X?React.createElement(t.Fragment,null,React.createElement("button",{type:"button",className:"set-featured fade","data-title":instant_img_localize.set_as_featured,onMouseEnter:function(e){return En(e)},onMouseLeave:function(e){return Rn(e)},onClick:function(e){return function(e){Rn(e),te.current&&(ie=!0,te.current.click())}(e)}},React.createElement("i",{className:"fa fa-picture-o","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.set_as_featured)),React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(e){return En(e)},onMouseLeave:function(e){return Rn(e)},onClick:function(e){return oe(e)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post))):null,!!s&&React.createElement("button",{type:"button",className:"insert fade","data-title":instant_img_localize.insert_into_post,onMouseEnter:function(e){return En(e)},onMouseLeave:function(e){return Rn(e)},onClick:function(e){return oe(e)}},React.createElement("i",{className:"fa fa-plus","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.insert_into_post)),X?React.createElement("button",{onClick:function(){X&&(window.location=X)},className:"edit-photo-admin fade","data-title":instant_img_localize.edit_upload,onMouseEnter:function(e){return En(e)},onMouseLeave:function(e){return Rn(e)}},React.createElement("i",{className:"fa fa-pencil","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_upload)):React.createElement("button",{onClick:function(e){return function(e){e.preventDefault(),Rn(e);var t=document.querySelectorAll(".edit-screen.editing");t&&t.forEach((function(e){e.classList.remove("editing")})),ne.current.classList.add("editing"),setTimeout((function(){ne.current.focus({preventScroll:!0})}),150)}(e)},className:"edit-photo fade","data-title":instant_img_localize.edit_details,onMouseEnter:function(e){return En(e)},onMouseLeave:function(e){return Rn(e)}},React.createElement("i",{className:"fa fa-cog","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},instant_img_localize.edit_details)))),React.createElement("div",{className:"photo-meta"},E?React.createElement("span",{className:"likes tooltip--above","data-title":E+" "+T,onMouseEnter:function(e){return En(e)},onMouseLeave:function(e){return Rn(e)}},React.createElement("i",{className:"fa fa-heart heart-like","aria-hidden":"true"})," ",E):null,React.createElement("a",{className:"tooltip--above",href:m,"data-title":"".concat(instant_img_localize.open_external," ").concat(bn(a)),onMouseEnter:function(e){return En(e)},onMouseLeave:function(e){return Rn(e)},rel:"noopener noreferrer",target:"_blank"},React.createElement("i",{className:"fa fa-external-link","aria-hidden":"true"}),React.createElement("span",{className:"offscreen"},"".concat(instant_img_localize.open_external," ").concat(bn(a)))))),React.createElement("div",{className:"edit-screen",tabIndex:"0",ref:ne},React.createElement("div",{className:"edit-screen--title"},React.createElement("div",null,React.createElement("p",{className:"heading"},instant_img_localize.edit_details),R&&R.length>0&&React.createElement("p",{className:"dimensions"},R)),React.createElement("div",{className:"preview",style:{backgroundImage:"url(".concat(k,")")}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_filename,":"),React.createElement("input",{type:"text",name:"filename","data-original":p,placeholder:W.filename,value:W.filename,onChange:function(e){return ce(e)}}),React.createElement("em",null,".",w)),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_title,":"),React.createElement("input",{type:"text",name:"title","data-original":v,placeholder:v,value:W.title||"",onChange:function(e){return ce(e)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_alt,":"),React.createElement("input",{type:"text",name:"alt","data-original":g,value:W.alt||"",onChange:function(e){return ce(e)}})),React.createElement("label",null,React.createElement("span",null,instant_img_localize.edit_caption,":"),React.createElement("textarea",{rows:"4",name:"caption","data-original":F,onChange:function(e){return ce(e)},value:W.caption||"",ref:re})),D?React.createElement("div",{className:"add-attribution-row"},React.createElement("button",{onClick:function(e){return function(e){e.preventDefault(),re.current.value=D,U(nr(nr({},W),{},{caption:D}))}(e)},type:"button"},instant_img_localize.attribution)):null,React.createElement("div",{className:"edit-screen--controls"},React.createElement("button",{type:"button",className:"button button-secondary",onClick:function(e){return U({filename:p,title:v,alt:g,caption:F}),ne.current.classList.remove("editing"),void te.current.focus({preventScrol:!0})}},instant_img_localize.cancel)," "," ",React.createElement("button",{type:"button",className:"button button-primary",onClick:function(){return ne.current.classList.remove("editing"),void te.current.click()}},s?instant_img_localize.insert_into_post:instant_img_localize.upload_now))),React.createElement("div",{className:"photo-status"})))}function sr(e){var n=e.result.data,r=void 0===n?null:n,i=(null==r?void 0:r.url)||"",a=(null==r?void 0:r.title)||"",o=(null==r?void 0:r.description)||"",s=(null==r?void 0:r.avatar)||"",l=r.image,c=void 0===l?null:l,u=c.src,f=void 0===u?null:u,h=c.alt,d=void 0===h?null:h,p=(0,t.useRef)(),m=(0,t.useRef)();return React.createElement(t.Fragment,null,c&&i?React.createElement("article",{className:"photo feature",title:o,ref:p,onClick:function(){return m.current.click()}},React.createElement("div",{className:"photo--wrap"},React.createElement("span",{className:"flag",title:instant_img_localize.advertisement},instant_img_localize.ad),React.createElement("div",{className:"img-wrap"},React.createElement("a",{className:"loaded",href:i,target:"_blank",ref:m,rel:"noreferrer"},React.createElement("img",{src:f,alt:d}))),React.createElement("div",{className:"feature-title"},s&&React.createElement("img",{src:s,alt:a}),React.createElement("span",null,a)))):null)}function lr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n-1&&t.splice(n,1),t.length>=10&&(t.length=10),t.unshift(e),localStorage.setItem(gr,JSON.stringify(t))}else localStorage.setItem(gr,JSON.stringify([e]))}}(r),v(br())))}(e)},autoComplete:"off"},React.createElement("label",{htmlFor:"search-input",className:"offscreen"},instant_img_localize.search_label),React.createElement("div",{ref:_},React.createElement("input",{ref:n,type:"text",id:"search-input",placeholder:instant_img_localize.search,disabled:f,onChange:function(e){return l&&d(e.target.value)},onFocus:function(){return b(!0)}}),l&&((null==m?void 0:m.length)||(null==h?void 0:h.length))?React.createElement(kr,{show:y,history:m,setHistory:v,setSearchValue:function(e){var t=null==n?void 0:n.current;t.value=e,null==w||w.current.click(),t.focus()},container:_}):null,!o&&React.createElement(xr,{show:y})),React.createElement("button",{type:"submit",disabled:f,ref:w},React.createElement("i",{className:"fa fa-search"}),React.createElement("span",{className:"offscreen"},instant_img_localize.search)),React.createElement(Or,{show:y})))}));function Lr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function zr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pr(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==h[0]&&h[0],!P){e.next=3;break}return e.abrupt("return",!1);case 3:if(n||""===(null==he||null===(t=he.current)||void 0===t?void 0:t.value)){e.next=7;break}if(!m||!g){e.next=7;break}return xe(he.current.value),e.abrupt("return");case 7:if(j(!0),d=void 0,(null==he||null===(d=he.current)||void 0===d?void 0:d.value)&&(he.current.value=""),Y(b),Z([]),Ne(),Vr=1,r=sn(S,re),i=dn("photos",r),!(a=Cn(i))){e.next=18;break}Oe(On(a),!1,null),e.next=37;break;case 18:return e.next=20,fetch(i);case 20:return s=e.sent,l=s.status,yn(s.headers),e.prev=23,e.next=26,s.json();case 26:c=e.sent,u=c.error,f=void 0===u?null:u,Oe(On(c),!1,f),Bn(i,c),e.next=37;break;case 32:e.prev=32,e.t0=e.catch(23),kn(o,l),j(!1),Ln(i);case 37:setTimeout((function(){j(!1)}),250);case 38:case"end":return e.stop()}var d}),e,null,[[23,32]])}))),Ee.apply(this,arguments)}function Re(){return Se.apply(this,arguments)}function Se(){return(Se=Fr(jr().mark((function e(){var t,n,r,i,a,s,l,c,u,f,h,d;return jr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(B&&!T&&!P&&!D){e.next=2;break}return e.abrupt("return");case 2:if(I(!0),Vr=parseInt(Vr)+1,t=null!=K&&K.active&&null!=K&&K.term?{term:K.term}:{},n=null!=K&&K.active?"search":"photos",r=null!=K&&K.active?oe:re,i=Pr(Pr(Pr({},{page:Vr}),t),r),a=sn(S,i),s=dn(n,a),!(l=Cn(s))){e.next=15;break}Oe(On(l),!0,null),e.next=34;break;case 15:return e.next=17,fetch(s);case 17:return c=e.sent,u=c.status,yn(c.headers),e.prev=20,e.next=23,c.json();case 23:f=e.sent,h=f.error,d=void 0===h?null:h,Oe(On(f),!0,d),Bn(s,f),e.next=34;break;case 29:e.prev=29,e.t0=e.catch(20),kn(o,u),I(!1),Ln(s);case 34:case"end":return e.stop()}}),e,null,[[20,29]])})))).apply(this,arguments)}function xe(_x){return ke.apply(this,arguments)}function ke(){return(ke=Fr(jr().mark((function e(t){var n,r,i,a,s,l,c,u,f,h,d;return jr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(j(!0),Ne(),Vr=1,n="id:"===t.substring(0,3)?"id":"term",r="id"===n?{id:t.replace("id:","").replace(/\s+/,"")}:{term:t},i=Pr(Pr(Pr({},{page:Vr}),r),oe),a=sn(S,i),s=dn("search",a),!(l=Cn(s))){e.next=14;break}Oe(On(l),!1,null),Y({active:!0,term:t,type:n,results:An(l)}),e.next=35;break;case 14:return e.next=16,fetch(s);case 16:return c=e.sent,u=c.status,yn(c.headers),e.prev=19,e.next=22,c.json();case 22:f=e.sent,h=f.error,d=void 0===h?null:h,Oe(On(f),!1,d),Y({active:!0,term:t,type:n,results:An(f)}),Bn(s,f),e.next=35;break;case 29:e.prev=29,e.t0=e.catch(19),F(!0),j(!1),kn(o,u),Ln(s);case 35:he.current.classList.remove(y);case 36:case"end":return e.stop()}}),e,null,[[19,29]])})))).apply(this,arguments)}function Oe(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;e=null==t?void 0:t.length,F(0===parseInt(e)||void 0===e),E(n?function(e){return[].concat(Mr(e),Mr(t))}:t),U(r)}function Ae(e,t){var n=Pr({},re);n[e]&&"#"===t||""===t||"all"===t?delete n[e]:n[e]=t,ie(Pr({},n))}function Ce(e){return Be.apply(this,arguments)}function Be(){return(Be=Fr(jr().mark((function e(t){var n,r;return jr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S!==t){e.next=2;break}return e.abrupt("return");case 2:if(j(!0),U(!1),G(!1),ye.classList.remove("overflow-hidden"),!Mt[t].requires_key||O.includes(t)){e.next=27;break}return e.prev=7,e.next=10,fetch(pn(t));case 10:if(n=e.sent,r=n.status,yn(n.headers),200===r){e.next=18;break}return G(t),U(!0),ye.classList.add("overflow-hidden"),e.abrupt("return");case 18:200===r&&A((function(e){return[].concat(Mr(e),[t])})),e.next=27;break;case 21:return e.prev=21,e.t0=e.catch(7),G(t),ye.classList.add("overflow-hidden"),U(!0),e.abrupt("return");case 27:setTimeout((function(){te(Qt[t].filters),x(t)}),250);case 28:case"end":return e.stop()}}),e,null,[[7,21]])})))).apply(this,arguments)}function Le(){return Le=Fr(jr().mark((function e(t){var n;return jr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&!((null==t?void 0:t.length)<3)){e.next=2;break}return e.abrupt("return");case 2:return n=instant_img_localize.root+"instant-images-extended/suggestions/?term=".concat(t),e.next=5,Rt.get(n).then((function(e){Z(e.data)})).catch((function(e){console.warn(e)}));case 5:case"end":return e.stop()}}),e)}))),Le.apply(this,arguments)}function Ne(){pe&&null!=fe&&fe.current&&(null==fe||fe.current.scroll({top:0,left:0,behavior:"smooth"}))}function Te(e){if("Escape"===e.key){var t=fe.current.querySelectorAll(".edit-screen.editing");t&&Mr(t).forEach((function(e){null==e||e.classList.remove("editing")}))}}return(0,t.useEffect)((function(){null!=K&&K.active||se({})}),[K]),(0,t.useEffect)((function(){B&&null!=K&&K.active&&xe(null==K?void 0:K.term)}),[oe]),(0,t.useEffect)((function(){B&&we()}),[re]),(0,t.useEffect)((function(){te(Qt[S].filters),ie({})}),[S]),(0,t.useEffect)((function(){Re()}),[ue]),(0,t.useEffect)((function(){qr(fe.current,(function(){ve||(de.current=new(Ot())(fe.current,{itemSelector:".photo"}),fe.current.querySelectorAll(".photo").forEach((function(e){e.classList.add("in-view")}))),setTimeout((function(){j(!1),I(!1),B||L(!0)}),250)}))}),[w]),(0,t.useEffect)((function(){return j(!1),_e.classList.add("loaded"),ve&&we(),document.addEventListener("keydown",Te,!1),function(){document.removeEventListener("keydown",Te,!1)}}),[]),React.createElement(t.Fragment,null,React.createElement(zt,{value:{provider:S,wpBlock:pe,mediaModal:ge,blockSidebar:me,clientId:h,search:K,apiError:W,getPhotos:we,searchHandler:function(e){e.preventDefault();var t=he.current.value;t.length>2?(he.current.classList.add(y),xe(t)):he.current.focus()},filterSearch:function(e,t){var n=Pr({},oe);n[e]&&"#"===t||""===t||"all"===t?delete n[e]:n[e]=t,se(Pr({},n))},suggestions:X,getSuggestions:function(e){return Le.apply(this,arguments)}}},pe?React.createElement(tn,{switchProvider:Ce}):React.createElement(React.Fragment,null,React.createElement(Kn,{switchProvider:Ce}),React.createElement(Sr,null)),React.createElement($n,null),React.createElement("div",{className:"control-nav"},React.createElement("div",{className:xt()("control-nav--filters-wrap",W||null!=K&&K.active?"inactive":null)},ee&&null!==(r=Object.entries(ee))&&void 0!==r&&r.length?React.createElement("div",{className:"control-nav--filters"},Object.entries(ee).map((function(e,t){var n=Hr(e,2),r=n[0],i=n[1];return React.createElement(Un,{key:"".concat(S,"-").concat(t,"-").concat(r),data:i,filterKey:r,handler:Ae})}))):null),React.createElement(Br,{ref:he})),React.createElement("div",{id:"photo-listing",className:T?"loading":null},React.createElement(Nr,null),pe?React.createElement(pr,{ref:fe,data:w,done:D,loadMorePhotos:Re}):React.createElement(cr,{ref:fe,data:w}),React.createElement(Vn,{total:null==K?void 0:K.results,is_search:null==K?void 0:K.active}),React.createElement(qn,{ref:ce,loadMorePhotos:Re,loading:P,done:D}),React.createElement(In,{provider:V,callback:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&x(e),G(!1),j(!1),U(!1),ye.classList.remove("overflow-hidden")}}),React.createElement(Mn,null),React.createElement(mr,null))))}function Jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n